On Tue, Dec 18, 2007 at 01:30:30PM +0100, Marco wrote:
Hello!
Sqwebmail work with apache, but no with hiawatha web server.
In the log file of the webserver is there:
non-RFC HTTP header ('\n' instead of '\r\n')
and sqwebmail won't start.
This is a "BUG!!!!" in the hiawatha web server, and therefore you should
take your complaint to them.
Point out to them the following explicit requirement in the CGI/1.2 draft
specification at http://cgi-spec.golux.com/
"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)."
Unfortunately, the CGI/1.1 specification was not so clear. However it does
say at http://hoohoo.ncsa.uiuc.edu/cgi/out.html
"The output of scripts begins with a small header. This header consists of
text lines, in the same format as an HTTP header, terminated by a blank line
(a line with only a linefeed or CR/LF)."
This makes it explicit that the blank line which separates the headers from
the body can consist of '\n' or '\r\n'. However there's no reason why header
lines themselves should have a different rule for their end-of-line
terminator, so by implication they can also be terminated by either '\n' or
'\r\n'
You'll find that many existing CGI applications generate native newline
sequences (i.e. '\n' under Linux). They can't all be rewritten to run under
this broken webserver.
So your options are:
(1) get this webserver fixed
(2) switch to a more standards-compliant webserver such as Apache
Finally, please read
http://www.catb.org/~esr/faqs/smart-questions.html#id270918
Hope this helps,
Brian.