I
Iñaki Baz Castillo
Hi, I've detected a bug in HTTPClient when receiving a 304 with no
Content-Length.
According to RFC 2616:
------------
4.4 Message Length
The transfer-length of a message is the length of the message-body as
it appears in the message; that is, after any transfer-codings have
been applied. When a message-body is included with a message, the
transfer-length of that body is determined by one of the following (in
order of precedence):
1.Any response message which "MUST NOT" include a message-body (such
as the 1xx, 204, and 304 responses and any response to a HEAD request)
is always terminated by the first empty line after the header fields,
regardless of the entity-header fields present in the message
------------
This means that a 304 doesn't require "Content-Length: 0" at all, and
HTTPClient shouldn't wait and look for it. Unfortunatelly HTTPClient
waits for it and creates ReceiveTimeoutError exception).
I've already reported the bug in the project tracker but have received
no reply at all fro the author (I also wrote him directly with no
success):
http://dev.ctor.org/http-access2/ticket/224
As you can see in the tracker, I also tryed to fix it but found some
problems I cannot solve. Anyway I think it's a easy fix for a more
experimented programmer
could you please help me on fixing it?
Thanks a lot.
--=20
I=C3=B1aki Baz Castillo
<[email protected]>
Content-Length.
According to RFC 2616:
------------
4.4 Message Length
The transfer-length of a message is the length of the message-body as
it appears in the message; that is, after any transfer-codings have
been applied. When a message-body is included with a message, the
transfer-length of that body is determined by one of the following (in
order of precedence):
1.Any response message which "MUST NOT" include a message-body (such
as the 1xx, 204, and 304 responses and any response to a HEAD request)
is always terminated by the first empty line after the header fields,
regardless of the entity-header fields present in the message
------------
This means that a 304 doesn't require "Content-Length: 0" at all, and
HTTPClient shouldn't wait and look for it. Unfortunatelly HTTPClient
waits for it and creates ReceiveTimeoutError exception).
I've already reported the bug in the project tracker but have received
no reply at all fro the author (I also wrote him directly with no
success):
http://dev.ctor.org/http-access2/ticket/224
As you can see in the tracker, I also tryed to fix it but found some
problems I cannot solve. Anyway I think it's a easy fix for a more
experimented programmer
could you please help me on fixing it?
Thanks a lot.
--=20
I=C3=B1aki Baz Castillo
<[email protected]>