guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 40/47: http: Test that responses lacking CR/LF are rejec


From: Andy Wingo
Subject: [Guile-commits] 40/47: http: Test that responses lacking CR/LF are rejected.
Date: Sun, 22 May 2016 18:23:06 +0000 (UTC)

wingo pushed a commit to branch master
in repository guile.

commit 3829047ec78d8001bf559fd0fb8ceae100f77e8f
Author: Ludovic Court├Ęs <address@hidden>
Date:   Wed Jan 6 15:06:52 2016 +0100

    http: Test that responses lacking CR/LF are rejected.
    
    * test-suite/tests/web-http.test ("read-response-line")["missing
    CR/LF"]: New test.
---
 test-suite/tests/web-http.test |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test-suite/tests/web-http.test b/test-suite/tests/web-http.test
index bd14de9..de2ccaa 100644
--- a/test-suite/tests/web-http.test
+++ b/test-suite/tests/web-http.test
@@ -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"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]