Hi Monks,
This is my first question. I am long time listener of this group and monks are doing great job in supporting community.
Ok here it is:
proxy program:
#!/usr/bin/perl
use HTTP::Proxy;
use HTTP::Recorder;
my $proxy = HTTP::Proxy->new();
#$proxy->host("my host name");
#I tried this with and without above line
# create a new HTTP::Recorder object
my $agent = new HTTP::Recorder ( file => "myfilezzz" )
or die;
#$agent->proxy('http', "real-proxy");
#I tried with and without above line
# set HTTP::Recorder as the agent for the proxy
$proxy->agent( $agent );
# start the proxy
$proxy->start();
1;
I run above program in separate window, then I set proxy in browser (IE) and every thing works ( It creates myfilezzz file with contents $agent->get("http://myhost/myapp/"); ) except, I can't access any page(It says page not found or gives dns error). Looks like if we don't point browser to real-proxy it can't fetch
page.
Am I missing something?
thanks
Vinay
Edited by Chady -- added code tags.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.