aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_rest.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-02-04 16:18:28 +0100
committerLoïc Hoguin <[email protected]>2015-02-04 16:18:28 +0100
commit89c47d3d6edc8aafb4c9c4a5a86fb0239dee8f3a (patch)
tree3e340804d2417c397c3b9b7f57325fcc26a49a3a /src/cowboy_rest.erl
parent3cede06283a2b7b33ec822526341a9261574a2bf (diff)
downloadcowboy-89c47d3d6edc8aafb4c9c4a5a86fb0239dee8f3a.tar.gz
cowboy-89c47d3d6edc8aafb4c9c4a5a86fb0239dee8f3a.tar.bz2
cowboy-89c47d3d6edc8aafb4c9c4a5a86fb0239dee8f3a.zip
Use cowlib for parsing headers; remove cowboy_http
Diffstat (limited to 'src/cowboy_rest.erl')
-rw-r--r--src/cowboy_rest.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_rest.erl b/src/cowboy_rest.erl
index dea47d8..b894354 100644
--- a/src/cowboy_rest.erl
+++ b/src/cowboy_rest.erl
@@ -234,7 +234,7 @@ content_types_provided(Req, State) ->
normalize_content_types({ContentType, Callback})
when is_binary(ContentType) ->
- {cowboy_http:content_type(ContentType), Callback};
+ {cow_http_hd:parse_content_type(ContentType), Callback};
normalize_content_types(Normalized) ->
Normalized.
@@ -896,7 +896,7 @@ generate_etag(Req, State=#state{etag=undefined}) ->
no_call ->
{undefined, Req, State#state{etag=no_call}};
{Etag, Req2, HandlerState} when is_binary(Etag) ->
- [Etag2] = cowboy_http:entity_tag_match(Etag),
+ Etag2 = cow_http_hd:parse_etag(Etag),
{Etag2, Req2, State#state{handler_state=HandlerState, etag=Etag2}};
{Etag, Req2, HandlerState} ->
{Etag, Req2, State#state{handler_state=HandlerState, etag=Etag}}