diff options
author | Micael Karlberg <[email protected]> | 2012-08-17 11:36:28 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2012-08-17 11:36:28 +0200 |
commit | 1105b3f693535a7c1f2578dedf8ccb95bf262d0d (patch) | |
tree | f4b21e26fb82de8114504ff045c0b5779c70afb3 /lib/inets/src/http_client/httpc.erl | |
parent | cd20b76c9acc276c57e5892aa3968fdb359816b9 (diff) | |
parent | 9125e9158a7547e51c94276aec6b98e9424c0c68 (diff) | |
download | otp-1105b3f693535a7c1f2578dedf8ccb95bf262d0d.tar.gz otp-1105b3f693535a7c1f2578dedf8ccb95bf262d0d.tar.bz2 otp-1105b3f693535a7c1f2578dedf8ccb95bf262d0d.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/inets/src/http_client/httpc.erl')
-rw-r--r-- | lib/inets/src/http_client/httpc.erl | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl index f4802fb96d..b6e7708353 100644 --- a/lib/inets/src/http_client/httpc.erl +++ b/lib/inets/src/http_client/httpc.erl @@ -39,6 +39,7 @@ cookie_header/1, cookie_header/2, cookie_header/3, which_cookies/0, which_cookies/1, reset_cookies/0, reset_cookies/1, + which_sessions/0, which_sessions/1, stream_next/1, default_profile/0, profile_name/1, profile_name/2, @@ -267,6 +268,7 @@ set_option(Key, Value, Profile) -> %% Reason - term() %% Description: Retrieves the current options. %%------------------------------------------------------------------------- + get_options() -> record_info(fields, options). @@ -373,8 +375,6 @@ cookie_header(Url, Opts, Profile) {error, {not_started, Profile}} end. - - %%-------------------------------------------------------------------------- %% which_cookies() -> [cookie()] @@ -398,6 +398,28 @@ which_cookies(Profile) -> %%-------------------------------------------------------------------------- +%% which_sessions() -> {GoodSession, BadSessions, NonSessions} +%% which_sessions(Profile) -> {GoodSession, BadSessions, NonSessions} +%% +%% Description: Debug function, dumping the sessions database, sorted +%% into three groups (Good-, Bad- and Non-sessions). +%%------------------------------------------------------------------------- +which_sessions() -> + which_sessions(default_profile()). + +which_sessions(Profile) -> + ?hcrt("which sessions", [{profile, Profile}]), + try + begin + httpc_manager:which_sessions(profile_name(Profile)) + end + catch + exit:{noproc, _} -> + {[], [], []} + end. + + +%%-------------------------------------------------------------------------- %% info() -> list() %% info(Profile) -> list() %% |