App::HTTP_Proxy_IMP::IMP::FakeResponse - return alternativ response header and body for specific URIs
# listen on 127.0.0.1:8000 # to hijack google analytics put alternative response into # myroot/www.google-analytics.com/ga.js or # myroot/www.google-analytics.com:80/ga.js or $ perl bin/imp_http_proxy --filter FakeResponse=root=myroot 127.0.0.1:8000
This module is used to hijack specific URIs and return a different response. It works by replacing the origin target in the request header with internal://imp, which causes App::IMP_HTTP_Proxy_IMP to inject a dummy HTTP response header and body into the data stream, instead of contacting the original server. This dummy response is than replaced with the alternative response.
The format and file name for the alternative responses is the same as in Net::IMP::HTTP::SaveResponse, see there for details.
new_analyzer has the following arguments:
new_analyzer
Specifies the base directory, where the alternative responses are located.
Ignore query string or post data when computing the file name.
Steffen Ullrich <sullr@cpan.org>
To install App::HTTP_Proxy_IMP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::HTTP_Proxy_IMP
CPAN shell
perl -MCPAN -e shell install App::HTTP_Proxy_IMP
For more information on module installation, please visit the detailed CPAN module installation guide.