mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
better cache-control: private, no-cache parsing
* module/web/http.scm (cache-control): Parse private and no-cache better. * test-suite/tests/web-http.test ("general headers"): Update.
This commit is contained in:
parent
ac7f17e3ca
commit
25731543d4
2 changed files with 12 additions and 3 deletions
|
@ -966,7 +966,12 @@ phrase\"."
|
|||
((max-age max-stale min-fresh s-maxage)
|
||||
(cons k (parse-non-negative-integer v-str)))
|
||||
((private no-cache)
|
||||
(cons k (if v-str (split-and-trim v-str) #t)))
|
||||
(if v-str
|
||||
(cons k (map (lambda (f)
|
||||
(or (and=> (lookup-header-decl f) header-decl-sym)
|
||||
f))
|
||||
(split-and-trim v-str)))
|
||||
k))
|
||||
(else (if v-str (cons k v-str) k))))
|
||||
default-kv-validator
|
||||
(lambda (k v port)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue