Skip to content
  1. Jun 08, 2015
  2. May 12, 2015
  3. Mar 24, 2015
  4. Mar 23, 2015
  5. Mar 17, 2015
  6. Mar 16, 2015
    • Jay Satiro's avatar
      connect: Fix happy eyeballs logic for IPv4-only builds · 059b3a57
      Jay Satiro authored
      Bug: https://github.com/bagder/curl/pull/168
      
      (trynextip)
      - Don't try the "other" protocol family unless IPv6 is available. In an
      IPv4-only build the other family can only be IPv6 which is unavailable.
      
      This change essentially stops IPv4-only builds from attempting the
      "happy eyeballs" secondary parallel connection that is supposed to be
      used by the "other" address family.
      
      Prior to this change in IPv4-only builds that secondary parallel
      connection attempt could be erroneously used by the same family (IPv4)
      which caused a bug where every address after the first for a host could
      be tried twice, often in parallel. This change fixes that bug. An
      example of the bug is shown below.
      
      Assume MTEST resolves to 3 addresses 127.0.0.2, 127.0.0.3 and 127.0.0.4:
      
      * STATE: INIT => CONNECT handle 0x64f4b0; line 1046 (connection #-5000)
      * Rebuilt URL to: http://MTEST/
      * Added connection 0. The cache now contains 1 members
      * STATE: CONNECT => WAITRESOLVE handle 0x64f4b0; line 1083
      (connection #0)
      *   Trying 127.0.0.2...
      * STATE: WAITRESOLVE => WAITCONNECT handle 0x64f4b0; line 1163
      (connection #0)
      *   Trying 127.0.0.3...
      * connect to 127.0.0.2 port 80 failed: Connection refused
      *   Trying 127.0.0.3...
      * connect to 127.0.0.3 port 80 failed: Connection refused
      *   Trying 127.0.0.4...
      * connect to 127.0.0.3 port 80 failed: Connection refused
      *   Trying 127.0.0.4...
      * connect to 127.0.0.4 port 80 failed: Connection refused
      * connect to 127.0.0.4 port 80 failed: Connection refused
      * Failed to connect to MTEST port 80: Connection refused
      * Closing connection 0
      * The cache now contains 0 members
      * Expire cleared
      curl: (7) Failed to connect to MTEST port 80: Connection refused
      
      The bug was born in commit bagder/curl@2d435c7.
      059b3a57
  7. Mar 15, 2015
  8. Mar 07, 2015
  9. Mar 03, 2015
  10. Feb 23, 2015
  11. Jan 20, 2015
  12. Dec 27, 2014
  13. Dec 16, 2014
    • Patrick Monnerat's avatar
      IPV6: address scope != scope id · 9081014c
      Patrick Monnerat authored
      There was a confusion between these: this commit tries to disambiguate them.
      - Scope can be computed from the address itself.
      - Scope id is scope dependent: it is currently defined as 1-based local
        interface index for link-local scoped addresses, and as a site index(?) for
        (obsolete) site-local addresses. Linux only supports it for link-local
        addresses.
      The URL parser properly parses a scope id as an interface index, but stores it
      in a field named "scope": confusion. The field has been renamed into "scope_id".
      Curl_if2ip() used the scope id as it was a scope. This caused failures
      to bind to an interface.
      Scope is now computed from the addresses and Curl_if2ip() matches them.
      If redundantly specified in the URL, scope id is check for mismatch with
      the interface index.
      
      This commit should fix SF bug #1451.
      9081014c
    • Patrick Monnerat's avatar
  14. Dec 04, 2014
  15. Nov 30, 2014
  16. Nov 19, 2014
    • Jon Spencer's avatar
      multi: inform about closed sockets before they are closed · 29336986
      Jon Spencer authored
      When the connection code decides to close a socket it informs the multi
      system via the Curl_multi_closed function. The multi system may, in
      turn, invoke the CURLMOPT_SOCKETFUNCTION function with
      CURL_POLL_REMOVE. This happens after the socket has already been
      closed. Reorder the code so that CURL_POLL_REMOVE is called before the
      socket is closed.
      29336986
  17. Nov 18, 2014
    • Carlo Wood's avatar
      debug: added new connection cache output, plus fixups · 013d5c18
      Carlo Wood authored
      Debug output 'typo' fix.
      
      Don't print an extra "0x" in
        * Pipe broke: handle 0x0x2546d88, url = /
      
      Add debug output.
      Print the number of connections in the connection cache when
        adding one, and not only when one is removed.
      
      Fix typos in comments.
      013d5c18
  18. Nov 16, 2014
  19. Oct 30, 2014
  20. Oct 28, 2014
  21. Oct 24, 2014
    • Daniel Stenberg's avatar
      code cleanup: we prefer 'CURLcode result' · 0eb3d15c
      Daniel Stenberg authored
      ... for the local variable name in functions holding the return
      code. Using the same name universally makes code easier to read and
      follow.
      
      Also, unify code for checking for CURLcode errors with:
      
       if(result) or if(!result)
      
      instead of
      
       if(result == CURLE_OK), if(CURLE_OK == result) or if(result != CURLE_OK)
      0eb3d15c
  22. Oct 14, 2014
  23. Oct 04, 2014
  24. Aug 31, 2014
    • Daniel Stenberg's avatar
      low-speed-limit: avoid timeout flood · cacdc27f
      Daniel Stenberg authored
      Introducing Curl_expire_latest(). To be used when we the code flow only
      wants to get called at a later time that is "no later than X" so that
      something can be checked (and another timeout be added).
      
      The low-speed logic for example could easily be made to set very many
      expire timeouts if it would be called faster or sooner than what it had
      set its own timer and this goes for a few other timers too that aren't
      explictiy checked for timer expiration in the code.
      
      If there's no condition the code that says if(time-passed >= TIME), then
      Curl_expire_latest() is preferred to Curl_expire().
      
      If there exists such a condition, it is on the other hand important that
      Curl_expire() is used and not the other.
      
      Bug: http://curl.haxx.se/mail/lib-2014-06/0235.html
      Reported-by: Florian Weimer
      cacdc27f
  25. Aug 20, 2014
  26. Jul 04, 2014
  27. May 21, 2014
    • Daniel Stenberg's avatar
      bits.close: introduce connection close tracking · df13f8e8
      Daniel Stenberg authored
      Make all code use connclose() and connkeep() when changing the "close
      state" for a connection. These two macros take a string argument with an
      explanation, and debug builds of curl will include that in the debug
      output. Helps tracking connection re-use/close issues.
      df13f8e8
  28. May 15, 2014
    • Daniel Stenberg's avatar
      timers: fix timer regression involving redirects / reconnects · 84bd19ff
      Daniel Stenberg authored
      In commit 0b3750b5 (released in 7.36.0) we fixed a timeout issue
      but instead broke the timings.
      
      To fix this, I introduce a new timestamp to use for the timeouts and
      restored the previous timestamp and timestamp position so that the old
      timer functionality is restored.
      
      In addition to that, that change also broke connection timeouts for when
      more than one connect was used (as it would then count the total time
      from the first connect and not for the most recent one). Now
      Curl_timeleft() has been modified so that it checks against different
      start times depending on which timeout it checks.
      
      Test 1303 is updated accordingly.
      
      Bug: http://curl.haxx.se/mail/lib-2014-05/0147.html
      Reported-by: Ryan Braud
      84bd19ff
  29. Apr 18, 2014
  30. Mar 19, 2014
  31. Jan 18, 2014
  32. Jan 17, 2014
  33. Jan 15, 2014
  34. Jan 11, 2014
    • Daniel Stenberg's avatar
      multi: remove MULTI_TIMEOUT_INACCURACY · 3b183df9
      Daniel Stenberg authored
      With the recently added timeout "reminder" functionality, there's no
      reason left for us to execute timeout code before the time is
      ripe. Simplifies the handling too.
      
      This will make the *TIMEOUT and *CONNECTTIMEOUT options more accurate
      again, which probably is most important when the *_MS versions are used.
      
      In multi_socket, make sure to update 'now' after having handled activity
      on a socket.
      3b183df9
  35. Jan 08, 2014