Project

General

Profile

Bug #2603

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

Added by a3nm almost 5 years ago. Updated over 4 years ago.

Status:
Invalid
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-12-08
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

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.

History

#1

Updated by darix almost 5 years ago

  • Status changed from New to Invalid

1.5. aka trunk is dead. dont use.

#2

Updated by a3nm over 4 years ago

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

#3

Updated by stbuehler over 4 years ago

  • Target version deleted (1.5.0)

Also available in: Atom