apache2 2.4.41-4ubuntu3.17 defaults to transfer-encoding=chunked where this is undesired
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apache2 (Ubuntu) |
Invalid
|
Undecided
|
Marc Deslauriers |
Bug Description
We (autopkgtest.
This was problematic for us - we serve static files through apache and seemingly after this version bump, our transfer encodings are now ALWAYS set to be "chunked".
This is an issue, as we have external services which periodically download these static files I've mentioned, which need to check the Content-Length header whilst downloading these files.
I've manually installed 2.4.41-4ubuntu3.16 on our staging servers and verified that this patch is indeed the root cause of the issue.
with 2.4.41-4ubuntu3.16:
```
wget -v -d https:/
...
---request begin---
GET /static/
Host: autopkgtest.
User-Agent: Wget/1.21.3
Accept: */*
Accept-Encoding: identity
Connection: Keep-Alive
---request end---
HTTP request sent, awaiting response... w
---response begin---
HTTP/1.1 200 OK
date: Tue, 16 Apr 2024 10:15:41 GMT
server: Apache/2.4.41 (Ubuntu)
cache-control: public, max-age=60
expires: Tue, 16 Apr 2024 10:16:41 GMT
accept-ranges: bytes
content-length: 1434976256
last-modified: Tue, 16 Apr 2024 10:14:27 GMT
etag: "1713262467.
content-type: application/
set-cookie: SRVNAME=S0; path=/
---response end---
200 OK
Stored cookie autopkgtest.
Registered socket 3 for persistent reuse.
Length: 1434976256 (1.3G) [application/
Saving to: ‘autopkgtest.db’
```
with 2.4.41-4ubuntu3.17:
```
---request begin---
GET /static/
Host: autopkgtest.
User-Agent: Wget/1.21.3
Accept: */*
Accept-Encoding: identity
Connection: Keep-Alive
---request end---
HTTP request sent, awaiting response...
---response begin---
HTTP/1.1 200 OK
date: Tue, 16 Apr 2024 10:23:50 GMT
server: Apache/2.4.41 (Ubuntu)
cache-control: public, max-age=60
expires: Tue, 16 Apr 2024 10:24:51 GMT
accept-ranges: bytes
last-modified: Tue, 16 Apr 2024 10:23:27 GMT
etag: "1713263007.
transfer-encoding: chunked
content-type: application/
set-cookie: SRVNAME=S0; path=/
---response end---
200 OK
Stored cookie autopkgtest.
Registered socket 3 for persistent reuse.
Length: unspecified [application/
Saving to: ‘autopkgtest.db’
```
And you can clearly see the content length isn't reported.
Is this the intended behaviour? Are there ways I can workaround this to not use chunked transfer encoding?
Thanks for filing this bug, I'll investigate the changes and will report back.
Have you seen this behaviour on anything other than focal?