From f51493ee376f0ea9eef137f19e6fd0e16e199b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 20 Feb 2012 08:25:05 +0100 Subject: Add 'Expect' header parsing At the same time renaming cowboy_http:content_type_params/3 to cowboy_http:params/2 (with a default Acc of []) as this code isn't useful only for content types. --- src/cowboy_multipart.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/cowboy_multipart.erl') diff --git a/src/cowboy_multipart.erl b/src/cowboy_multipart.erl index b7aeb54..2428b52 100644 --- a/src/cowboy_multipart.erl +++ b/src/cowboy_multipart.erl @@ -45,8 +45,10 @@ content_disposition(Data) -> cowboy_http:token_ci(Data, fun (_Rest, <<>>) -> {error, badarg}; (Rest, Disposition) -> - cowboy_http:content_type_params(Rest, - fun (Params) -> {Disposition, Params} end, []) + cowboy_http:params(Rest, + fun (<<>>, Params) -> {Disposition, Params}; + (_Rest2, _) -> {error, badarg} + end) end). %% Internal. -- cgit v1.2.3