From 3130414ce715deb15e6fbd2019362bfee67ca2b4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 4 Sep 2017 10:45:02 +0200 Subject: http-proxy: treat all 2xx as CONNECT success Added test 1904 to verify. Reported-by: Lawrence Wagerfield Fixes #1859 Closes #1860 --- tests/data/Makefile.inc | 2 +- tests/data/test1904 | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 tests/data/test1904 (limited to 'tests/data') diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index 8db5b80d0..464faeeaf 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -173,7 +173,7 @@ test1700 test1701 test1702 \ \ test1800 test1801 \ \ -test1900 test1901 test1902 test1903 \ +test1900 test1901 test1902 test1903 test1904 \ \ test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \ test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \ diff --git a/tests/data/test1904 b/tests/data/test1904 new file mode 100644 index 000000000..08ad534a6 --- /dev/null +++ b/tests/data/test1904 @@ -0,0 +1,79 @@ + + + +HTTP +HTTP GET +HTTP CONNECT +HTTP proxy +proxytunnel + + + +# +# Server-side + + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake swsclose +Content-Type: text/html +Funny-head: yesyes +Content-Length: 9 + +contents + + +HTTP/1.1 204 Sure go ahead + + + +HTTP/1.1 204 Sure go ahead + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake swsclose +Content-Type: text/html +Funny-head: yesyes +Content-Length: 9 + +contents + + + +# +# Client-side + + +http +http-proxy + + +HTTP CONNECT with 204 response + + +http://test.1904:%HTTPPORT/we/want/that/page/1904 -p --proxy %HOSTIP:%PROXYPORT + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +CONNECT test.1904:%HTTPPORT HTTP/1.1 +Host: test.1904:%HTTPPORT +User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3 +Proxy-Connection: Keep-Alive + + + +GET /we/want/that/page/1904 HTTP/1.1 +Host: test.1904:%HTTPPORT +User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3 +Accept: */* + + + + -- cgit v1.2.3