[plt-scheme] Problems fetching page

From: Anton van Straaten (anton at appsolutions.com)
Date: Sat Apr 24 13:13:07 EDT 2004

I wrote:
> It looks to me as though redirection is not the problem.  If you telnet to
> port 80 on www.drv.dk and enter:
> GET / HTTP/1.1
> Host: www.drv.dk
> ...and press enter twice, you get back a response which shows the real
> page - a frameset which references default_frontpage.aspx - but appended
> that normal response is the server error you're seeing.

Hmm, I realized that what's actually happening is that it's a persistent
HTTP connection, so the server is waiting for another request after serving
the original page.  This is standard HTTP 1.1 behavior.  (I'm a relic from
the good old days of HTTP 1.0, when we weren't afraid to open a new
connection for every little GIF and dancing Java applet, dammit!)

If you send any data other than a valid HTTP request while it's waiting, you
get the server error.  Just sending a carriage return will trigger the
error, for example.

Get-impure-port is presumably not handling this correctly in some respect,
but I haven't looked at the source.  It would work correctly if you can set
get-impure-port to include the "Connection: close" header in the request,

GET / HTTP/1.1
Host: www.drv.dk
Connection: close


Posted on the users mailing list.