eyre: allow header-list to contain multiple cookies

This commit is contained in:
Pyry Kovanen 2023-09-21 00:03:32 +03:00 committed by pkova
parent 6b97c2e8da
commit b977864bec
2 changed files with 9 additions and 8 deletions

View File

@ -121,7 +121,7 @@
:: ::
++ on-poke ++ on-poke
|= [=mark =vase] |= [=mark =vase]
?> (our.bowl src.bowl) ?> (team:title [our src]:bowl)
?. ?=(%azimuth-tracker-poke mark) ?. ?=(%azimuth-tracker-poke mark)
(on-poke:def mark vase) (on-poke:def mark vase)
=+ !<(poke=poke-data vase) =+ !<(poke=poke-data vase)

View File

@ -1347,14 +1347,15 @@
^- (unit @uv) ^- (unit @uv)
:: are there cookies passed with this request? :: are there cookies passed with this request?
:: ::
:: TODO: In HTTP2, the client is allowed to put multiple 'Cookie' =/ cookie-header=@t
:: headers. %+ roll header-list.request
|= [[key=@t value=@t] c=@t]
?. =(key 'cookie')
c
(cat 3 (cat 3 c ?~(c 0 '; ')) value)
:: is the cookie line valid?
:: ::
?~ cookie-header=(get-header:http 'cookie' header-list.request) ?~ cookies=(rush cookie-header cock:de-purl:html)
~
:: is the cookie line is valid?
::
?~ cookies=(rush u.cookie-header cock:de-purl:html)
~ ~
:: is there an urbauth cookie? :: is there an urbauth cookie?
:: ::