From: Daniel Stenberg Date: Sat, 25 Oct 2025 16:58:49 +0000 (+0200) Subject: test1802: test --proxy-headers and --headers setting user-agent X-Git-Tag: rc-8_17_0-3~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f9dfabb42a79616d00fac48ac3deae28d797a856;p=thirdparty%2Fcurl.git test1802: test --proxy-headers and --headers setting user-agent --- diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 595943fb67..1d7445363d 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -230,7 +230,7 @@ test1680 test1681 test1682 test1683 \ test1700 test1701 test1702 test1703 test1704 test1705 test1706 test1707 \ test1708 test1709 test1710 test1711 \ \ -test1800 test1801 \ +test1800 test1801 test1802 \ \ test1900 test1901 test1902 test1903 test1904 test1905 test1906 test1907 \ test1908 test1909 test1910 test1911 test1912 test1913 test1914 test1915 \ diff --git a/tests/data/test1802 b/tests/data/test1802 new file mode 100644 index 0000000000..61f6426a90 --- /dev/null +++ b/tests/data/test1802 @@ -0,0 +1,63 @@ + + + +HTTP +HTTP CONNECT + + + + + +HTTP/1.1 200 OK +Date: Tue, 09 Nov 2010 14:49:00 GMT +Accept-Ranges: bytes +Content-Length: 6 +Connection: close +Content-Type: text/html + +-foo- + + +HTTP/1.1 200 fine +Connection: close +Content-Length: 0 + + + + +# +# Client-side + + +ftp +proxy + + +http + + +HTTP CONNECT with custom headers for proxy and server + + +http://hello/wanted/page -p -x %HOSTIP:%HTTPPORT --header "User-Agent: myapp/1.0" --proxy-header "User-Agent: Benjamin/2" --proxy-header "Host: todeloo" --header "Host: foo" + + + +# +# Verify data after the test has been "shot" + + + +CONNECT hello:80 HTTP/1.1 +Proxy-Connection: Keep-Alive +User-Agent: Benjamin/2 +Host: todeloo + +GET /wanted/page HTTP/1.1 +Host: foo +Accept: */* +User-Agent: myapp/1.0 + + + +