From b351fd1b9a2ca93a9b83d80a7be027031eb78e9c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 6 Mar 2026 23:08:31 +0100 Subject: [PATCH] test1849: reuse a proxy with different credentials Closes #20842 --- tests/data/Makefile.am | 2 +- tests/data/test1849 | 89 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 tests/data/test1849 diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 6c8be18b32..3a310db224 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -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 index 0000000000..84d92a31d4 --- /dev/null +++ b/tests/data/test1849 @@ -0,0 +1,89 @@ + + + + +HTTP +HTTP CONNECT +HTTP proxy + + + +# Server-side + + +# this is returned first since we get no proxy-auth + +HTTP/1.1 200 OK + + + + +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! + + + +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 + + + + +# Client-side + + +http +https +http-proxy + + +proxy + + +HTTPS reuse a proxy with different credentials + + +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 + + + +# Verify data after the test has been "shot" + + +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 + + + +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: */* + + + +