diff options
author | Micael Karlberg <[email protected]> | 2012-03-15 12:23:12 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2012-03-15 12:23:12 +0100 |
commit | ec6337c42085728edac30d9fa7307f7911bd0391 (patch) | |
tree | 488bb8b7dc152694b9207f1ed6e881ff0ab87d89 /lib/inets/src/http_client/httpc_manager.erl | |
parent | 1017c9b5629148f3d584434f1c351cf1e8dded24 (diff) | |
parent | dbf9c223cf7efd8fc6143b573fcc12637d5ae9ae (diff) | |
download | otp-ec6337c42085728edac30d9fa7307f7911bd0391.tar.gz otp-ec6337c42085728edac30d9fa7307f7911bd0391.tar.bz2 otp-ec6337c42085728edac30d9fa7307f7911bd0391.zip |
Merge branch 'bmk/inets/official_http_uri/OTP-9983' into bmk/inets/inets59_integration2
Diffstat (limited to 'lib/inets/src/http_client/httpc_manager.erl')
-rw-r--r-- | lib/inets/src/http_client/httpc_manager.erl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/inets/src/http_client/httpc_manager.erl b/lib/inets/src/http_client/httpc_manager.erl index 33b5dfe046..b225b43214 100644 --- a/lib/inets/src/http_client/httpc_manager.erl +++ b/lib/inets/src/http_client/httpc_manager.erl @@ -446,7 +446,7 @@ handle_call(which_cookies, _, #state{cookie_db = CookieDb} = State) -> handle_call({which_cookies, Url, Options}, _, #state{cookie_db = CookieDb} = State) -> ?hcrv("which cookies", [{url, Url}, {options, Options}]), - case http_uri:parse(Url, Options) of + case uri_parse(Url, Options) of {ok, {Scheme, _, Host, Port, Path, _}} -> CookieHeaders = httpc_cookie:header(CookieDb, Scheme, {Host, Port}, Path), @@ -894,6 +894,19 @@ make_db_name(ProfileName, Post) -> list_to_atom(atom_to_list(ProfileName) ++ Post). +%%-------------------------------------------------------------------------- +%% These functions is just simple wrappers to parse specifically HTTP URIs +%%-------------------------------------------------------------------------- + +scheme_defaults() -> + [{http, 80}, {https, 443}]. + +uri_parse(URI, Opts) -> + http_uri:parse(URI, [{scheme_defaults, scheme_defaults()} | Opts]). + + +%%-------------------------------------------------------------------------- + call(ProfileName, Msg) -> Timeout = infinity, |