Project

General

Profile

Actions

Bug #2603

closed

GET method returns 400 if request contains "Content-length: 0"

Added by a3nm over 9 years ago. Updated almost 9 years ago.

Status:
Invalid
Priority:
Low
Category:
-
Target version:
-
ASK QUESTIONS IN Forums:

Description

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.

Actions #1

Updated by darix over 9 years ago

  • Status changed from New to Invalid

1.5. aka trunk is dead. dont use.

Actions #2

Updated by a3nm about 9 years ago

Indeed, the problem doesn't occur with lighttpd/1.4.31 as packaged by Debian. Thanks!

Actions #3

Updated by stbuehler almost 9 years ago

  • Target version deleted (1.5.0)
Actions

Also available in: Atom