[plt-scheme] Problems fetching page

From: Anton van Straaten (anton at appsolutions.com)
Date: Sat Apr 24 16:34:15 EDT 2004

Neil W. Van Dyke wrote:
> I believe HTTP protocol spec requires the CR to be there (although IIS
> is probably forgiving).

I checked, naturally you're correct (since I would also expect PLT to be
doing the right thing):
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html

> What I think might be happening to cause your change to work is that by
> removing the CRs you are changing the fragmentation or other other
> characteristic of the HTTP-Message or Request-Line across TCP packets
> and avoiding triggering a bug that's at the TCP level.  This sounds
> bizarre, but I verified octet-by-octet the requests at the HTTP level
> using a protocol sniffer -- something at a lower level seemed to be
> breaking things.

You're right, there's more to it than I thought.  I found that if the
http://getpost-impure-port procedure I mentioned is changed from this:

  (display s client->server)
  (display "\r\n" client->server)

to this:

  (display (string-append s "\r\n") client->server)

...it works fine.  That's very likely to do with how the packets are being
arranged, as you say.

One possibility is that the end of a packet is effectively being treated as
a CR character?!  That would suck if the request URL wrapped over a packet
boundary...

BTW, for anyone following along, the changes I'm describing to PLT code are
not intended for actual use, I'm just trying to pin down the problem with
this IIS 5.0 server.

Anton



Posted on the users mailing list.