aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets
diff options
context:
space:
mode:
authorMyron Marston <[email protected]>2017-03-01 09:34:50 -0800
committerMyron Marston <[email protected]>2017-03-01 09:34:50 -0800
commiteb437db9e7df90d5e72d6314ee7c49cbde77135a (patch)
tree42f92121e53f6ecafd74d9b74590526430c31fab /lib/inets
parent6a5aa63cbadbc831b38ef7781ca80c759debef44 (diff)
downloadotp-eb437db9e7df90d5e72d6314ee7c49cbde77135a.tar.gz
otp-eb437db9e7df90d5e72d6314ee7c49cbde77135a.tar.bz2
otp-eb437db9e7df90d5e72d6314ee7c49cbde77135a.zip
Fix typos: lenght -> length
Diffstat (limited to 'lib/inets')
-rw-r--r--lib/inets/doc/src/notes.xml2
-rw-r--r--lib/inets/src/http_client/httpc_response.erl2
-rw-r--r--lib/inets/test/httpd_1_1.erl4
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml
index 5c3b5a2d3c..1d8432ee35 100644
--- a/lib/inets/doc/src/notes.xml
+++ b/lib/inets/doc/src/notes.xml
@@ -713,7 +713,7 @@
<list>
<item>
<p>
- Gracefully handle invalid content-lenght headers instead
+ Gracefully handle invalid content-length headers instead
of crashing in list_to_integer.</p>
<p>
Own Id: OTP-12429</p>
diff --git a/lib/inets/src/http_client/httpc_response.erl b/lib/inets/src/http_client/httpc_response.erl
index 0fd5faa466..d24705a845 100644
--- a/lib/inets/src/http_client/httpc_response.erl
+++ b/lib/inets/src/http_client/httpc_response.erl
@@ -434,7 +434,7 @@ format_response({StatusLine, Headers, Body}) ->
Length = list_to_integer(Headers#http_response_h.'content-length'),
{NewBody, Data} =
case Length of
- -1 -> % When no lenght indicator is provided
+ -1 -> % When no length indicator is provided
{Body, <<>>};
Length when (Length =< size(Body)) ->
<<BodyThisReq:Length/binary, Next/binary>> = Body,
diff --git a/lib/inets/test/httpd_1_1.erl b/lib/inets/test/httpd_1_1.erl
index 3755ed117b..2b5968ca12 100644
--- a/lib/inets/test/httpd_1_1.erl
+++ b/lib/inets/test/httpd_1_1.erl
@@ -405,11 +405,11 @@ getRangeSize(Head)->
{multiPart, BoundaryString};
_X1 ->
case re:run(Head, ?CONTENT_RANGE "bytes=.*\r\n", [{capture, first}]) of
- {match, [{Start, Lenght}]} ->
+ {match, [{Start, Length}]} ->
%% Get the range data remove the fieldname and the
%% end of line.
RangeInfo = string:substr(Head, Start + 1 + 20,
- Lenght - (20 +2)),
+ Length - (20 +2)),
rangeSize(string:strip(RangeInfo));
_X2 ->
error