possible httpd applet bug?
Paul Albrecht
albrecht at rdi1.com
Wed Jan 3 10:37:20 PST 2007
On Wed, 2007-01-03 at 19:13 +0100, Giuseppe Ciotta wrote:
> Paul Albrecht wrote:
> > I have a question about the way the busybox httpd applet reads cgi
> > program output: Why is safe_read used rather than full_read?
> >
> > The problem with safe_read is you're not guaranteed the entire first
> > line of cgi output on the first read so the applet doesn't handle the
> > status line or content-type header correctly.
> >
> > Seems like if you don't want to read all the cgi output at once, then
> > you should buffer the first line, but I don't think it makes much of a
> > difference for busybox httpd.
> >
> > Paul Albrecht
> > _______________________________________________
> > busybox mailing list
> > busybox at busybox.net
> > http://busybox.net/cgi-bin/mailman/listinfo/busybox
> >
> I've noticed the same problem some time ago... see
> http://www.busybox.net/lists/busybox/2006-May/021421.html
Thanks for the pointer to your previous message. This is exactly the
same problem.
I don't think the busybox httpd server ever needs to return the
content-type header. It seems like it's just a kludge around the bug
handling the http status line.
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.
More information about the busybox
mailing list