Edit history
Earlier versions of Content-Length duplicated in headers for media files from s3 buckets, newest first.
Current version | Edited by Rex
Changes
3. check the response header and note the duplicate content-length. Removed: -### Environment (optional)Removed: -Removed: -_No response_Removed: -Removed: -### Logs or screenshots (optional)Removed: -Removed: -_No response_Removed: -Removed: -### ChecksRemoved: -Removed: -- ☑ I searched for existing issues and didn't find a duplicate.Removed: -
Show
Content-Length duplicated in headers for media files from s3 buckets
Summary
# curl -sv http://127.0.0.1:8088/media/icons/1483528200372891649/3a5ab250.webp?size=160 -o /dev/null
* Trying 127.0.0.1:8088...
* Connected to 127.0.0.1 (127.0.0.1) port 8088
> GET /media/icons/1483528200372891649/3a5ab250.webp?size=160 HTTP/1.1
> Host: 127.0.0.1:8088
> User-Agent: curl/8.5.0
> Accept: */*
>
< HTTP/1.1 200 OK
< accept-ranges: bytes
< access-control-allow-origin: *
< cache-control: public, max-age=31536000
< content-length: 5190
< content-type: image/webp
< date: Thu, 19 Mar 2026 05:41:47 GMT
< expires: Fri, 19 Mar 2027 05:41:47 GMT
< last-modified: Thu, 19 Mar 2026 05:41:47 GMT
< vary: Accept-Encoding, Range
< x-request-id: 7b3ec127-4197-4b21-bc39-87dd66010b16
< Content-Length: 5190
< Connection: keep-alive
< Keep-Alive: timeout=5
<
{ [5190 bytes data]
* Connection #0 to host 127.0.0.1 left intact
Since the headers are invalid, the server refuses to serve the files.
This is a self-hosted instance on the latest pull of /refactor.
Steps to reproduce
- upload any file on a self hosted instance, for example an avatar
- watch the browser console for a 502 error.
- check the response header and note the duplicate content-length.
Original by Rex
Show
Content-Length duplicated in headers for media files from s3 buckets
Summary
# curl -sv http://127.0.0.1:8088/media/icons/1483528200372891649/3a5ab250.webp?size=160 -o /dev/null
* Trying 127.0.0.1:8088...
* Connected to 127.0.0.1 (127.0.0.1) port 8088
> GET /media/icons/1483528200372891649/3a5ab250.webp?size=160 HTTP/1.1
> Host: 127.0.0.1:8088
> User-Agent: curl/8.5.0
> Accept: */*
>
< HTTP/1.1 200 OK
< accept-ranges: bytes
< access-control-allow-origin: *
< cache-control: public, max-age=31536000
< content-length: 5190
< content-type: image/webp
< date: Thu, 19 Mar 2026 05:41:47 GMT
< expires: Fri, 19 Mar 2027 05:41:47 GMT
< last-modified: Thu, 19 Mar 2026 05:41:47 GMT
< vary: Accept-Encoding, Range
< x-request-id: 7b3ec127-4197-4b21-bc39-87dd66010b16
< Content-Length: 5190
< Connection: keep-alive
< Keep-Alive: timeout=5
<
{ [5190 bytes data]
* Connection #0 to host 127.0.0.1 left intact
Since the headers are invalid, the server refuses to serve the files.
This is a self-hosted instance on the latest pull of /refactor.
Steps to reproduce
- upload any file on a self hosted instance, for example an avatar
- watch the browser console for a 502 error.
- check the response header and note the duplicate content-length.
Environment (optional)
No response
Logs or screenshots (optional)
No response
Checks
- ☑ I searched for existing issues and didn't find a duplicate.