aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-08-10 17:50:28 +0200
committerLoïc Hoguin <[email protected]>2016-08-10 17:50:28 +0200
commit83aa3f1b9c7aeafaed2b798f75bea929e5090ed0 (patch)
treebd19ccb3023f33076503d77661a7336adcf4ec22 /src/cowboy_http.erl
parent9966df9ad4ddf74111d8cbffb6658497319a89b4 (diff)
downloadcowboy-83aa3f1b9c7aeafaed2b798f75bea929e5090ed0.tar.gz
cowboy-83aa3f1b9c7aeafaed2b798f75bea929e5090ed0.tar.bz2
cowboy-83aa3f1b9c7aeafaed2b798f75bea929e5090ed0.zip
Use binary_to_integer instead of to list and back
Diffstat (limited to 'src/cowboy_http.erl')
-rw-r--r--src/cowboy_http.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl
index 773f891..5ec7d0e 100644
--- a/src/cowboy_http.erl
+++ b/src/cowboy_http.erl
@@ -578,7 +578,7 @@ parse_host(<< $[, Rest/bits >>, false, <<>>) ->
parse_host(<<>>, false, Acc) ->
{Acc, undefined};
parse_host(<< $:, Rest/bits >>, false, Acc) ->
- {Acc, list_to_integer(binary_to_list(Rest))};
+ {Acc, binary_to_integer(Rest)};
parse_host(<< $], Rest/bits >>, true, Acc) ->
parse_host(Rest, false, << Acc/binary, $] >>);
parse_host(<< C, Rest/bits >>, E, Acc) ->