[PATCH] D121720: [Debuginfod] Don't depend on Content-Length.

Daniel Thornburgh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 10:45:12 PDT 2022


mysterymath created this revision.
mysterymath added reviewers: phosek, noajshu, tstellar, dblaikie.
Herald added subscribers: hiraditya, mgorny.
Herald added a project: All.
mysterymath requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121720

Files:
  llvm/include/llvm/Debuginfod/HTTPClient.h
  llvm/lib/Debuginfod/Debuginfod.cpp
  llvm/lib/Debuginfod/HTTPClient.cpp
  llvm/unittests/Debuginfod/CMakeLists.txt
  llvm/unittests/Debuginfod/HTTPClientTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121720.415499.patch
Type: text/x-patch
Size: 14342 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220315/b01e9e8d/attachment.bin>


More information about the llvm-commits mailing list