0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 04:10:24 +00:00

Change the order of set_resp_cookie arguments

The Opts value is put last, to be more consistent with the
rest of the cowboy_req module.

Additionally a test handler was fixed which reduced the number
of errors in http_SUITE.
This commit is contained in:
Loïc Hoguin 2017-02-19 09:46:11 +01:00
parent 87a05a1219
commit 91ae70b06c
No known key found for this signature in database
GPG key ID: 71366FF21851DF03
6 changed files with 34 additions and 42 deletions

View file

@ -8,7 +8,7 @@
init(Req0, Opts) ->
NewValue = integer_to_list(rand:uniform(1000000)),
Req1 = cowboy_req:set_resp_cookie(<<"server">>, NewValue,
#{path => <<"/">>}, Req0),
Req0, #{path => <<"/">>}),
#{client := ClientCookie, server := ServerCookie}
= cowboy_req:match_cookies([{client, [], <<>>}, {server, [], <<>>}], Req1),
{ok, Body} = toppage_dtl:render([