Changeset 4720

Show
Ignore:
Timestamp:
01/16/08 23:46:43 (6 years ago)
Author:
tokuhirom
Message:

lang/perl/moxy: oops. bug fixed.

Location:
lang/perl/Moxy/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Moxy/trunk/config.yaml

    r4718 r4720  
    33  application: 
    44    host: localhost 
    5     port: 9999 
     5    port: 10000 
    66  storage: 
    77    module: DBM_File 
  • lang/perl/Moxy/trunk/lib/Moxy/Plugin/Application.pm

    r3964 r4720  
    6868 
    6969sub _ua { 
     70    my ($class, $proxy_url) = @_; 
     71 
    7072    my $ua = LWP::UserAgent->new( 
    7173        agent         => "Moxy/$Moxy::VERSION", 
     
    7375        max_redirects => 0, 
    7476    ); 
    75     $ua->proxy(['http'] => 'http://localhost:9999/'); 
     77    $ua->proxy(['http'] => $proxy_url); 
    7678    $ua; 
    7779} 
     
    8587        $req->header('Host' => URI->new($url)->host); 
    8688        $req->header('Proxy-Authorization' => "Basic @{[ encode_base64 $auth ]}"); 
    87         my $ua = $class->_ua; 
     89        my $ua = $class->_ua($base); 
    8890        my $res = $ua->request($req); 
    8991        if ($res->code == 302) { 
     
    193195This is web proxy mode plugin. 
    194196 
     197=head1 DISCLAIMER 
     198 
     199THIS MODULE IS STILL ALPHA QUALITY 
     200 
    195201=head1 AUTHOR 
    196202