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
|
@ -11,7 +11,7 @@ init(Req, Opts) ->
|
|||
multipart(Req) ->
|
||||
case cowboy_req:read_part(Req) of
|
||||
{ok, [{<<"content-length">>, BinLength}], Req2} ->
|
||||
Length = list_to_integer(binary_to_list(BinLength)),
|
||||
Length = binary_to_integer(BinLength),
|
||||
{Length, Req3} = stream_body(Req2, 0),
|
||||
multipart(Req3);
|
||||
{done, Req2} ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue