[master] 18a06da Add a test for HTTP/0.9 deprecation

Poul-Henning Kamp phk at FreeBSD.org
Tue May 5 11:50:58 CEST 2015


commit 18a06da35bf736a88314f469d24711794d31e04f
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue May 5 09:50:45 2015 +0000

    Add a test for HTTP/0.9 deprecation

diff --git a/bin/varnishtest/tests/b00047.vtc b/bin/varnishtest/tests/b00047.vtc
new file mode 100644
index 0000000..081cb0e
--- /dev/null
+++ b/bin/varnishtest/tests/b00047.vtc
@@ -0,0 +1,33 @@
+varnishtest "Check that all but HTTP/1.0 and HTTP/1.1 get 400"
+
+server s1 {
+	rxreq
+	txresp -body "FOO"
+} -start
+
+varnish v1 -vcl+backend {
+} -start
+
+client c1 {
+	send "GET /\r\n\r\n"
+	rxresp
+	expect resp.status == 400
+} -run
+
+client c1 {
+	send "GET / HTTP/0.5\r\n\r\n"
+	rxresp
+	expect resp.status == 400
+} -run
+
+client c1 {
+	send "GET / HTTP/1.2\r\n\r\n"
+	rxresp
+	expect resp.status == 400
+} -run
+
+client c1 {
+	send "GET / HTTP/2.0\r\n\r\n"
+	rxresp
+	expect resp.status == 400
+} -run



More information about the varnish-commit mailing list