Re: CGI - carriage-return for new lines?
Davide Baldini <baldiniebaldini <at> gmail.com>
2012-02-28 12:36:15 GMT
On 02/28/12 10:40, Stefan Bühler wrote:
> If you are talking about writing a CGI script in bash and want to read
> the request body, there is not much lighttpd can do for you - it doesn't
> touch the body (the headers are passed in environment variables)
Thank you Stefan, I don't know HTTP details and I wasn't aware that the
request-body sent to CGI scripts by standard input is directly generated
by the client's user agent.
However, looking back to the CGI specification (*), the request-body is
defined simply as an OCTET stream of data, octet being an undefined
keyword (perhaps it refers to HTTP spec?), without recognizing the
existence of text lines and their possible breaking character sequences.
I wonder if servers are required to pass these OCTETs unaltered or if
they are free to adapt the text encode to the one used by the platform,
of course only in the ambit of text type MIMEs.
(*) request-body section: http://tools.ietf.org/html/rfc3875#page-20