mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-01 10:16:09 +00:00

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