1. 15 Jun, 2019 3 commits
  2. 14 Jun, 2019 11 commits
  3. 13 Jun, 2019 11 commits
  4. 11 Jun, 2019 7 commits
  5. 10 Jun, 2019 8 commits
    • http: free auth context on failure · 7ea8630e
      When we send HTTP credentials but the server rejects them, tear down the
      authentication context so that we can start fresh.  To maintain this
      state, additionally move all of the authentication handling into
      `on_auth_required`.
      Edward Thomson committed
    • http: reconnect to proxy on connection close · 005b5bc2
      When we're issuing a CONNECT to a proxy, we expect to keep-alive to the
      proxy.  However, during authentication negotiations, the proxy may close
      the connection.  Reconnect if the server closes the connection.
      Edward Thomson committed
    • http: allow server to drop a keepalive connection · d171fbee
      When we have a keep-alive connection to the server, that server may
      legally drop the connection for any reason once a successful request and
      response has occurred.  It's common for servers to drop the connection
      after some amount of time or number of requests have occurred.
      Edward Thomson committed
    • http: stop on server EOF · 9af1de5b
      We stop the read loop when we have read all the data.  We should also
      consider the server's feelings.
      
      If the server hangs up on us, we need to stop our read loop.  Otherwise,
      we'll try to read from the server - and fail - ad infinitum.
      Edward Thomson committed
    • http: teach auth mechanisms about connection affinity · 539e6293
      Instead of using `is_complete` to decide whether we have connection or
      request affinity for authentication mechanisms, set a boolean on the
      mechanism definition itself.
      Edward Thomson committed
    • http: maintain authentication across connections · 3e0b4b43
      For request-based authentication mechanisms (Basic, Digest) we should
      keep the authentication context alive across socket connections, since
      the authentication headers must be transmitted with every request.
      
      However, we should continue to remove authentication contexts for
      mechanisms with connection affinity (NTLM, Negotiate) since we need to
      reauthenticate for every socket connection.
      Edward Thomson committed
    • http: simplify authentication mechanisms · ce72ae95
      Hold an individual authentication context instead of trying to maintain
      all the contexts; we can select the preferred context during the initial
      negotiation.
      
      Subsequent authentication steps will re-use the chosen authentication
      (until such time as it's rejected) instead of trying to manage multiple
      contexts when all but one will never be used (since we can only
      authenticate with a single mechanism at a time.)
      
      Also, when we're given a 401 or 407 in the middle of challenge/response
      handling, short-circuit immediately without incrementing the retry
      count.  The multi-step authentication is expected, and not a "retry" and
      should not be penalized as such.
      
      This means that we don't need to keep the contexts around and ensures
      that we do not unnecessarily fail for too many retries when we have
      challenge/response auth on a proxy and a server and potentially
      redirects in play as well.
      Edward Thomson committed