httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Kim <>
Subject [users@httpd] How to modify ap_proxy_http_process_response in mod_proxy_http.c
Date Mon, 22 Jun 2009 16:34:06 GMT
Hi. All.

Here is a part of ap_proxy_http_process_response function.

apr_status_t ap_proxy_http_process_response(..... ) {

	do {
     apr_off_t readbytes;
     apr_status_t rv;

     rv = ap_get_brigade(rp->input_filters, bb,
                         AP_MODE_READBYTES, mode,


     /* found the last brigade? */
         /* signal that we must leave */
         finish = TRUE;


     /* try send what we read */
     if (ap_pass_brigade(r->output_filters, bb) != APR_SUCCESS
         || c->aborted) {
         /* Ack! Phbtt! Die! User aborted! */
         backend->close = 1;  /* this causes socket close below */
         finish = TRUE;

     /* make sure we always clean up after ourselves */

    } while (!finish);

I understood they work this way.
(1) ap_get_brigade function gets a brigade data structure (bb) from network .
(2) Then, ap_pass_brigade passes it to r->output_filters,which seems
to send it to network
(3) (1) & (2) repeat until it gets the last part of html data.

Each brigade seems to get a partial data of input html.
The above (1) process seems to get a data from web server of accessed url,
and (2) process seems to pass the received data to a client(Web browser)

I would like to pass each brigade to r->output_filters after I get
every brigade.

Simply saying, let's say a html is a collection of partial data, H1, H2 and H3.

The way that the current source is doing is,

Get H1, Pass H1, Get H2, Pass H2, Get H3, Pass H3..

The way that I would like to change is,

Get H1, Get H2, Get H3, Pass H1, Pass H2, Pass H3..

Does anybody have any experience?


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message