From 17bd39484bc1419385f0c2e64ba1685315c3dabf Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 14 Apr 2026 15:51:02 +0200 Subject: [PATCH] test2011: test 2009 with "trusted" location following --- tests/data/Makefile.am | 2 +- tests/data/test2011 | 70 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 tests/data/test2011 diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index c9512b5d82..3003dce03b 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -244,7 +244,7 @@ test1970 test1971 test1972 test1973 test1974 test1975 test1976 test1977 \ test1978 test1979 test1980 test1981 test1982 test1983 test1984 \ \ test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \ -test2008 test2009 test2010 \ +test2008 test2009 test2010 test2011 \ \ test2023 \ test2024 test2025 test2026 test2027 test2028 test2029 test2030 test2031 \ diff --git a/tests/data/test2011 b/tests/data/test2011 new file mode 100644 index 0000000000..dd4e534248 --- /dev/null +++ b/tests/data/test2011 @@ -0,0 +1,70 @@ + + + + +HTTP +HTTP proxy +http_proxy + + +# Server-side + + +HTTP/1.1 407 Denied + + + +HTTP/1.1 301 redirect +Date: Tue, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 4 +Content-Type: text/html +Location: https://another.example/%TESTNUMBER0002 + +boo + + + +# Client-side + + +proxy + + +http +https + + +proxy creds via env, cross-scheme redirect, --location-trusted + + + +http_proxy=http://user:secret@%HOSTIP:%HTTPPORT +https_proxy=https://%HOSTIP:%HTTPSPORT/ + + +http://somewhere.example/ --location-trusted --proxy-insecure + + + +# Verify data after the test has been "shot" + + +GET http://somewhere.example/ HTTP/1.1 +Host: somewhere.example +Proxy-Authorization: Basic %b64[user:secret]b64% +User-Agent: curl/%VERSION +Accept: */* +Proxy-Connection: Keep-Alive + +CONNECT another.example:443 HTTP/1.1 +Host: another.example:443 +User-Agent: curl/%VERSION +Proxy-Connection: Keep-Alive + + + +7 + + +