cURL cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1403 curl_multi_socket_action + CONNECT-only broken

From: Marcel Raad <marcelraad_at_users.sf.net>
Date: Mon, 15 Sep 2014 07:55:38 +0000

I just noticed that the reason for this issue is that I always closed the socket in curl_closesocket_callback, even if I hadn't received CURL_POLL_REMOVE yet in curl_socket_callback. This didn't work before 7.30.0, but in new code written after 7.29.0 I re-tested it and it worked and I thought that was a bug that got fixed. If I revert to the old logic, closing the socket either in curl_closesocket_callback or curl_socket_callback with CURL_POLL_REMOVE, whichever happens later, everything works fine.

---
** [bugs:#1403] curl_multi_socket_action + CONNECT-only broken**
**Status:** open
**Created:** Fri Aug 01, 2014 09:00 AM UTC by Marcel Raad
**Last Updated:** Mon Aug 18, 2014 04:07 PM UTC
**Owner:** nobody
As mentioned in [#1363]:
I'm using the latest git master built with Windows SSPI and I'm testing against a Microsoft TMG 2010 proxy.
Commit a4cece3d47cf092da00cf9910e87bb60b9eff533 broke code that uses the combination of curl_multi_socket_action and CONNECT-only (CURLOPT_CONNECT_ONLY + CURLOPT_HTTPPROXYTUNNEL) when NTLM authentication is used.
The following scenarios continue to work:
- curl_multi_socket_action without CONNECT
- CONNECT-only with the easy API or curl_multi_perform
- using Plain or Digest authentication instead of NTLM
In the error case, after successful proxy authentication and receiving the HTTP 200 OK reply from the proxy, first my socket callback is called with CURL_POLL_REMOVE and then my timeout callback is called with the whole remaining timeout (nearly 60 seconds in my debug scenario). After that timeout, I first call curl_multi_socket_action with CURL_SOCKET_TIMEOUT, then I call curl_multi_info_read and the transfer is finished with CURLE_OPERATION_TIMEDOUT.
The attached patch which reverts moving a return statement from within a condition to after it fixes my problem. Please note that I don't think the patch is correct as moving the return statement seems intended.
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2014-09-15

These mail archives are generated by hypermail.