New features and enhancements #5

Merged
merged 7 commits into from Feb 9, 2012

Conversation

Projects
None yet
3 participants
@fdmanana
Contributor

fdmanana commented Dec 19, 2011

Hi,

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:

oscarh/lhttpc#3

thanks

fdmanana added some commits Oct 8, 2011

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
password.
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)
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.

[1] http://muffin.doit.org/docs/rfc/tunneling_ssl.html
[2] http://tools.ietf.org/html/rfc2817
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.
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.
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.
Add eunit verbose option to rebar.config
This helps better identifying which tests fail and
give a notion of progress/staleness.
@RumataEstor

This comment has been minimized.

Show comment
Hide comment
@RumataEstor

RumataEstor Jan 19, 2012

maybe {local, ?MODULE}?

maybe {local, ?MODULE}?

This comment has been minimized.

Show comment
Hide comment
@fdmanana

fdmanana Jan 22, 2012

Owner

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

Owner

fdmanana replied Jan 22, 2012

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

paulgray added a commit that referenced this pull request Feb 9, 2012

Merge pull request #5 from fdmanana/contributions
New features and enhancements

@paulgray paulgray merged commit 1b3457e into esl:master Feb 9, 2012

rymir pushed a commit to rymir/lhttpc that referenced this pull request Mar 11, 2013

g-andrade pushed a commit to g-andrade/lhttpc that referenced this pull request Nov 26, 2014

Merge pull request #5 from talko/master
Use os:timestamp instead of erlang:now for link expiration

g-andrade pushed a commit to g-andrade/lhttpc that referenced this pull request Nov 26, 2014

Merge pull request #5 from inaka/elbrujohalcon.sns
GetEndpointAttributes implementation

massemanet pushed a commit to campanja-forks/lhttpc that referenced this pull request Mar 9, 2017

Merge pull request #5 from erlcloud/merge_me
Merge me - combination of two previous PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment