--- Denys Vlasenko <[EMAIL PROTECTED]> wrote:
> On Wednesday 08 August 2007 13:09, Alex Landau wrote:
> > 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.
>
> I committed a bit simpler version:
>
>
> /* "Status" header format is: "Status: 302 Redirected\r\n" */
> if (buf_count >= 8 && memcmp(rbuf, "Status: ", 8) == 0) {
> /* send "HTTP/1.0 " */
> if (full_write(s, HTTP_200, 9) != 9)
> break;
> rbuf += 8; /* skip "Status: " */
> count = buf_count - 8;
> buf_count = -1; /* buffering off */
> } else if (buf_count >= 4) {
>
> Can you test whether it works for you?
> --
> vda
>
Yes it does.
Thanks,
Alex
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox