In prior commit, missed switch of matchspec to work
with deletes, fixed here.
Added retry logic for race conditions around lb and
conn both trying to update same record at the same time.
If more than max is experienced, just let it go, things
will probably be ok.
Big commit. Switched algorithm to one which will favor
the connection with the smallest pipeline first
(deciding ties by timestamp of last finished request,
and then by pid as ultimate tie breaker).
Note: this also drastically changes the internal
representation of the connection in ets and is dependent
on specific order of operations when changing key values
to limit risk of race conditions between loadbalancer
and a given connection.
Also removed connection reporting of start of request
as this was no longer necessary since the load balancer
tees up the entry into ets with a 1.
Difference between speculative and "real" size was no
longer material to the algorithm. Used macro to enforce
consistent usage of ceiling for pipeline.
HTTP connection process now manages both scenarios
requiring cleaning up of the load balancer's ets table;
instead of this being owned by both the conn and lb.
Moved all interactions with ets table tracking
connections to API functions on ibrowse_lb,
to reduce knowledge of ets table and its structure.
Also fixed "bug" where ceiling for pipelining
threshold was different than the set value for increment;
made them the same.
Tracking size in http connection process state
was unnecessary as it wasn't queried for logic
or obvious reporting and ets table should have
right (within 1) value already.
Verified that all code paths using saved table
identifier from state are guarded either by a
check for undefined or a call to maybe_create_ets,
so the table should always be there when it
is needed without creating before real use.
Prior version was "2". New functional tests suite
was not being picked up by local rebar, but was
execute with my local which is version "2.5.2"
which targets the same version of Erlang/OTP
as iBrowse (R16).
Supports HTTP and HTTPS destinations and performs all hostname
resolution via the SOCKS proxy, preventing privacy leakage if used
with Tor.
If hostname is a valid IP address then it is used directly, the
hostname is not resolved again via the SOCKS5 proxy (Patch suggested
by Klaus Trainer but implementation here slightly different).
if the option return_raw_request` was unset or false, ibrowse was
still returning the returning thhe raw request. This change fix it.
(Spotted while running couchdb tests)
fix function_clause error:
{error,
{error,
{'EXIT',
{{function_clause,
[{ibrowse_http_client,do_send_body_1,
[{{ok,<<>>},
The case {Function, State} wasn't took in consideration while handling
the body.