You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ben Laurie <be...@algroup.co.uk> on 1998/04/12 13:32:33 UTC
Cockup in util_script?
I was poking around in scan_script_header_err_core() today, and noticed
this:
else if (!strcasecmp(w, "Status")) {
sscanf(l, "%d", &r->status);
r->status_line = ap_pstrdup(r->pool, l);
}
.
.
.
else if (!strcasecmp(w, "Status")) {
ap_table_set(r->headers_out, w, l);
cgi_status = atoi(l);
}
obviously, the first one prevents the second from ever happening. This
means cgi_status never gets set, which also means that the return of
ap_meets_conditions() is always used. Also, status is not added to
r->headers_out. The obvious fix is to merge the two, but is it a good
idea???
Also, obviously, the fix that keeps the behaviour as it currently is, is
to delete the second one, but I suspect that isn't the thing to do.
Thoughts?
Cheers,
Ben.
--
Ben Laurie |Phone: +44 (181) 735 0686| Apache Group member
Freelance Consultant |Fax: +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd, |Apache-SSL author http://www.apache-ssl.org/
London, England. |"Apache: TDG" http://www.ora.com/catalog/apache
Re: Cockup in util_script?
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Ben Laurie wrote:
>
> obviously, the first one prevents the second from ever happening. This
> means cgi_status never gets set, which also means that the return of
> ap_meets_conditions() is always used. Also, status is not added to
> r->headers_out. The obvious fix is to merge the two, but is it a good
> idea???
On only one part of this: "Status" is a CGI-header, not an
HTTP-header, and so *shouldn't* go into r->headers_out. It's
part of the script/server communication, not script/client.
Of course, that means that the second portion is no good
in its entirety. My WAG would be that the second case should
be zapped, and the setting of cgi_status should be moved into
the first case - but that's without examining its usage in
detail.
#ken P-)}
Ken Coar <http://Web.Golux.Com/coar/>
Apache Group member <http://www.apache.org/>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>