diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-21 15:55:08 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-21 15:55:08 +0000 |
| commit | 68cca2e28a5edc9b8da72f483980818e4a13fb52 (patch) | |
| tree | a8ab5126d094dd1879a0926102f168434cb637f2 /docs/how-to | |
| parent | 7da6c0c601d276340fada02d4bd45080d927a16b (diff) | |
fix(http): decompress gzip-encoded git request bodies
Modern git clients send Content-Encoding: gzip on POST requests to
/git-upload-pack for efficiency. Without decompression, the compressed
binary data was passed directly to git upload-pack, which expected
pkt-line format, causing:
fatal: protocol error: bad line length character: ??
error: RPC failed; HTTP 500
This was discovered in production when git clone requests consistently
failed with HTTP 500 errors. The fix extracts the Content-Encoding
header and uses flate2::GzDecoder to decompress gzip bodies before
passing them to the git subprocess.
Diffstat (limited to 'docs/how-to')
0 files changed, 0 insertions, 0 deletions