| [1505] | 1 | --- httpd-2.2.x/server/protocol.c       2010/03/02 04:00:01     917866 | 
|---|
 | 2 | +++ httpd-2.2.x/server/protocol.c       2010/03/02 04:01:29     917867 | 
|---|
 | 3 | @@ -1041,15 +1041,13 @@ | 
|---|
 | 4 |      return r; | 
|---|
 | 5 |  } | 
|---|
 | 6 |   | 
|---|
 | 7 | -/* if a request with a body creates a subrequest, clone the original request's | 
|---|
 | 8 | - * input headers minus any headers pertaining to the body which has already | 
|---|
 | 9 | - * been read.  out-of-line helper function for ap_set_sub_req_protocol. | 
|---|
 | 10 | +/* if a request with a body creates a subrequest, remove original request's | 
|---|
 | 11 | + * input headers which pertain to the body which has already been read. | 
|---|
 | 12 | + * out-of-line helper function for ap_set_sub_req_protocol. | 
|---|
 | 13 |   */ | 
|---|
 | 14 |   | 
|---|
 | 15 | -static void clone_headers_no_body(request_rec *rnew, | 
|---|
 | 16 | -                                  const request_rec *r) | 
|---|
 | 17 | +static void strip_headers_request_body(request_rec *rnew) | 
|---|
 | 18 |  { | 
|---|
 | 19 | -    rnew->headers_in = apr_table_copy(rnew->pool, r->headers_in); | 
|---|
 | 20 |      apr_table_unset(rnew->headers_in, "Content-Encoding"); | 
|---|
 | 21 |      apr_table_unset(rnew->headers_in, "Content-Language"); | 
|---|
 | 22 |      apr_table_unset(rnew->headers_in, "Content-Length"); | 
|---|
 | 23 | @@ -1083,15 +1081,14 @@ | 
|---|
 | 24 |   | 
|---|
 | 25 |      rnew->status          = HTTP_OK; | 
|---|
 | 26 |   | 
|---|
 | 27 | +    rnew->headers_in = apr_table_copy(rnew->pool, r->headers_in); | 
|---|
 | 28 | + | 
|---|
 | 29 |      /* did the original request have a body?  (e.g. POST w/SSI tags) | 
|---|
 | 30 |       * if so, make sure the subrequest doesn't inherit body headers | 
|---|
 | 31 |       */ | 
|---|
 | 32 |      if (apr_table_get(r->headers_in, "Content-Length") | 
|---|
 | 33 |          || apr_table_get(r->headers_in, "Transfer-Encoding")) { | 
|---|
 | 34 | -        clone_headers_no_body(rnew, r); | 
|---|
 | 35 | -    } else { | 
|---|
 | 36 | -        /* no body (common case).  clone headers the cheap way */ | 
|---|
 | 37 | -        rnew->headers_in      = r->headers_in; | 
|---|
 | 38 | +        strip_headers_request_body(rnew); | 
|---|
 | 39 |      } | 
|---|
 | 40 |      rnew->subprocess_env  = apr_table_copy(rnew->pool, r->subprocess_env); | 
|---|
 | 41 |      rnew->headers_out     = apr_table_make(rnew->pool, 5); | 
|---|