mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
Ignore the boundary parameter when accepting multipart
This commit is contained in:
parent
dba17fdddb
commit
4fedb33631
3 changed files with 61 additions and 20 deletions
|
@ -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 _:_ ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue