From: Robert Date: 2004-02-22T11:14:53+09:00 Subject: Re: Puzzling... Robert Klemme wrote: > "Charles Comstock" schrieb im Newsbeitrag > news:c18g6f$maq$2@newsreader.wustl.edu... > >>Charles Comstock wrote: >> >> >>>Robert wrote: >>> >>> >>>>Jon A. Lambert wrote: >>>> >>>> >>>>>"Ruby Tuesday" wrote: >>>> >>>> >>>> >>>> >>>>>BTW this is incorrect. >>>>>print "Content-type: text/html \n\n\n" >>>>> >>>>>It should be >>>>>print "Content-type: text/html \r\n\r\n" >>>>> >>>>> >>>> >>>>Is that a Ruby thing? That certainly isn't how Perl does it. Perl does >>>>the following: >>>> >>>>print "Content-type: text/html\n\n"; >>>> >>>>Which I believe is the standard header. >>> >>> >>>I'm pretty sure under the rfs your supposed to do \r\n\r\n, but I think >>>most servers are setup to just look for a single blank line before >>>actual content, and so they generally just look for a \n and thus the >>>\n\n works. But technically it's supposed to be \r\n\r\n I think. >>> >>>Charles Comstock >> >>Oops dunno what I was typing, I meant RFC, not rfs, >> >>Charles Comstock > > > Nevertheless you are right. The RFC requires \r\n sequences as line > termination in an HTTP header. Never mind what "Perl does", it's better to > just comply to the standard - "Better safe than sorry." :-) > > See > http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.1 > > Regards > > robert > I would agree except every tutorial I have ever seen on it uses \n\n and not the other.