ProxymanApp / ProxymanApp/Proxyman
Scripting Tool turning 304 responses into 200 with non-empty body
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 7k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
Description
When using the Scripting Tool to forward requests to a local server, the request with status code 304 before forwarding will become 200, with a strange non-empty body, causing the browser failed to execute javascript code.
Steps to Reproduce
- Start a local http dev server.
- Enable system proxy in Proxyman (or using SwitchyOmega in a browser).
- Use Scripting Tool to redirect http requests (from https://example.com to http://localhost:8080).
- If local dev server returns 304 Not Modified, the browser may receives 200 OK with a strange body:
0
HTTP/1.1 304 Not Modified
Access-Control-Allow-Origin: *
Content-Type: application/javascript; charset=utf-8
Accept-Ranges: bytes
ETag: W/"182a1-eQ3lKViLjXY/D1cwx5lSaWKT2Io"
Content-Encoding: gzip
Date: Thu, 14 Dec 2023 07:05:26 GMT
Connection: keep-alive
Keep-Alive: timeout=5
transfer-encoding: chunked
0
Current Behavior
Response header received in Chrome (should be 304 Not Modified):
Response body received in Chrome (should be empty):
Corresponding request in Proxyman:
Script using in Proxyman:
Expected Behavior
Chrome received 304 Not Modified with an empty body, just as before it was forwarded.
Environment
- App version: Proxyman 4.14.0 (49500)
- macOS version: macOS Sonoma
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Scripting Tool request-forwarding path and reproduce the issue using a local HTTP server that returns 304 Not Modified, following the listed proxy and redirect steps. Trace how the forwarded response status, headers, chunked transfer, and body are handled; done means Chrome receives a 304 response with an empty body.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100