0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 20:50:24 +00:00

Don't use decode_packet/3 for parsing the request-line

First step in making all methods and header names binaries to
get rid of many inconsistencies caused by decode_packet/3.

Methods are all binary now. Note that since they are case
sensitive, the usual methods become <<"GET">>, <<"POST">> and so on.
This commit is contained in:
Loïc Hoguin 2012-09-20 06:22:51 +02:00
parent f6791b008a
commit 8497c8bbcd
10 changed files with 147 additions and 107 deletions

View file

@ -6,7 +6,7 @@ init(_Transport, _Req, _Opts) ->
{upgrade, protocol, cowboy_rest}.
allowed_methods(Req, State) ->
{['GET', 'HEAD', 'DELETE'], Req, State}.
{[<<"GET">>, <<"HEAD">>, <<"DELETE">>], Req, State}.
content_types_provided(Req, State) ->