New features and enhancements #5

Merged
merged 7 commits into from Feb 9, 2012
Commits on Dec 19, 2011
  1. @fdmanana @fdmanana

    Add support for HTTP basic auth

    fdmanana committed with fdmanana Oct 8, 2011
    Also enhanced the lhttpc_lib:parse_url/1 to parse
    credentials as specified in RFC1738 - before if user
    credentials were specified, this function would consider
    that what follows the first : is the port and not a
    password.
  2. @fdmanana @fdmanana

    Add support for IPv6

    fdmanana committed with fdmanana Oct 8, 2011
    If an URL targets an IPv6 host, lhttpc will now pass the
    inet6 option to the socket automatically.
    This also fixes 2 bugs:
    
    1) in lhttpc_lib:parse_url/1 when the host component is an IPv6
       address literal - the parser thinks that what follows the
       first : is a port number;
    
    2) for IPv6 address literals, the Host header must surround those
       literals in square brackets (RFC2732)
  3. @fdmanana @fdmanana

    Add support for proxies

    fdmanana committed with fdmanana Oct 9, 2011
    This change adds support for HTTP proxies that allow the HTTP
    CONNECT method tunneling [1, 2]. Tested against Squid 3.1.15.
    
    [1] http://muffin.doit.org/docs/rfc/tunneling_ssl.html
    [2] http://tools.ietf.org/html/rfc2817
  4. @fdmanana

    Add connection limit to lhttpc_manager

    fdmanana committed Dec 19, 2011
    This allows the connection pool (lhttpc_manager) to
    block clients, when they request a socket, when the
    current number of open sockets/connection reaches a
    certain (configurable) threshold.
  5. @fdmanana @fdmanana

    Add test connection_timeout to lhttpc_manager_tests

    fdmanana committed with fdmanana Oct 12, 2011
    This test verifies that the lhttpc_manager pool closes sockets
    if they are not used after a configurable period of time.
  6. @fdmanana @fdmanana

    Allow different clients to use different pools

    fdmanana committed with fdmanana Oct 12, 2011
    This change allows different clients to use different connection
    pools (lhttpc_manager instances). This is useful when we have
    several different applications or process groups which are
    independent and shouldn't share the same pool.
    It also reduces the overhead of messaging a single centralized pool.
  7. @fdmanana

    Add eunit verbose option to rebar.config

    fdmanana committed Dec 19, 2011
    This helps better identifying which tests fail and
    give a notion of progress/staleness.