diff options
author | Loïc Hoguin <[email protected]> | 2012-02-20 08:25:05 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2012-02-20 08:25:05 +0100 |
commit | f51493ee376f0ea9eef137f19e6fd0e16e199b8e (patch) | |
tree | f5aba326ddb41d128062182fb3c104ca7bc9d680 /src/cowboy_multipart.erl | |
parent | e7b6e2a402922724ffd668161ed1b65533b5c034 (diff) | |
download | cowboy-f51493ee376f0ea9eef137f19e6fd0e16e199b8e.tar.gz cowboy-f51493ee376f0ea9eef137f19e6fd0e16e199b8e.tar.bz2 cowboy-f51493ee376f0ea9eef137f19e6fd0e16e199b8e.zip |
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.
Diffstat (limited to 'src/cowboy_multipart.erl')
-rw-r--r-- | src/cowboy_multipart.erl | 6 |
1 files changed, 4 insertions, 2 deletions
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. |