]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test1849: reuse a proxy with different credentials
authorDaniel Stenberg <daniel@haxx.se>
Fri, 6 Mar 2026 22:08:31 +0000 (23:08 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 7 Mar 2026 12:59:30 +0000 (13:59 +0100)
Closes #20842

tests/data/Makefile.am
tests/data/test1849 [new file with mode: 0644]

index 6c8be18b32e4ceb04cd99bc797b4a2f209a282d2..3a310db2248baef15add41f3d6b2ccd7c73730db 100644 (file)
@@ -231,7 +231,7 @@ test1680 test1681 test1682 test1683 \
 test1700 test1701 test1702 test1703 test1704 test1705 test1706 test1707 \
 test1708 test1709 test1710 test1711 test1712 \
 \
-test1800 test1801 test1802 test1847 test1848 \
+test1800 test1801 test1802 test1847 test1848 test1849 \
 \
 test1900 test1901 test1902 test1903 test1904 test1905 test1906 test1907 \
 test1908 test1909 test1910 test1911 test1912 test1913 test1914 test1915 \
diff --git a/tests/data/test1849 b/tests/data/test1849
new file mode 100644 (file)
index 0000000..84d92a3
--- /dev/null
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP CONNECT
+HTTP proxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+
+# this is returned first since we get no proxy-auth
+<connect crlf="headers" nocheck="yes">
+HTTP/1.1 200 OK
+
+</connect>
+
+<data crlf="headers" nocheck="yes">
+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Content-Length: 7
+Content-Type: text/html
+Funny-head: yesyes
+
+first!
+</data>
+
+<data2 crlf="headers" nocheck="yes">
+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Content-Length: 7
+Content-Type: text/html
+Funny-head: yesyes
+
+daniel
+</data2>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+https
+http-proxy
+</server>
+<features>
+proxy
+</features>
+<name>
+HTTPS reuse a proxy with different credentials
+</name>
+<command>
+https://example.com:%HTTPSPORT/path/%TESTNUMBER --proxy http://user1:pwd1@%HOSTIP:%PROXYPORT --insecure --next https://example.com:%HTTPSPORT/path/%TESTNUMBER0002 --proxy http://user2:pwd2@%HOSTIP:%PROXYPORT --insecure
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<proxy crlf="headers">
+CONNECT example.com:%HTTPSPORT HTTP/1.1
+Host: example.com:%HTTPSPORT
+Proxy-Authorization: Basic %b64[user1:pwd1]b64%
+User-Agent: curl/%VERSION
+Proxy-Connection: Keep-Alive
+
+CONNECT example.com:%HTTPSPORT HTTP/1.1
+Host: example.com:%HTTPSPORT
+Proxy-Authorization: Basic %b64[user2:pwd2]b64%
+User-Agent: curl/%VERSION
+Proxy-Connection: Keep-Alive
+
+</proxy>
+<protocol crlf="headers">
+GET /path/%TESTNUMBER HTTP/1.1
+Host: example.com:%HTTPSPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+GET /path/%TESTNUMBER0002 HTTP/1.1
+Host: example.com:%HTTPSPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>