Scamper woes - was: genuine squeak newbie

Bruce ONeel beoneel at mindspring.com
Tue Jun 22 11:52:16 UTC 1999


Hi,
  Teach me to reply before I read all of my mail...

Yep, poking around in http://www.w3.org/Protocols/rfc2068/rfc2068.txt shows that CRLF is manditory:

   HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all
   protocol elements except the entity-body (see appendix 19.3 for Tolerant Applications) 

though 19.3 says:

   The line terminator for message-header fields is the sequence CRLF.
   However, we recommend that applications, when parsing such headers,
   recognize a single LF as a line terminator and ignore the leading CR.

cheers

bruce



Tim Olson <tim at jumpnet.com> wrote:
> >>From the HTTP 1.1 RFC:
> >
> >The individual values of the numeric status codes defined for
> >   HTTP/1.1, and an example set of corresponding Reason-Phrase's, are
> >   presented below. The reason phrases listed here are only recommended
> >   -- they may be replaced by local equivalents without affecting the
> >   protocol.
> >
> >A client should look at the 200 and not the message. The message is for
> >some human to read.
> 
> Thanks.  Being an HTML newbie, I keyed on the "data follows" message, 
> which I couldn't find reported from other servers (e.g. cnn.com; they 
> just report "OK").  However, that turned out not to be the real problem.
> 
> The problem is that Scamper is expecting lines returned from the server 
> to be terminated by carriage-return, linefeed pairs.  When the server for 
>  http://www.libertybasic.com starts to return the requested JPEG image, 
> it responds with:
> 
> HTTP/1.0 200 Document follows
> Date: Mon, 21 Jun 1999 23:03:32 GMT
> Server: 
> NCSA/1.4.2
> Content-type: image/jpeg
> Last-modified: Tue, 02 Mar 1999 
> 04:30:58 GMT
> Content-length: 8044
> 
> ÿý 
> Technologies
> ...
> with all the lines being terminated by a single Lf, not a CrLf pair.
> 
> 
> This causes HTTPSocket>>getResponseUpTo: to fail, returning the entire 
> contents as the header, and it all goes downhill from there.
> 
> So is CrLf response line termination mandatory in HTML, or is it just the 
> most common?
> 
> 
> 
>      -- tim





More information about the Squeak-dev mailing list