Hi,
I g-have a problem with HEAD requests : mitmproxy override Content-Length header and set it to 0.
Without mitmproxy:
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: max-age=86400
Connection: keep-alive
Content-Length: 1488324
Content-Type: application/epub+zip
Date: Mon, 29 Jun 2015 09:20:54 GMT
ETag: "559103d3-16b5c4"
Expires: Tue, 30 Jun 2015 09:20:54 GMT
Last-Modified: Mon, 29 Jun 2015 08:37:39 GMT
Server: nginx
With mitmproxy:
Accept-Ranges: bytes
Cache-Control: max-age=86400
Connection: keep-alive
Content-Length: 0
Content-Type: application/epub+zip
Date: Mon, 29 Jun 2015 09:48:54 GMT
Etag: "559103d3-16b5c4"
Expires: Tue, 30 Jun 2015 09:48:54 GMT
Last-Modified: Mon, 29 Jun 2015 08:37:39 GMT
Server: nginx
I looked in the code and I saw that the Content-Length is computed from the length of the body of the request. Or HEAD requests have no body but can have a Content-Length > 0.
I don't know how to fix the bug but if anyone has a solution, I would be happy.
Hi,
I g-have a problem with HEAD requests : mitmproxy override Content-Length header and set it to 0.
Without mitmproxy:
With mitmproxy:
I looked in the code and I saw that the Content-Length is computed from the length of the body of the request. Or HEAD requests have no body but can have a Content-Length > 0.
I don't know how to fix the bug but if anyone has a solution, I would be happy.