ERROR 'server aborted early'

Ned Konz ned at squeakland.org
Thu Dec 16 17:16:16 UTC 2004


On Thursday 16 December 2004 12:08 am, Dan Corneanu wrote:
> Ned Konz wrote:
> >On Tuesday 14 December 2004 11:53 pm, Dan Corneanu wrote:
> >>I've made some tests (with telnet and ethereal) and found out that if I
> >>change the HTTPSocket class>>httpGetDocument: args: accept: request: to
> >> not use the port in the GET requeast (Host: www.btrl.ro instead of Host:
> >> www.btrl.ro:80)
> >
> >Yes, I noticed that omitting the HOST header would keep it from dying.
> >
> >Still, that should be a legal HTTP/1.0 header, even with the 80.
>
> Is it? I have searched the HTTP/1.0 RFC
> (http://www.faqs.org/rfcs/rfc1945.html) and it seems there is no Host
> header.

Still, parts 4.3 and 5.2 say (of General and Request headers):

  Unrecognized header fields are treated as Entity-Header fields.

And part 7.1 says (of Entity Header fields):

  The extension-header mechanism allows additional Entity-Header fields
   to be defined without changing the protocol, but these fields cannot
   be assumed to be recognizable by the recipient. Unrecognized header
   fields should be ignored by the recipient and forwarded by proxies.


So by my reading of this, if the server doesn't recognize our Host: header as 
being a valid HTTP/1.0 header, it should just ignore it.

> Maybe I'm wrong, I never delved so deep in protocol implementations,
> RFCs etc.
> Is there some support for HTTP/1.1 in squeak?

Not particularly. We'd have to handle chunked encoding (not that this is all 
that hard, but we haven't done it yet). However, it would be more efficient 
(because we can re-use a connection) when getting multiple documents.

> >Perhaps this is a broken server. I get the same result from lwp-request or
> >wget when I add the HOST header.

-- 
Ned Konz
http://bike-nomad.com/squeak/



More information about the Squeak-dev mailing list