| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Signed-off-by: Ram-blip <ramcruze2000@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #5564 +/- ##
=======================================
Coverage 93.44% 93.44%
=======================================
Files 110 110
Lines 37434 37438 +4
=======================================
+ Hits 34979 34984 +5
+ Misses 2455 2454 -1 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This relates to...
interceptors.decompress() currently attempts to initialize a decoder for HEAD responses when the server includes a supported Content-Encoding.
Because a valid HEAD response contains no response body, the decoder receives no compressed data and response.body.text() rejects with:
The interceptor also removes Content-Encoding and Content-Length, even though those headers describe the corresponding GET representation and are valid metadata on a HEAD response.
Rationale
HTTP HEAD responses must not include response content, but their representation headers describe the response that would have been returned for a corresponding GET.
Undici’s Fetch implementation already skips response decoding for HEAD. The decompression interceptor should do the same rather than creating an empty decoder and removing representation metadata.
Changes
Features
N/A
Bug Fixes
Breaking Changes and Deprecations
None.
Testing
Status