diff options
author | Micael Karlberg <[email protected]> | 2012-01-03 11:42:58 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2012-01-03 11:42:58 +0100 |
commit | 10014b400da456869449c2affe683ddd2e252d0c (patch) | |
tree | 4fbeb0185735235e1df019bbba7b3f021f3b0257 /lib/inets/src/http_client/httpc_internal.hrl | |
parent | 021d5c2e49e623d4f43c0cc88a097bc99f3564e6 (diff) | |
download | otp-10014b400da456869449c2affe683ddd2e252d0c.tar.gz otp-10014b400da456869449c2affe683ddd2e252d0c.tar.bz2 otp-10014b400da456869449c2affe683ddd2e252d0c.zip |
[inets/httpc] Fix the selection of session for keep-alive mode
When selecting a session, the "state" of the session (specifically if
the server has responded) was not taken into account. Attempting to
fix this, a "state" field (actually available) has been added to the
session record.
OTP-9847
Diffstat (limited to 'lib/inets/src/http_client/httpc_internal.hrl')
-rw-r--r-- | lib/inets/src/http_client/httpc_internal.hrl | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/lib/inets/src/http_client/httpc_internal.hrl b/lib/inets/src/http_client/httpc_internal.hrl index 1d8a5b6a92..3261061d61 100644 --- a/lib/inets/src/http_client/httpc_internal.hrl +++ b/lib/inets/src/http_client/httpc_internal.hrl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2010. All Rights Reserved. +%% Copyright Ericsson AB 2005-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -112,17 +112,37 @@ } ). + -record(session, { - id, % {{Host, Port}, HandlerPid} - client_close, % true | false - scheme, % http (HTTP/TCP) | https (HTTP/SSL/TCP) - socket, % Open socket, used by connection - socket_type, % socket-type, used by connection - queue_length = 1, % Current length of pipeline or keep-alive queue - type % pipeline | keep_alive (wait for response before sending new request) + %% {{Host, Port}, HandlerPid} + id, + + %% true | false + client_close, + + %% http (HTTP/TCP) | https (HTTP/SSL/TCP) + scheme, + + %% Open socket, used by connection + socket, + + %% socket-type, used by connection + socket_type, + + %% Current length of pipeline or keep-alive queue + queue_length = 1, + + %% pipeline | keep_alive (wait for response before sending new request) + type, + + %% true | false + %% This will be true, when a response has been received for + %% the first request. See type above. + available = false }). + -record(http_cookie, { domain, |