aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-06-15 17:14:54 +0200
committerMicael Karlberg <[email protected]>2011-06-15 17:14:54 +0200
commite4605d7a3b9f9be9e437689a79df0f568df8fdac (patch)
tree22e71c15c35741b7764b31e0a8011e2b22dfc09b /lib/inets/src
parent5eec30647ab41ad9a0c9911d2e4e300ecb501333 (diff)
downloadotp-e4605d7a3b9f9be9e437689a79df0f568df8fdac.tar.gz
otp-e4605d7a3b9f9be9e437689a79df0f568df8fdac.tar.bz2
otp-e4605d7a3b9f9be9e437689a79df0f568df8fdac.zip
[httpc] Remove unnecessary usage of iolist_to_binary when
processing body (for PUT and POST). Filipe David Manana OTP-9317
Diffstat (limited to 'lib/inets/src')
-rw-r--r--lib/inets/src/http_client/httpc.erl14
-rw-r--r--lib/inets/src/inets_app/inets.appup.src10
2 files changed, 16 insertions, 8 deletions
diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl
index 6ffa5e8ba5..8aaa9ec402 100644
--- a/lib/inets/src/http_client/httpc.erl
+++ b/lib/inets/src/http_client/httpc.erl
@@ -518,17 +518,15 @@ mk_chunkify_fun(ProcessBody) ->
eof ->
{ok, <<"0\r\n\r\n">>, eof_body};
{ok, Data, NewAcc} ->
- {ok, mk_chunk_bin(Data), NewAcc}
+ Chunk = [
+ integer_to_list(iolist_size(Data), 16),
+ "\r\n",
+ Data,
+ "\r\n"],
+ {ok, Chunk, NewAcc}
end
end.
-mk_chunk_bin(Data) ->
- Bin = iolist_to_binary(Data),
- iolist_to_binary([hex_size(Bin), "\r\n", Bin, "\r\n"]).
-
-hex_size(Bin) ->
- hd(io_lib:format("~.16B", [size(Bin)])).
-
handle_answer(RequestId, false, _) ->
{ok, RequestId};
diff --git a/lib/inets/src/inets_app/inets.appup.src b/lib/inets/src/inets_app/inets.appup.src
index 47f3fbba58..260a0984f2 100644
--- a/lib/inets/src/inets_app/inets.appup.src
+++ b/lib/inets/src/inets_app/inets.appup.src
@@ -18,6 +18,11 @@
{"%VSN%",
[
+ {"5.6",
+ [
+ {load_module, httpc, soft_purge, soft_purge, []}
+ ]
+ },
{"5.5.2",
[
{restart_application, inets}
@@ -40,6 +45,11 @@
}
],
[
+ {"5.6",
+ [
+ {load_module, httpc, soft_purge, soft_purge, []}
+ ]
+ },
{"5.5.2",
[
{restart_application, inets}