On 05 Jan 2011, at 9:43 AM, Ruediger Pluem wrote:

What about the comment in mod_proxy.h about the r element of proxy_conn_rec?

/* Request record of the frontend request
* which the backend currently answers. */

Doesn't this comment need to be adjusted now?

It does - I've fixed it in r1055367.

- rp->headers_in = apr_table_copy(r->pool, r- >headers_out); + backend->r->headers_in = apr_table_copy(backend->r- >pool, r->headers_out);

Doesn't that mean that we will get entries in backend->r->headers that have been allocated
from r->pool instead of backend->r->pool?

Hmmm... it does yes, I think we need an apr_table_clone here.

            /*
* Restore Transfer-Encoding header from response if we saved
             * one before and there is none left. We need it for the
             * ap_http_filter. See above.
             */
- if (te && !apr_table_get(rp->headers_in, "Transfer- Encoding")) { - apr_table_add(rp->headers_in, "Transfer-Encoding", te); + if (te && !apr_table_get(backend->r->headers_in, "Transfer-Encoding")) { + apr_table_add(backend->r->headers_in, "Transfer- Encoding", te);

Doesn't that mean that we will get entries in backend->r->headers that have been allocated from r->pool instead of backend->r->pool? te is an element from r- >headers_out.

In this case we shouldn't, as apr_table_add() makes a copy of te from backend->r->pool. If we'd used apr_table_addn(), then it would have been yes.

Regards,
Graham
--

Reply via email to