in reply to Re: (Ovid) Re: Apache+cgi problem
in thread Apache+cgi problem

I can't find the link, but I seem to recall a response from Tom Christiansen to Abigail where he points out that the line endings are typically a non-issue. This is due to this being such a ubiquitous issue that every Web server (that I am aware of) checks the line endings and adjusts them as necessary. Otherwise, the vast majority of scripts ported to another OS could potentially die a horrible death.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Replies are listed 'Best First'.
Re: (Ovid) Re(3): Apache+cgi problem
by gellyfish (Monsignor) on Feb 16, 2002 at 18:36 UTC

    I remember the post on clpm too .... I think the point here is that what your program is emitting are CGI headers and not HTTP ones where the line separators should be as described. Indeed the draft CGI/1.2 Specification says :

       The server must translate the header data from the CGI
       header field syntax to the HTTP header field syntax if
       these differ. For example, the character sequence for
       newline (such as Unix's ASCII NL) used by CGI scripts 
       may not be the same as that used by HTTP (ASCII CR
       followed by LF). The server must also resolve any
       conflicts between header fields returned by the script
       and header fields that it would otherwise send itself.
    

    Update: I didn't find the original post to which Ovid referred however i did find This thread in CLPM which has all manner of good stuff in it

    /J\