Skip to content

Transfer-Encoding: chunked is added on 304 Not Modified #2415

@noahzarroubique

Description

@noahzarroubique

Description

When I send a request through Proxyman that gets back 304 Not Modified, Proxyman adds Transfer-Encoding: chunked to it. This causes my HTTP client to crash. Eventhough this is allowed (https://datatracker.ietf.org/doc/html/rfc9112#section-6.1-9), I don't think that Proxyman should do this, I would expect to get back the untampered response.

Steps to Reproduce

curl --header Accept: --compressed --header "Accept-Language: en-gb" --header "Connection: Keep-Alive" --cookie "XXX" --header "If-None-Match: W/"0c9a7c544b1ad6978997a51e542711f5d@2025-07-14T16:18:51.688479978+02:00"" --header "USE-CASE: JOURNEY_COMPANION" --user-agent "XXX" --header "X-API-AUTHORIZATION: XXX" --header "X-API-DATE: 2025-07-14" --header "X-APP-TOKEN: XXX" https://int-latest.vnext-nonprod.app.sbb.ch/api/timetable/v1/trip/XXX/journey-companion -k --proxy localhost:9090 -iv --raw

it produces:

* Request completely sent off
* schannel: remote party requests renegotiation
* schannel: renegotiating SSL/TLS connection
* schannel: SSL/TLS connection renegotiated
* schannel: server close notification received (close_notify)
< HTTP/1.1 304 Not Modified
HTTP/1.1 304 Not Modified
< Date: Mon, 14 Jul 2025 13:28:06 GMT
Date: Mon, 14 Jul 2025 13:28:06 GMT
< Connection: close
Connection: close
< etag: W/"0c9a7c544b1ad6978997a51e542711f5d@2025-07-14T16:18:51.688479978+02:00"
etag: W/"0c9a7c544b1ad6978997a51e542711f5d@2025-07-14T16:18:51.688479978+02:00"
< Cache-Control: max-age=60
Cache-Control: max-age=60
< x-content-type-options: nosniff
x-content-type-options: nosniff
< strict-transport-security: max-age=16070400; includeSubDomains
strict-transport-security: max-age=16070400; includeSubDomains
< x-frame-options: DENY
x-frame-options: DENY
< x-xss-protection: 0
x-xss-protection: 0
< referrer-policy: no-referrer
referrer-policy: no-referrer
< cf-cache-status: DYNAMIC
cf-cache-status: DYNAMIC
< Server: cloudflare
Server: cloudflare
< CF-RAY: 95f15c7d6a25bf94-WAW
CF-RAY: 95f15c7d6a25bf94-WAW
< Transfer-Encoding: chunked
Transfer-Encoding: chunked
<

* shutting down connection #0

while Proxyman shows:

HTTP/1.1 304 Not Modified
Date: Mon, 14 Jul 2025 13:28:06 GMT
Content-Length: 0
Connection: keep-alive
etag: W/"0c9a7c544b1ad6978997a51e542711f5d@2025-07-14T16:18:51.688479978+02:00"
Cache-Control: max-age=60
x-content-type-options: nosniff
strict-transport-security: max-age=16070400; includeSubDomains
x-frame-options: DENY
x-xss-protection: 0
referrer-policy: no-referrer
cf-cache-status: DYNAMIC
Server: cloudflare
CF-RAY: 95f15c7d6a25bf94-WAW

Current Behavior

Note that Proxyman does not show Transfer-Encoding: chunked but in the curl log it is visible that the header must have been added.

Expected Behavior

No Transfer-Encoding: chunked header should be added

Environment

  • App version: Proxyman Version 2.26.0 (22600) | Windows (Build 10.0.26100)
  • macOS version: Windows 11

Metadata

Metadata

Assignees

Labels

bugSomething isn't working✅ DoneTicket is addressed and fixed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions