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

View File

@ -1347,14 +1347,15 @@
^- (unit @uv)
:: are there cookies passed with this request?
::
:: TODO: In HTTP2, the client is allowed to put multiple 'Cookie'
:: headers.
=/ cookie-header=@t
%+ 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)
~
:: is the cookie line is valid?
::
?~ cookies=(rush u.cookie-header cock:de-purl:html)
?~ cookies=(rush cookie-header cock:de-purl:html)
~
:: is there an urbauth cookie?
::