On Thu Apr 03 17:02:57 2008, kevinconaway wrote:
Show quoted text> On Thu Apr 03 16:27:32 2008, GAAS wrote:
> > LWP needs to behave as prescribed by the HTTP protocol. How can LWP
> > determine when there will not be a body? Is this a specific server's
> > misbehaviour it needs to work-around?
>
> If the server doesn't send a Content-Length or Transfer-Encoding header,
> then it is safe to assume that there is no response body
The HTTP spec says that it should then read everything until EOF unless
it's a 1xx, 204 or 304 reply. The rules for how to determine the
response body length are:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4
That the method of the request is PUT should not influence anything.
I don't understand why the "read until EOF" rule would not do the right
thing in your example. Are you able to provide an example program that
fails against some public server?