mirror of
https://github.com/edgurgel/httparrot
synced 2025-04-22 14:27:10 -04:00
Fix req being used in an unsafe way.
This fixes a warning that occurs in Elixir 1.3
This commit is contained in:
parent
9152dff745
commit
d4e826cd5b
1 changed files with 3 additions and 1 deletions
|
@ -62,7 +62,9 @@ defmodule HTTParrot do
|
||||||
body = JSX.prettify!(body)
|
body = JSX.prettify!(body)
|
||||||
headers = List.keystore(headers, "content-length", 0, {"content-length", Integer.to_char_list(String.length(body))})
|
headers = List.keystore(headers, "content-length", 0, {"content-length", Integer.to_char_list(String.length(body))})
|
||||||
{:ok, req} = :cowboy_req.reply(status, headers, body, req)
|
{:ok, req} = :cowboy_req.reply(status, headers, body, req)
|
||||||
end
|
req
|
||||||
|
else
|
||||||
req
|
req
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue