Skip to content

New features and enhancements #5

merged 7 commits into from Feb 9, 2012

3 participants



I've been integrating lhttpc with Apache CouchDB (to replace ibrowse), but it lacked a few features that are currently supported by ibrowse. This pull requests adds those features and enhances the httpc connection pool (so that it can replace the custom one from CouchDB).

I also made a pull request to Oscar, but it's been a long time and got no feedback:



fdmanana added some commits Oct 8, 2011
@fdmanana fdmanana Add support for HTTP basic auth
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
@fdmanana fdmanana Add support for IPv6
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)
@fdmanana fdmanana Add support for proxies
This change adds support for HTTP proxies that allow the HTTP
CONNECT method tunneling [1, 2]. Tested against Squid 3.1.15.

@fdmanana fdmanana Add connection limit to lhttpc_manager
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.
@fdmanana fdmanana Add test connection_timeout to lhttpc_manager_tests
This test verifies that the lhttpc_manager pool closes sockets
if they are not used after a configurable period of time.
@fdmanana fdmanana Allow different clients to use different pools
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.
@fdmanana fdmanana Add eunit verbose option to rebar.config
This helps better identifying which tests fail and
give a notion of progress/staleness.

maybe {local, ?MODULE}?

Yes, you're right, the intention was {local, ?MODULE}.
Thanks for noticing it :)

@paulgray paulgray merged commit 1b3457e into esl:master Feb 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.