[all-commits] [llvm/llvm-project] 7917b3: [Debuginfod] Don't depend on Content-Length.

Daniel Thornburgh via All-commits all-commits at lists.llvm.org
Mon Mar 21 10:27:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7917b3c6957cdf9f4cb4f4908971184d7bbe38e7
      https://github.com/llvm/llvm-project/commit/7917b3c6957cdf9f4cb4f4908971184d7bbe38e7
  Author: Daniel Thornburgh <dthorn at google.com>
  Date:   2022-03-21 (Mon, 21 Mar 2022)

  Changed paths:
    M llvm/include/llvm/Debuginfod/HTTPClient.h
    M llvm/lib/Debuginfod/Debuginfod.cpp
    M llvm/lib/Debuginfod/HTTPClient.cpp
    M llvm/unittests/Debuginfod/CMakeLists.txt
    R llvm/unittests/Debuginfod/HTTPClientTests.cpp

  Log Message:
  -----------
  [Debuginfod] Don't depend on Content-Length.

The present implementation of debuginfod lookups requires the
Content-Length field to be populated in the HTTP server response.
Unfortunately, Content-Length is optional, and there are some real
scenarios where it's missing. (For example, a Google Cloud Storage
server doing on-the-fly gunzipping.)

This changes the debuginfod response handler to directly stream the
output to the cache file as it is received. In addition to allowing
lookups to proceed without a Content-Lenght, it seems somewhat more
straightforward to implement, and it allows the disk I/O to be
interleaved with the network I/O.

Reviewed By: noajshu

Differential Revision: https://reviews.llvm.org/D121720




More information about the All-commits mailing list