I'm writing a perl trans handler to invoke mod_proxy for non-proxy
requests.

Stronghold 3 on Solaris 2.6, server announces:

Stronghold/3.0 Apache/1.3.12 C2NetEU/3011 (Unix) PHP/3.0.16
mod_ssl/2.6.4 OpenSSL/0.9.5a mod_perl/1.22

I'm essentially using the code from page 371 of the Eagle book without
the URL translate::

     my $host = $r->get_server_name;
     <add some headers etc. using $r->header_in>
     my $newuri = Apache::URI->parse($r);
     my $scheme = $newuri->scheme;
     my $newuristring = "$scheme://$host" . $r->uri;
     if ($newuristring) {
        $r->proxyreq(1);
        $r->uri($newuristring);
        $r->filename("proxy:$newuristring");
        $r->handler('proxy-server');
        return OK;
     }

It works to proxy the HTTP to the system fine, however, POST parameters
seem to get mangled and/or truncated.
 
I'm not actually even changing the URI, because the server's notion of
name resolution is different than the browser's.

In short: external DNS maps all of the sites this thing will proxy to do
the server itself.  The server has a /etc/hosts file that remaps all of
the host names to the real servers.  Hence, I don't actually have to
change the uris.

Shouldn't POST parameters go thru without playing around with
read/content?

When I try to reference $r->content the thing appears to hang.

Reply via email to