don't wait for a message body that will never come. fixes 659
git-svn-id: file:///home/svn/framework3/trunk@7748 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
47fdec6ab3
commit
7427640fb0
|
@ -278,6 +278,15 @@ protected
|
|||
# no chunked transfer header, pretend this is the entire
|
||||
# buffer and call it done
|
||||
self.body_bytes_left = self.bufq.length
|
||||
elsif(not self.transfer_chunked and not self.headers['Content-Length'])
|
||||
# RFC 2616 says: "The presence of a message-body in a request
|
||||
# is signaled by the inclusion of a Content-Length or
|
||||
# Transfer-Encoding header field in the request's
|
||||
# message-headers."
|
||||
#
|
||||
# So if we haven't seen either a Content-Length or a
|
||||
# Transfer-Encoding header, there shouldn't be a message body.
|
||||
self.body_bytes_left = 0
|
||||
else
|
||||
# Otherwise we need to keep reading until EOF
|
||||
self.body_bytes_left = -1
|
||||
|
|
Loading…
Reference in New Issue