On Aug 4, 2007, at 7:58 AM, Ruediger Pluem wrote:
On 07/31/2007 08:52 PM, Ruediger Pluem wrote:
On 07/31/2007 04:54 PM, wrote:
Author: gregames
Date: Tue Jul 31 07:54:46 2007
New Revision: 561352
URL: http://svn.apache.org/viewvc?view=rev&rev=561352
Log:
this appears to be a "mv" rather than a "swap", so we should be
able to
simplify & shave off a couple of cycles.
Modified:
httpd/httpd/trunk/modules/http/http_protocol.c
Modified: httpd/httpd/trunk/modules/http/http_protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/
http_protocol.c?view=diff&rev=561352&r1=561351&r2=561352
====================================================================
==========
--- httpd/httpd/trunk/modules/http/http_protocol.c (original)
+++ httpd/httpd/trunk/modules/http/http_protocol.c Tue Jul 31
07:54:46 2007
@@ -1138,7 +1138,6 @@
}
if (!r->assbackwards) {
- apr_table_t *tmp = r->headers_out;
/* For all HTTP/1.x responses for which we generate the
message,
* we need to avoid inheriting the "normal status"
header fields
@@ -1146,7 +1145,6 @@
* error or redirect, except for Location on external
redirects.
*/
r->headers_out = r->err_headers_out;
- r->err_headers_out = tmp;
apr_table_clear(r->err_headers_out);
if (ap_is_HTTP_REDIRECT(status) || (status ==
HTTP_CREATED)) {
IMHO this is wrong. Lets take the following example:
r->headers_out points to a table T1 containing the key value pairs
((A1,a1), (B1,b1)).
r->err_headers_out points to a table T2 containing the key value
pairs ((A2,a2), (B2,b2)).
After running thru the old code (until after the apr_table_clear)
the the result is:
r->headers_out points to table T2 containing the key value pairs
((A2,a2), (B2,b2)).
r->err_headers_out points to table T1 which is empty.
Using the new code the result is
r->headers_out points to table T2.
r->err_headers_out points to table T2.
T2 is empty.
So r->headers_out and r->err_headers_out point to the *same* table
and this table is *empty*.
So we loose *all* output headers for further processing.
Ping? Any comments?
Looks like a viable and reasonable (and required) reversal of
the patch is required...