diff options
author | Mark H Weaver <mhw@netris.org> | 2019-06-18 08:26:00 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2019-06-18 08:28:01 -0400 |
commit | 73cde5ed7218a090ecee888870908af5445796f0 (patch) | |
tree | 6de77dc2b843e83404261627c01500ab8c652922 /test-suite | |
parent | 579dd2da449be194a95d41a27317a453c1aa0568 (diff) |
web: Add support for HTTP header continuation lines.
* module/web/http.scm (spaces-and-tabs, space-or-tab?): New variables.
(read-header-line): After reading a header, if a space or tab follows,
read the continuation lines and join them.
* test-suite/tests/web-http.test: Add test.
Diffstat (limited to 'test-suite')
-rw-r--r-- | test-suite/tests/web-http.test | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test-suite/tests/web-http.test b/test-suite/tests/web-http.test index 63377349c..c1cf0882e 100644 --- a/test-suite/tests/web-http.test +++ b/test-suite/tests/web-http.test @@ -1,6 +1,6 @@ ;;;; web-http.test --- HTTP library -*- mode: scheme; coding: utf-8; -*- ;;;; -;;;; Copyright (C) 2010-2011, 2014-2017 Free Software Foundation, Inc. +;;;; Copyright (C) 2010-2011, 2014-2017, 2019 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 @@ -242,6 +242,15 @@ (pass-if-round-trip "Cache-Control: acme-cache-extension=100 quux\r\n") (pass-if-round-trip "Cache-Control: acme-cache-extension=\"100, quux\"\r\n") + (let ((str "Cache-Control: acme-cache-extension=\"100,\r\n\t foo,\r\n quux\"\r\n") + (val '(cache-control . ((acme-cache-extension . "100, foo, quux"))))) + (pass-if-equal "continuation lines" + val + (call-with-values (lambda () + (read-header (open-input-string str))) + (lambda (sym val) + (cons sym val))))) + (pass-if-parse connection "close" '(close)) (pass-if-parse connection "Content-Encoding" '(content-encoding)) |