GET method returns 400 if request contains "Content-length: 0"
Testing at revision 2969 from trunk, GET requests containing "Content-length: 0" yield a 400 bad request response. For instance, the following works:
GET / HTTP/1.1 Host: localhost
but the following doesn't:
GET / HTTP/1.1 Host: localhost Content-Length: 0
I noticed this when using mitmproxy 0.8 which adds such a header.
This header is not useful, but I do not see why such requests should be rejected as per RFCs 2616 or 7230. I may have missed something, as I am not an expert, but otherwise I think this is a bug and the header should just be ignored.
Also available in: Atom