On 21.01.2010 08:20, wr...@apache.org wrote: > Author: wrowe > Date: Thu Jan 21 07:19:41 2010 > New Revision: 901578 > > URL: http://svn.apache.org/viewvc?rev=901578&view=rev > Log: > Correctly align the behavior of headers_in to be consistent with the > treatment of headers_out, resolving PR 48359 by keeping subrequest > scope changes out of the main request headers. This ensures that all > requests-without-bodies behave as the requests-with-bodies code has. > > Modified: > httpd/httpd/trunk/CHANGES > httpd/httpd/trunk/modules/http/http_request.c > httpd/httpd/trunk/modules/metadata/mod_headers.c > httpd/httpd/trunk/server/protocol.c > > Modified: httpd/httpd/trunk/modules/http/http_request.c > URL: > http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_request.c?rev=901578&r1=901577&r2=901578&view=diff > ============================================================================== > --- httpd/httpd/trunk/modules/http/http_request.c (original) > +++ httpd/httpd/trunk/modules/http/http_request.c Thu Jan 21 07:19:41 2010 > @@ -442,7 +442,7 @@ > new->request_time = r->request_time; > new->main = r->main; > > - new->headers_in = r->headers_in; > + new->headers_in = apr_table_copy(r->pool, r->headers_in); > new->headers_out = apr_table_make(r->pool, 12); > new->err_headers_out = r->err_headers_out; > new->subprocess_env = rename_original_env(r->pool, r->subprocess_env); > @@ -515,6 +515,8 @@ > r->per_dir_config = rr->per_dir_config; > /* copy output headers from subrequest, but leave negotiation headers */ > r->notes = apr_table_overlay(r->pool, rr->notes, r->notes); > + r->headers_in = apr_table_overlay(r->pool, rr->headers_in, > + r->headers_in);
I think this is wrong. Think of the case where the subrequest does not change anything on headers_in. In this case the contents of headers_in of the request and the subrequest are the same (the subrequest has a copy of the requests table). Doing an apr_table_overlay would result in a table that has all key value pairs of the original headers_in doubled. Regards RĂ¼diger