summaryrefslogtreecommitdiff
path: root/test-suite/tests/web-request.test
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-01-08 20:50:46 -0800
committerAndy Wingo <wingo@pobox.com>2011-01-08 20:50:46 -0800
commit0acc595b943dedf6bf429e21e7b69aa2fcec767a (patch)
tree3f369d1d3345c88f0f052a54fb0a51b656fe1927 /test-suite/tests/web-request.test
parent32de1aa783c65a7c489c924b3fa41ee08187c15b (diff)
downloadguile-0acc595b943dedf6bf429e21e7b69aa2fcec767a.tar.gz
(web http): keys are always symbols
* module/web/http.scm (parse-media-type): Parse media types as symbols. (parse-key-value-list, parse-param-component, parse-param-list): Change kons to val-parser. Always parse keys as symbols, and always either cons, if there is a val, or just have the key, if there is no val. Easier to explain and just as correct. (declare-param-list-header!, declare-key-value-list-header!): Adapt to key-list and param-list kons change. ("Cache-Control", "Pragma", "Transfer-Encoding", "Accept", "Expect") ("TE"): Likewise, adapt. ("Content-Type"): Param keys are symbols.
Diffstat (limited to 'test-suite/tests/web-request.test')
-rw-r--r--test-suite/tests/web-request.test14
1 files changed, 7 insertions, 7 deletions
diff --git a/test-suite/tests/web-request.test b/test-suite/tests/web-request.test
index 82759bd6b..32b99dd99 100644
--- a/test-suite/tests/web-request.test
+++ b/test-suite/tests/web-request.test
@@ -1,6 +1,6 @@
;;;; web-request.test --- HTTP requests -*- mode: scheme; coding: utf-8; -*-
;;;;
-;;;; Copyright (C) 2010 Free Software Foundation, Inc.
+;;;; Copyright (C) 2010, 2011 Free Software Foundation, Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@@ -61,12 +61,12 @@ Accept-Language: en-gb, en;q=0.9\r
(request-headers r)
'((host . ("localhost" . 8080))
(user-agent . "Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Safari/531.2+ Epiphany/2.30.2")
- (accept . (("application/xml")
- ("application/xhtml+xml")
- ("text/html" (q . 900))
- ("text/plain" (q . 800))
- ("image/png")
- ("*/*" (q . 500))))
+ (accept . ((application/xml)
+ (application/xhtml+xml)
+ (text/html (q . 900))
+ (text/plain (q . 800))
+ (image/png)
+ (*/* (q . 500))))
(accept-encoding . ((1000 . "gzip")))
(accept-language . ((1000 . "en-gb") (900 . "en"))))))