Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Mar 9, 2015
  1. add 'version' to httpclient command

    authored
    ```
    % httpclient version
    2.6.0.1
    ```
  2. support no header deflate compression

    authored
    Some server returns deflate content without zlib header. Try to detect
    it and fallback to plain deflate algorithm for
    transparent_gzip_decompression
    
    Fixes #244.
Commits on Jan 20, 2015
  1. feat: HTTPClient.new accepts initialization block

    authored
    HTTPClient.new { |c| c.debug_dev = STDERR }.get("...")
Commits on Jan 3, 2015
  1. Version bump to 2.6.0.1

    authored
  2. fix: bin/httpclient one-liner broken

    authored
    db8166a broke one-liner style
    bin/httpclient execution.
  3. Version bump to 2.6.0

    authored
  4. refactor: do not use Queue#pop in sync request

    authored
    Let do_get_block return response object and do_request use it. It still
    has Connection object and call Queue#push for Newrelic gem:
    https://github.com/newrelic/rpm/blob/master/lib/new_relic/agent/instrumentation/httpclient.rb#L34-L36
  5. Revert "refactor: do not use Queue#pop in sync request"

    authored
    This reverts commit 45b1045 because it
    broke Webmock compatibility.
  6. Version bump to 2.6.0.pre

    authored
  7. Merge pull request #237 from nahi/http-cookie

    authored
    feat: use http-cookie for better Cookies spec compliance
  8. Add old test for reference

    authored
  9. Recover old cookie implementation as fallback

    authored
    http-cookie is used by default but you can restore original
    CookieManager behavior by loading 'httpclient/webagent-cookie' feature
    before 'httpclient' like this;
    
    require 'httpclient/webagent-cookie'
    require 'httpclient'
Commits on Jan 1, 2015
  1. refactor: do not use Queue#pop in sync request

    authored
    Let do_get_block return response object and do_request use it. It still
    has Connection object and call Queue#push for Newrelic gem:
    https://github.com/newrelic/rpm/blob/master/lib/new_relic/agent/instrumentation/httpclient.rb#L34-L36
Commits on Dec 31, 2014
  1. Update tests re: Cookie value escaping

    authored
    Reopened #145.
Commits on Dec 30, 2014
  1. feat: use http-cookie for better Cookies spec compliance

    authored
    Instead of WebAgent 0.6.2 that is not maintained over 10 years. To omit
    maintaining that library use http-cookie for better spec compliance and
    healthy development.
    
    This introduces following incompatibility from existing cookies
    implementation.
    * Expired cookies are not saved. With the old implementation expired
      cookies are saved in file and not be sent to the server. With the new
      implementation the expired cookies are not saved to the file and not
      be sent to the server.
    * Cookie#url -> Cookie#origin
    * Cookie#domain returns dot-less domain for domain cookies. Instead,
      Cookie#dot_domain returns with dot.
  2. fix: duplicated query params by follow_redirect

    authored
    When the original request has query and the server returns redirection
    response with Location, HTTPClient wrongly adds query to the new URI. In
    such case the Location header could include query part;
    
    e.g.
      http://originalhost/api/call?limit=10
      -> Location: http://otherhost/api/call?limit=10
    
    HTTPClient should just hit the new location '/api/call?limit=10' not
    '/api/call?limit=10&limit=10'. Closes #236.
Commits on Dec 29, 2014
  1. fix: NTLM & Basic dual auth

    authored
    When a server returns two or more WWW-Authenticate headers and the first
    one is NTLM, say WWW-Authenticate: NTLM and WWW-Authenticate: Basic in
    this order, HTTPClient sent Basic Authorization header after finishing
    NTLM auth negotiation.
    
    NTLM auth is a connection authentication scheme so HTTPClient deleted
    the internal auth negotiation state so that NTLM authenticator does not
    do anything after the negotiation has completed. In such case, for the
    subsequent requests, NTLM authenticator does nothing but Basic
    authenticator sends Basic Authorization header to the server that is
    already negotiated via NTLM authenticator. This can cause authentication
    failure.
    
    This commit changes the internal state handling not to delete the state
    but introduce :done state. NTLM authenticator returns :skip for the
    request to the server that auth negotiation has completed. WWWAuth skips
    other authenticator to avoid above issue.
    
    Closes #157.
  2. refactor: introduce AuthBase

    authored
    I checked that webmock master does not depend on Auth internal (spec
    passes)
Commits on Dec 28, 2014
  1. fix: transplant IO positions to new request in negotiation

    authored
    In authorization negotiation HTTP::Message for request is generated for
    each request, of course, but HTTPClient didn't care the IO position
    recorded in the previous requests in the subsequent requests.
    
    Closes #130.
  2. fix: avoid inconsistent Content-Length and actual body

    authored
    If lengths of all posted arguments are known HTTPClient sends
    'Content-Length' as a sum length of all arguments. But the length of
    actual body was wrong because it read as much as possible regardless of
    what IO#size returned. So if the file is getting bigger while HTTPClient
    is processing a request the request has inconsistent Content-Length and
    body.
    
    This bug is found, and the fix is proposed both by @Teshootub7. Thank
    you very much for patient trouble shooting!
    
    Fixes #117.
  3. chore: restore ruby-ntlm test

    authored
  4. Keep quoted cookie value as is and send back to the server

    authored
    Try to send back the given Cookie value to the server as is to the
    extent possible. When Set-Cookie is 'key="value"', send 'key="value"' to
    the server not 'key=value'.
    
    Implementation: keep Cookie values without normalizing internally and do
    normalize when Cookie#value is called. The raw_value is written to
    Cookie file as well.  Closes #145.
  5. feat: Message#previous to get responses in negotiation

    authored
    HTTP::Message#previous keeps previous response in negotiation.  For
    redirection, authorization negotiation and retry from custom filter.
    
    Closes #234.
  6. Use bundled jruby-openssl

    authored
    Remove jruby-openssl definition from Gemfile
Something went wrong with that request. Please try again.