mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
Use binary_to_integer instead of to list and back
This commit is contained in:
parent
9966df9ad4
commit
83aa3f1b9c
4 changed files with 4 additions and 4 deletions
|
@ -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) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue