Can not follow code in LWP

Can not follow code in LWP

am 02.05.2007 04:00:48 von Khai

My code open a socket and talk HTTP/1.1 to a remote web server, but I
notice extra characters in the response, so I use lwp-download
http://www.genius.com/index.html and capture the response with a
packet analyzer (ethereal). The packet analyzer show 1ff8 after the
response header and a 0 at the end of the response. When I look at
the downloaded file, these characters are not there.

I tried this with another web server http://www.webex.com/index.html,
and see the same symptoms. Any idea what these characters are and
what lwp-download does with them?

Thanks
Khai

Re: Can not follow code in LWP

am 03.05.2007 04:17:09 von liam

On Tue, 1 May 2007, Khai wrote:

> My code open a socket and talk HTTP/1.1 to a remote web server, but I
> notice extra characters in the response, so I use lwp-download
> http://www.genius.com/index.html and capture the response with a
> packet analyzer (ethereal). The packet analyzer show 1ff8 after the
> response header and a 0 at the end of the response. When I look at
> the downloaded file, these characters are not there.
>
> I tried this with another web server http://www.webex.com/index.html,
> and see the same symptoms. Any idea what these characters are and
> what lwp-download does with them?

The response uses "Transfer-Encoding: chunked", which is described here in
the HTTP/1.1 spec:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14 .41
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6 .1

--
Liam Quinn