Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^5: Proxy Authentication

by xiper (Friar)
on Jun 12, 2004 at 10:29 UTC ( [id://363583]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Proxy Authentication
in thread Proxy Authentication

Well, the code looks correct, and as eclark mentioned below, it works okay for me. It sounds like either the proxy isn't accepting your username/domain/password, or it isn't accepting the url you're giving it - look up the error code in your proxy's documentation. Make sure you can access the same page with the same credentials using a browser with the same proxy settings on the same computer. Try different url types and/or combinations of domain/username (eg, "username", "domain\username", "username@domain", "domain.suffix.com.uk\username", "username@domain.suffix.com.uk", etc).

A good way to debug these things (as samtregar recently mentioned), is to write a small proxy using HTTP::Proxy, point your script & browser to it, and see what the difference is in the request header they send. Here's a snippit to get you started:

#! /usr/bin/perl use strict; use HTTP::Proxy qw( :log ); my $proxy = new HTTP::Proxy; $proxy->port( 8081 ); $proxy->logfh( *STDOUT ); $proxy->logmask( ALL ); $proxy->start;
Good luck!

- ><iper

use japh; print;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://363583]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-20 00:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found