guile-commits
[Top][All Lists]
Advanced

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

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


From: Ludovic Courtès
Subject: [Guile-commits] 01/03: http: Test that responses lacking CR/LF are rejected.
Date: Wed, 06 Jan 2016 16:25:37 +0000

civodul pushed a commit to branch stable-2.0
in repository guile.

commit 5df0822b7cb91e765d0b2745a012081a67aa2df3
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 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/test-suite/tests/web-http.test b/test-suite/tests/web-http.test
index 7f94315..49984c8 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]