possible httpd applet bug?
Paul Albrecht
albrecht at rdi1.com
Thu Jan 4 06:28:16 PST 2007
On Wed, 2007-01-03 at 23:48 +0100, Denis Vlasenko wrote:
> On Wednesday 03 January 2007 19:37, Paul Albrecht wrote:
> > I think the fix is change the safe_read to a full_read so the status
> > line is handled correctly. There's no need for the busybox httpd server
> > to return the content-type header so that code should be deleted.
>
> If you have an URL or something which explains that GCIs _must_
> produce Content-Type header, I can put URL into the comment
> and delete the code.
>
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.
:)
> Meanwhile I am going to replace safe_read by full_read.
> Thanks for the bug report!
> --
>
> vda
More information about the busybox
mailing list