[PATCH] httpd: Support "Status: " header in CGI script

Alex Landau landau_alex at yahoo.com
Wed Aug 8 12:09:27 UTC 2007


Hi,

The attached patch adds to httpd support for a Status header.
This header (as per the CGI spec) is used by CGI scripts to ask the server to send an
HTTP response different than 200. Why is it needed, and why the script can't send the
"HTTP/1.0 302 Found" (or similar) by itself is beyond me...
PHP (at least in CGI mode) sends "Status: 302" and the appropriate Location when running
header('Location: something'). That was my motivation for the patch.

Due to efficiency and space considerations, when httpd receives a "Status: xxx" header it
sends "HTTP/1.0 xxx" without the textual code representation (e.g. "HTTP/1.0 302" instead
of "HTTP/1.0 302 Found"). This works at least with Firefox 2.0.0.6 on Linux and IE 6 on,
well..., Windows.
If you think it's worth it, I can add proper message ("Found" etc.) handling.

Alex


       
____________________________________________________________________________________
Choose the right car based on your needs.  Check out Yahoo! Autos new Car Finder tool.
http://autos.yahoo.com/carfinder/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: httpd.patch
Type: text/x-patch
Size: 947 bytes
Desc: 4014077785-httpd.patch
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070808/f5c26d95/attachment-0002.bin 


More information about the busybox mailing list