]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test1802: test --proxy-headers and --headers setting user-agent
authorDaniel Stenberg <daniel@haxx.se>
Sat, 25 Oct 2025 16:58:49 +0000 (18:58 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 27 Oct 2025 08:52:05 +0000 (09:52 +0100)
tests/data/Makefile.am
tests/data/test1802 [new file with mode: 0644]

index 595943fb6717bc3f9f5443eb446d7edac2fff637..1d7445363d773c7389ebc1ebd68ca20d32ef29fb 100644 (file)
@@ -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 (file)
index 0000000..61f6426
--- /dev/null
@@ -0,0 +1,63 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP CONNECT
+</keywords>
+</info>
+
+<reply>
+<data crlf="yes" nocheck="yes">
+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-
+</data>
+<connect crlf="yes">
+HTTP/1.1 200 fine
+Connection: close
+Content-Length: 0
+
+</connect>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+ftp
+proxy
+</features>
+<server>
+http
+</server>
+<name>
+HTTP CONNECT with custom headers for proxy and server
+</name>
+<command>
+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"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+
+<protocol crlf="yes">
+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
+
+</protocol>
+</verify>
+</testcase>