possible httpd applet bug?
Denis Vlasenko
vda.linux at googlemail.com
Sun Jan 7 21:22:44 UTC 2007
On Thursday 04 January 2007 15:28, Paul Albrecht wrote:
> The cgi program generates the http response not the busybox http server
> so it should be obvious that it must return a content-type header if one
> is required.
>
> What the busybox http server actually does now is checks the output for
> something that kinda sorta looks like a content-type header and if it
> doesn't find one it inserts a content-type header of text/plain which
> doesn't make sense for some cgi programs.
>
> Here's an example of a cgi program without a entity body:
>
> echo -e "HTTP/1.0 302 Found\r\nLocation: http://www.busybox.net\r\n\r\n"
>
> If you for some reason feel obligated to insert a content-type of
> text/plain if a cgi program doesn't return a response header that kinda
> sorta looks like a content-type header, then you should verify the http
> response includes a entity body before you return a content-type header.
Coomented out that part of httpd.c in svn.
Thanks for the explanation.
--
vda
More information about the busybox
mailing list