diff options
author | Micael Karlberg <bmk@erlang.org> | 2011-06-01 17:24:22 +0200 |
---|---|---|
committer | Micael Karlberg <bmk@erlang.org> | 2011-06-15 18:16:19 +0200 |
commit | 6a87b618ae7702f569f73b45fa9008dede557dbf (patch) | |
tree | 00a2ab36f9972c1951370f4cc8f759ad0987c272 /lib/inets | |
parent | 6d3f12f6921155ffbe5e5e5b84734657be97ff1c (diff) | |
download | otp-6a87b618ae7702f569f73b45fa9008dede557dbf.tar.gz otp-6a87b618ae7702f569f73b45fa9008dede557dbf.tar.bz2 otp-6a87b618ae7702f569f73b45fa9008dede557dbf.zip |
Temporary solution for profile_name stuff. What about Pids???
Diffstat (limited to 'lib/inets')
-rw-r--r-- | lib/inets/src/http_client/httpc.erl | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl index 6ffa5e8ba5..d957e97122 100644 --- a/lib/inets/src/http_client/httpc.erl +++ b/lib/inets/src/http_client/httpc.erl @@ -65,16 +65,18 @@ default_profile() -> profile_name(?DEFAULT_PROFILE) -> httpc_manager; profile_name(Profile) -> - profile_name("httpc_manager_", Profile). + Prefix = lists:flatten(io_lib:format("~w_", [?MODULE])), + profile_name(Prefix, Profile). profile_name(Prefix, Profile) when is_atom(Profile) -> list_to_atom(Prefix ++ atom_to_list(Profile)); -profile_name(Prefix, Profile) when is_pid(Profile) -> - ProfileStr0 = - string:strip(string:strip(erlang:pid_to_list(Profile), left, $<), right, $>), - F = fun($.) -> $_; (X) -> X end, - ProfileStr = [F(C) || C <- ProfileStr0], - list_to_atom(Prefix ++ "pid_" ++ ProfileStr). +profile_name(_Prefix, Profile) when is_pid(Profile) -> + Profile. + %% ProfileStr0 = + %% string:strip(string:strip(erlang:pid_to_list(Profile), left, $<), right, $>), + %% F = fun($.) -> $_; (X) -> X end, + %% ProfileStr = [F(C) || C <- ProfileStr0], + %% list_to_atom(Prefix ++ "pid_" ++ ProfileStr). %%-------------------------------------------------------------------------- @@ -115,9 +117,11 @@ request(Url, Profile) -> %% {keyfile, path()} | {password, string()} | {cacertfile, path()} | %% {ciphers, string()} %% Options - [Option] -%% Option - {sync, Boolean} | {body_format, BodyFormat} | -%% {full_result, Boolean} | {stream, To} | -%% {headers_as_is, Boolean} +%% Option - {sync, Boolean} | +%% {body_format, BodyFormat} | +%% {full_result, Boolean} | +%% {stream, To} | +%% {headers_as_is, Boolean} %% StatusLine = {HTTPVersion, StatusCode, ReasonPhrase}</v> %% HTTPVersion = string() %% StatusCode = integer() |