Skip to content

Commit a64a5be

Browse files
committed
Fix: requests with body missing content-type header
1 parent 10d66e2 commit a64a5be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cowboy_reverse_proxy.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ request(Req, Opts) ->
130130
RequestHeaders = request_headers(Req, Opts),
131131
case cowboy_req:has_body(Req) of
132132
true ->
133-
ContentType = to_string(cowboy_req:header("content-type", Req, "")),
133+
ContentType = to_string(cowboy_req:header(<<"content-type">>, Req, "")),
134134
{BodyReq, Body} = request_body(Req, Opts),
135135
{BodyReq, {RequestURL, RequestHeaders, ContentType, Body}};
136136
false ->

0 commit comments

Comments
 (0)