curl-library
RE: about https proxy queston
Date: Thu, 12 Feb 2015 09:07:51 +0100 (CET)
On Wed, 11 Feb 2015, Joe Mason wrote:
> I'm running into a similar issue, but this patch doesn't fix it. I have a
> proxy that uses NTLM authentication, and I'm trying to tunnel an HTTPS
> connection through it. I'm using CURLMOPT_SOCKETFUNCTION to hook into my
> event loop.
Thanks Joe for these details. I can see another problem in the code that my
patch doesn't address. Let me explain what I think:
CURLM_STATE_WAITCONNECT is for waiting for the TCP connect to complete (when
it goes there from CURLM_STATE_CONNECT) and then kick off the
protocol-specific connect actions. This state thus needs to deal with happy
eyeballs stuff since it is about the TCP layer connect stuff.
CURLM_STATE_WAITPROXYCONNECT is the state in which libcurl remains for the
proxy-CONNECT logic to complete. Once it has received the full proxy response
there, it goes over to CURLM_STATE_WAITCONNECT. Going back to WAITCONNECT from
this state will make it go back into expecting the TCP connect to finish,
which is just wrong since it has already passed that phase!
Could this be what happens to you?
I'm thinking CURLM_STATE_WAITCONNECT should be split into two states, one for
the TCP connection phase and another one for the protocol connection stuff so
that we can go straight into the latter from CURLM_STATE_WAITPROXYCONNECT.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2015-02-12