aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-11-14 18:03:40 +0100
committerLoïc Hoguin <[email protected]>2018-11-14 18:04:32 +0100
commit4fedb336311604253153eafe81f33a77b44a0b2f (patch)
tree9e2f0093715e4694dad3a48507310ba79a3f49f3 /src
parentdba17fdddb2d0a7a832afb9480ec6515a38a15d7 (diff)
downloadcowboy-4fedb336311604253153eafe81f33a77b44a0b2f.tar.gz
cowboy-4fedb336311604253153eafe81f33a77b44a0b2f.tar.bz2
cowboy-4fedb336311604253153eafe81f33a77b44a0b2f.zip
Ignore the boundary parameter when accepting multipart
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_rest.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cowboy_rest.erl b/src/cowboy_rest.erl
index 606f47f..76eda79 100644
--- a/src/cowboy_rest.erl
+++ b/src/cowboy_rest.erl
@@ -1060,6 +1060,10 @@ accept_resource(Req, State) ->
{CTA, Req2, State2} ->
CTA2 = [normalize_content_types(P) || P <- CTA],
try cowboy_req:parse_header(<<"content-type">>, Req2) of
+ %% We do not match against the boundary parameter for multipart.
+ {Type = <<"multipart">>, SubType, Params} ->
+ ContentType = {Type, SubType, lists:keydelete(<<"boundary">>, 1, Params)},
+ choose_content_type(Req2, State2, ContentType, CTA2);
ContentType ->
choose_content_type(Req2, State2, ContentType, CTA2)
catch _:_ ->