You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ashish Mukherjee <as...@gmail.com> on 2015/08/19 09:50:02 UTC
Problem with use of ModPerl2::Tools::fetch_url
Hello,
I am facing a problem with ModPerl2::Tools::fetch_url(). Though my url
passed to the function is valid, it returns empty content. Here is the
relevant code snippet -
package MyCompany::Proxy
..... # use statements
sub handler {
my $r = shift;
my $url = .... #some logic to get the url from meta-data
my $content = $r->fetch_url($url);
$r->print($content);
return Apache2::Const::OK;
}
1;
In my Apache conf, mod_proxy is loaded and the following directives are
placed -
ProxyRequests On
ProxyVia On
<Location /foo>
SetHandler modperl
PerlOptions +GlobalRequest
PerlResponseHandler MyCompany::Proxy
</Location>
Unable to figure out why the fetch_url fails to work.
Any suggestions to resolve this would be much appreciated?
Regards,
Ashish