mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
http: Test that responses lacking CR/LF are rejected.
* test-suite/tests/web-http.test ("read-response-line")["missing CR/LF"]: New test.
This commit is contained in:
parent
95d146ff51
commit
3829047ec7
1 changed files with 5 additions and 0 deletions
|
@ -186,6 +186,11 @@
|
|||
(1 . 1)))
|
||||
|
||||
(with-test-prefix "read-response-line"
|
||||
(pass-if-exception "missing CR/LF"
|
||||
`(bad-header . "")
|
||||
(call-with-input-string "HTTP/1.1 200 Almost okay"
|
||||
(lambda (port)
|
||||
(read-response-line port))))
|
||||
(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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue