Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Missing case clause in cowboy_req:cookie/3 #489

Closed
wants to merge 3 commits into from

2 participants

@lpgauth

No description provided.

@lpgauth lpgauth closed this
@essen
Owner

Why closed?

@lpgauth

I was going to resend it from a branch so that my other commits don't magically appear in the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 5, 2013
  1. @lpgauth
Commits on Apr 8, 2013
  1. @lpgauth
  2. @lpgauth
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +1 −1  rebar.config
  2. +3 −1 src/cowboy_req.erl
View
2  rebar.config
@@ -1,3 +1,3 @@
{deps, [
- {ranch, ".*", {git, "git://github.com/extend/ranch.git", "0.8.0"}}
+ {ranch, ".*", {git, "git://github.com/lpgauth/ranch.git", "master"}}
]}.
View
4 src/cowboy_req.erl
@@ -517,7 +517,9 @@ cookie(Name, Req=#http_req{cookies=undefined}, Default) when is_binary(Name) ->
{ok, undefined, Req2} ->
{Default, Req2#http_req{cookies=[]}};
{ok, Cookies, Req2} ->
- cookie(Name, Req2#http_req{cookies=Cookies}, Default)
+ cookie(Name, Req2#http_req{cookies=Cookies}, Default);
+ {error, badarg} ->
+ {Default, Req}
end;
cookie(Name, Req, Default) ->
case lists:keyfind(Name, 1, Req#http_req.cookies) of
Something went wrong with that request. Please try again.