Re: cgiuser-httpd?

"David Phillips" <[email protected]> Fri, 17 Jan 2003 16:50:30 -0600
Newsgroups gmane.comp.djb.publicfile
Message-ID <007901c2be7a$d644dd00$0201a8c0@brinstar>
Russell Nelson writes:
> @400000003e288281121595d4 19971 < Connection: Keep-Alive, TE
> @400000003e2882811216f94c 19971 < TE: deflate, gzip, chunked,
> identity, trailers
> @400000003e28828112bcd63c 19971 <
> @400000003e28828215016b24 19971 > Content-Type: text/html
> @400000003e2882821501f3dc 19971 >
> @400000003e2882821502325c 19971 >
> @400000003e288282150270dc 19971 > <!DOCTYPE HTML PUBLIC "-//IETF//DTD
> HTML//EN">

I don't see an HTTP response at all.

``cgiuser-httpd reads an HTTP request message from standard input, and
treats the URI path as the name of a CGI script.  The script is expected to
print its reply to standard output.''

It looks like cgiuser-httpd expects the script to provide the entire HTTP
response, including the "HTTP/1.0 200 OK".  If this is the case, then the
documentation for cgiuser-httpd should state that it runs non-header-parsed
scripts, as this differs from the CGI standard:

``Normally, scripts produce output which is interpreted and sent back to the
client. An advantage of this is that the scripts do not need to send a full
HTTP/1.0 header for every request.

``Some scripts may want to avoid the extra overhead of the server parsing
their output, and talk directly to the client. In order to distinguish these
scripts from the other scripts, CGI requires that the script name begins
with nph- if a script does not want the server to parse its header. In this
case, it is the script's responsibility to return a valid HTTP/1.0 (or
HTTP/0.9) response to the client.''

--
David Phillips <[email protected]>
http://david.acz.org/