LWP error with 'short' 304 returns
Norris Couch (couch@vnet.ibm.com)
Thu, 02 Jan 1997 08:30:43 -0600 (CST)
Ok,as suggested offline (thanks Martijn), I have upgraded to 5.05 (This
is lwp-request version 1.26 (libwww-perl-5.05)) to see if that fixes the
error I posted in late December.
It does not. I don't know if the server is failing to return a
correctly formatted response or LWP has a bug.
This site appears to return just 29 bytes consisting of 'HTTP/1.0 304
Not Modified<crlf><crlf>'.
I did not use a proxy this time, eliminating my proxy as the source of
this error. The failing site is www.dbc.com.
To see the error:
1) use lwp-request to get http://www.dbc.com/blq/usaweb/usatoday.gif
2) use whatever tool you have to set the date/time of usatoday.gif
to 19 Mar 1996 20:30:16 GMT
3) use lwp-request again with '-i usatoday.gif'
The expected result is 304. www.dbc.com in fact returns 304. LWP,
based on -x output below, returns a 500 error.
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::simple_request: GET http://www.dbc.com/blq/usaweb/usatoday.gif
LWP::UserAgent::_need_proxy: (http://www.dbc.com/blq/usaweb/usatoday.gif)
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Socket::new: Socket GLOB(0x423f88c)
LWP::Socket::connect: (www.dbc.com, 80)
LWP::Socket::_getaddress: resolving host 'www.dbc.com'...
LWP::Socket::_getaddress: ...204.162.156.2
LWP::Socket::connect: Connecting to host 'www.dbc.com' on port '80'...
LWP::Socket::write: ()
LWP::IO::write: Write 140 bytes: 'GET /blq/usaweb/usatoday.gif HTTP/1.0
Host: www.dbc.com
If-Modified-Since: Tue, 19 Mar 1996 20:30:16 GMT
User-Agent: lwp-request/1.26
'
LWP::Socket::write: ()
LWP::Protocol::http::request: reading response
LWP::Socket::read_until: ('\r?\n',...)
LWP::IO::read: Read 29 bytes
LWP::IO::read: HTTP/1.0 304 Not Modified
LWP::Protocol::http::request: HTTP/1.0 server
LWP::Protocol::http::request: reading rest of response header
LWP::Socket::read_until: ('\r?\n\r?\n',...)
LWP::IO::read: Read 0 bytes
LWP::UserAgent::request: Simple result: Internal Server Error
An Error Occurred
An Error Occurred
500 - Unexpected EOF.