Apache-ReverseProxy
view release on metacpan or search on metacpan
to allow the proxy to return chunks of the entity-body as it
receives data from the web server, instead of retrieving the
entire entity-body and then returning it to the client.
0.04 Wed Nov 17 15:57:23 PST 1999
- Forwards multiple headers with the same header name
back to the client, often used by Set-cookie when
setting multiple cookies in one HTTP response.
0.03 Fri Nov 5 15:34:01 PST 1999
- Forwards the client's user-agent, content-type, and
entity body.
0.02 Mon Nov 1 16:08:46 PST 1999
- Exact parameter matches query strings too.
- Proxy chaining added.
0.01 Wed Oct 27 02:34:52 PDT 1999
- original version; created by h2xs 1.16
lib/Apache/ReverseProxy.pm view on Meta::CPAN
# copy over the client's user-agent, since some servers look at
# this and customize their response based on it.
my $origin_ua = $r->header_in('user-agent');
if (defined $origin_ua && length $origin_ua) {
$ua->agent($origin_ua)
}
# copy over the content type
my $content_type = $r->header_in('content-type');
if (defined $content_type && length $content_type) {
$request->header('content-type', $content_type);
}
# copy over the entity body as well
my $entity_body = $r->content();
if (defined $entity_body && length $entity_body) {
$request->content($entity_body);
} else {
my $buff = '';
$r->read($buff, $r->header_in('Content-length'));
if ($buff ne '') {
( run in 1.494 second using v1.01-cache-2.11-cpan-524268b4103 )