Menu

#1479 timeout issue over proxy

closed-fixed
1
2015-03-19
2015-02-02
Peter
No

There is timeout issue over proxy in the libcurl 7.39, the root cause is due to the introduction of "Happy Eyeballs" feature of libcurl leading to waitconnect_getsock() returning 0 unexpectedly somehow over proxy.
The curl code might need to return "GETSOCK_WRITESOCK(0)" as 7.32 if 0 is going to be returned, without impacting the existing "Happy Eyeballs" feature.

http://curl.haxx.se/mail/lib-2013-10/0207.html

@@ -621,17 +621,26 @@ static int waitconnect_getsock(struct connectdata conn,
curl_socket_t
sock,
int numsocks)
{
+ int i;
+ int s=0;
+ int rc=0;
+
if(!numsocks)
return GETSOCK_BLANK;

  • sock[0] = conn->sock[FIRSTSOCKET];
  • for(i=0; i<2; i++) {
  • if(conn->tempsock[i] != CURL_SOCKET_BAD) {
  • sock[s] = conn->tempsock[i];
  • rc |= GETSOCK_WRITESOCK(s++);
  • }
  • }

/ when we've sent a CONNECT to a proxy, we should rather wait for the
socket to become readable to be able to get the response headers
/
if(conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT)
return GETSOCK_READSOCK(0);

  • return GETSOCK_WRITESOCK(0);
  • return rc;

Could you please it in the next libcurl version(7.41)?

Discussion

  • Daniel Stenberg

    Daniel Stenberg - 2015-02-02

    Thanks, but that diff got all munged here. Can you attach it please?

     
  • Daniel Stenberg

    Daniel Stenberg - 2015-02-02
    • assigned_to: Daniel Stenberg
     
  • Peter

    Peter - 2015-02-03

    attach the file, thanks.

     
  • Daniel Stenberg

    Daniel Stenberg - 2015-02-25

    I posted a suggested patch to the mailing list, lets continue there: http://curl.haxx.se/mail/lib-2015-02/0198.html

     
  • Daniel Stenberg

    Daniel Stenberg - 2015-02-25
    • labels: --> proxy, CONNECT
    • status: open --> open-confirmed
     
  • Daniel Stenberg

    Daniel Stenberg - 2015-03-19
    • status: open-confirmed --> closed-fixed
     
  • Daniel Stenberg

    Daniel Stenberg - 2015-03-19

    The fix was merged and was confirmed on the list to fix the problem.