Bug in HTTPClient (shouldn't look for body in 304 response)

  • Thread starter Iñaki Baz Castillo
  • Start date
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]>
 
E

Eric Hodel

Hi, I've detected a bug in HTTPClient when receiving a 304 with no
Content-Length.

Did you file a bug?

$ gem list -d httpclient

*** LOCAL GEMS ***

httpclient (2.1.5.2)
Author: NAKAMURA, Hiroshi
Homepage: http://dev.ctor.org/httpclient
Installed at: /Library/Ruby/Gems/1.8

gives something like the functionality of libwww-perl (LWP) in Ruby

It seems the homepage has a bug tracker...=
 
R

Ryan Davis

Yes (as I already told in my mail):

http://dev.ctor.org/http-access2/ticket/224

Unfortunately I get no response for this report.

One thing I can suggest is more code/patch, less English. Sometimes =20
the best response you'll get is status changes on the tickets. =20
Sometimes not... really depends on the author, their life, job, =20
relationships, phase of moon, etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,010
Latest member
MerrillEic

Latest Threads

Top