On Wed, 31 May 2006 06:58:51 +0200 Marcus Glocker <[EMAIL PROTECTED]> wrote:
> On Wed, May 31, 2006 at 12:38:10AM -0400, Adam wrote: > > > > > #!/bin/sh > > > > > > > > echo "Content-Type: text/html" > > > > echo "" > > > > echo "I'm sorry Dave, I'm afraid I can't do that." > > > > HTTP headers are terminated by "\r\n" not "\n". > > Yes, correctly HTTP headers are terminated by "\r\n". But most > webservers also understand "\n" in case of a CGI header. And this > example generates "\n" not "\r\n": I know that example generates "\n" instead of "\r\n", that's why I said its wrong. Just because apache will fix your incorrect output, doesn't mean you should go ahead and write CGIs that way and rely on webservers to fix it for you. Not all of them will, and there's no benefit from doing it wrong. Adam