From 561669178798ad4ed438d3317c0afc151084015f Mon Sep 17 00:00:00 2001 From: Giftpflanze Date: Fri, 12 Mar 2021 11:52:55 +0000 Subject: [PATCH] http: Make parse-set-cookie matching case insensitive --- basis/http/http.factor | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/basis/http/http.factor b/basis/http/http.factor index 45efd1f39b..0f5eff158a 100644 --- a/basis/http/http.factor +++ b/basis/http/http.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2003, 2010 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors arrays assocs base64 calendar calendar.format +USING: accessors arrays ascii assocs base64 calendar calendar.format calendar.parser combinators fry hashtables http.parsers io io.crlf io.encodings.iana io.encodings.utf8 kernel make math math.parser mime.types present sequences sets sorting splitting urls ; @@ -52,7 +52,7 @@ TUPLE: cookie name value version comment path domain expires max-age http-only s f swap (parse-set-cookie) [ - swap { + over >lower [ swapd ] dip { { "version" [ >>version ] } { "comment" [ >>comment ] } { "expires" [ [ cookie-string>timestamp >>expires ] unless-empty ] } @@ -61,8 +61,9 @@ TUPLE: cookie name value version comment path domain expires max-age http-only s { "path" [ >>path ] } { "httponly" [ drop t >>http-only ] } { "secure" [ drop t >>secure ] } - [ dup , nip ] + [ drop rot dup , ] } case + nip ] assoc-each drop ] { } make ; -- 2.34.1