The "correct" way to do it, i.e. the way that is specified in the HTTP RFC, is \x0D\x0A\x0D\x0A. However, most cgi scripts written for Un*x only print two linefeeds. Most browsers out there today will handle only two linefeeds. No browsers today will handle two carriage returns, the Macintosh standard for text. Now, this all doesn't really matter, because whatever line ending you use will be translated to \x0D\x0A by the MacPerl CGI glue. You only need to worry about what you put if the script will need to be cross platform. HTH, --Quentin ----- Original Message ----- From: "Joel Rees" <rees_joel@fujicomp.co.jp> To: <macperl-webcgi@macperl.org>; <steffen@biomedcomp.com> Sent: Monday, June 26, 2000 10:15 PM Subject: Re: [MacPerl-WebCGI] dynamic Gifs with MacPerl under MacHTTP 2.2 > > I think you should be using a different newline in your print > >statements. The http specs call for a newline of \x0D\x0A. What you > >have above will generate newlines of \x0A under Unix, and \x0D under > >MacOS. (Newlines only matter in the header; in the body of the > >document they usually are irrelevant.) > > Hey, I have been running around assuming that "\n" was portable and would > go out as the appropriate newline sequence for the system the server was > running on. I've seen scripts with "\n\n" on the Content-Type line from > sources I thought I trusted and some combination of "\n" and "\r" (One of > each, so only one effective newline! That script was running on NT.), > from one source I thought I didn't really trust. The scripts I have put > on our rental server seem to work fine with "\n\n". Now I recall reading > somewhere that the web newline is in fact the combo. One empty line > should follow the Content-Type line, so, should the ends of our > Content-Type lines in fact be "\n\r\n\r"? Or even "\0d\0a\0d\0a", to > avoid portability conversions? > > Joel > > rees_joel@fujicomp.co.jp > http://www.fujicomp.co.jp > http://www.udit.gr.jp > > > ==== Want to unsubscribe from this list? > ==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org > ==== Want to unsubscribe from this list? ==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org