How to modify ap_proxy_http_process_response in mod_proxy_http.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi. All.

Here is a part of ap_proxy_http_process_response function.

static
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,
                         conf->io_buffer_size);

	  .............................
     .............................		

     /* found the last brigade? */
     if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) {
         /* 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 */
     apr_brigade_cleanup(bb);

    } 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?

Thanks

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux