diff options
author | Micael Karlberg <[email protected]> | 2010-06-07 12:35:28 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-06-07 15:18:10 +0200 |
commit | 23fbb26b04921f98c78c600506fa754914f76af2 (patch) | |
tree | 0b433c6781371aae10afc119bb4f37cd8da04113 /lib/inets/src/http_client/httpc_request.erl | |
parent | 9e69214f56cd5031f684da71a9eb24fa7003d1f2 (diff) | |
download | otp-23fbb26b04921f98c78c600506fa754914f76af2.tar.gz otp-23fbb26b04921f98c78c600506fa754914f76af2.tar.bz2 otp-23fbb26b04921f98c78c600506fa754914f76af2.zip |
OTP-7907: Allow the use of the "new" ssl (essl).
OTP-8564: Update deeprication status.
OTP-8573: Inets mod_alias URL rewrite.
Diffstat (limited to 'lib/inets/src/http_client/httpc_request.erl')
-rw-r--r-- | lib/inets/src/http_client/httpc_request.erl | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/inets/src/http_client/httpc_request.erl b/lib/inets/src/http_client/httpc_request.erl index 55e0af4b42..d4df97ad40 100644 --- a/lib/inets/src/http_client/httpc_request.erl +++ b/lib/inets/src/http_client/httpc_request.erl @@ -19,12 +19,13 @@ -module(httpc_request). --include("http_internal.hrl"). +-include_lib("inets/src/http_lib/http_internal.hrl"). -include("httpc_internal.hrl"). %%% Internal API -export([send/3, is_idempotent/1, is_client_closing/1]). + %%%========================================================================= %%% Internal application API %%%========================================================================= @@ -39,10 +40,9 @@ %% %% Description: Composes and sends a HTTP-request. %%------------------------------------------------------------------------- -send(SendAddr, #request{scheme = Scheme, socket_opts = SocketOpts} = Request, - Socket) +send(SendAddr, #session{socket = Socket, socket_type = SocketType}, + #request{socket_opts = SocketOpts} = Request) when is_list(SocketOpts) -> - SocketType = socket_type(Scheme), case http_transport:setopts(SocketType, Socket, SocketOpts) of ok -> send(SendAddr, Socket, SocketType, @@ -50,8 +50,7 @@ send(SendAddr, #request{scheme = Scheme, socket_opts = SocketOpts} = Request, {error, Reason} -> {error, {setopts_failed, Reason}} end; -send(SendAddr, #request{scheme = Scheme} = Request, Socket) -> - SocketType = socket_type(Scheme), +send(SendAddr, #session{socket = Socket, socket_type = SocketType}, Request) -> send(SendAddr, Socket, SocketType, Request). send(SendAddr, Socket, SocketType, @@ -209,10 +208,6 @@ headers(_, "HTTP/0.9") -> headers(Headers, _) -> Headers. -socket_type(http) -> - ip_comm; -socket_type(https) -> - {ssl, []}. http_headers([], Headers) -> lists:flatten(Headers); |