Problem with use of ModPerl2::Tools::fetch_url

Ashish Mukherjee <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <CACgMzfxzBVj2jkhooA-X+yV7QzuJgwcw72873b7-+PrTJWNCyg@mail.gmail.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.