aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-11-12 10:46:52 +0100
committerLoïc Hoguin <[email protected]>2020-11-12 10:46:52 +0100
commitfce844e2d6206a3065bca452267f93dc2bcd25de (patch)
tree7171bdfe01efa6f093353bc31de9b8a930d8bb91
parentc20c37dec04f6d27382c7e754f2ba74d4faec517 (diff)
downloadcowlib-fce844e2d6206a3065bca452267f93dc2bcd25de.tar.gz
cowlib-fce844e2d6206a3065bca452267f93dc2bcd25de.tar.bz2
cowlib-fce844e2d6206a3065bca452267f93dc2bcd25de.zip
Fix set-cookie empty domain attribute parsing
We must not remove all domain attributes when we find an empty domain attribute, we must only ignore this one particular cookie-av. (RFC6265bis 5.3.3)
-rw-r--r--src/cow_cookie.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cow_cookie.erl b/src/cow_cookie.erl
index 809ddf2..93a8e61 100644
--- a/src/cow_cookie.erl
+++ b/src/cow_cookie.erl
@@ -232,7 +232,7 @@ parse_set_cookie_attr(<<"max-age">>, Value) ->
parse_set_cookie_attr(<<"domain">>, Value) ->
case Value of
<<>> ->
- {ignore, domain};
+ ignore;
<<".",Rest/bits>> ->
{ok, domain, ?LOWER(Rest)};
_ ->