/
githubmirror
/
curl
Обзор
Документация
Войти
/
githubmirror
/
curl
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/data/test1849
89 строк
2 KB
Daniel Stenberg
test1849: reuse a proxy with different credentials
07 мар 2026, 15:59
Не верифицирован
07 мар 2026, 15:59
b351fd1
Код
Авторство
О чём код?
<?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>