Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: LWP issuing two CONNECT requests when only one is asked for?

by davido (Archbishop)
on Apr 04, 2005 at 18:05 UTC ( #444749=note: print w/ replies, xml ) Need Help??


in reply to LWP issuing two CONNECT requests when only one is asked for?

It looks tome like LWP::UserAgent is asking for the remote server, obtaining a connection to the proxy, and then the proxy is failing to gain access to the remote server (Forbidden). The error messages are a little convoluted, but it seems to me that UserAgent reports "connection established" when it gets a response from the proxy. And the first message simply is oblivious to the fact that there is a proxy mediating the connection. Then the second response is the one the proxy obtains when it attemps to perform the mediation.


Dave


Comment on Re: LWP issuing two CONNECT requests when only one is asked for?
Re^2: LWP issuing two CONNECT requests when only one is asked for?
by mickey (Acolyte) on Apr 04, 2005 at 18:56 UTC

    I see what you're getting at, but I don't understand why the second CONNECT request is asking for the proxy server rather than the remote server.

    Is that part of the protocol?

      Just confirmed my own theory, i.e. that the second CONNECT isn't part of the protocol and isn't sent by other HTTPS clients. Requesting the same HTTPS server with Internet Explorer and watching the HTTP traffic with Etherial I only see one CONNECT, the first one to the specified remote server.

      So it does seem like one of the underlying modules that LWP::UserAgent uses to connect to HTTPS websites is doing something out of the ordinary.

      I'll try cutting LWP::UserAgent out of the loop and gradually getting more low-level until I find the point it's going wrong, but if anyone has any suggestions as to where I might start looking that would be great!

        Don't forget LWP::Debug

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2014-07-28 08:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (193 votes), past polls