http: Accept empty reason phrases.
Fixes <http://bugs.gnu.org/22273>. Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>. * module/web/http.scm (read-header-line): New procedure. (read-response-line): Use it instead of 'read-line*'. * test-suite/tests/web-http.test ("read-response-line"): Add test.
This commit is contained in:
parent
3829047ec7
commit
f53145d41c
2 changed files with 25 additions and 6 deletions
|
|
@ -194,7 +194,11 @@
|
|||
(pass-if-read-response-line "HTTP/1.0 404 Not Found"
|
||||
(1 . 0) 404 "Not Found")
|
||||
(pass-if-read-response-line "HTTP/1.1 200 OK"
|
||||
(1 . 1) 200 "OK"))
|
||||
(1 . 1) 200 "OK")
|
||||
|
||||
;; Empty reason phrases are valid; see <http://bugs.gnu.org/22273>.
|
||||
(pass-if-read-response-line "HTTP/1.1 302 "
|
||||
(1 . 1) 302 ""))
|
||||
|
||||
(with-test-prefix "write-response-line"
|
||||
(pass-if-write-response-line "HTTP/1.0 404 Not Found"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue