Question about how to fetch html?

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

 



Hi all.

Currently I am creating a http-based proxy system to fetch a html data
between users' browser ans web server.

In fact, I did it by adding some code in
ap_proxy_http_process_response function as follows

Here is a part of ap_proxy_http_process_response function and I added
some code to see bb (apr_bucket_brigade)

in the place, "/* my code */"

             do {

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

                    /* found the last brigade? */
                    if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) {
                        /* signal that we must leave */
                        finish = TRUE;
                    }

                    /* my code */

                    /* 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;
                    }

              }while(.......................);

By the way, this given code seems to repeat getting a partial html and
passing it down. However,

I want to parse the complete html, analyze it and send it to users' browser.

By concatenating the partial html, I can create a complete html data
and parse it. However, it only can happen

after the html is already sent according to the above program structure.

Does anyone know about how to fix this problem? Is there any general
way to fetch html?

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