/
githubmirror
/
curl
Обзор
Документация
Войти
/
githubmirror
/
curl
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/data/test3106
77 строк
1 KB
jeffhuang
url: compare full origin when setting credentials
16 май 2026, 02:14
Не верифицирован
16 май 2026, 02:14
a15483c
Код
Авторство
О чём код?
<?xml version="1.0" encoding="US-ASCII"?> <testcase> <info> <keywords> HTTP HTTPS HTTP proxy HTTP Basic auth followlocation </keywords> </info> # Server-side <reply> <connect crlf="headers"> HTTP/1.1 200 OK </connect> <data crlf="headers" nocheck="yes"> HTTP/1.1 302 Found Location: http://example.com:%HTTPSPORT/%TESTNUMBER0002 Content-Length: 0 </data> <data2 crlf="headers"> HTTP/1.1 200 OK Content-Length: 2 OK </data2> </reply> # Client-side <client> <features> SSL proxy </features> <server> https http-proxy </server> <name> HTTPS to HTTP redirect on same host and port without auth </name> <command> --insecure --location --user user:secret --proxy %HOSTIP:%PROXYPORT https://example.com:%HTTPSPORT/%TESTNUMBER </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 User-Agent: curl/%VERSION Proxy-Connection: Keep-Alive GET http://example.com:%HTTPSPORT/%TESTNUMBER0002 HTTP/1.1 Host: example.com:%HTTPSPORT User-Agent: curl/%VERSION Accept: */* Proxy-Connection: Keep-Alive </proxy> <protocol crlf="headers"> GET /%TESTNUMBER HTTP/1.1 Host: example.com:%HTTPSPORT Authorization: Basic %b64[user:secret]b64% User-Agent: curl/%VERSION Accept: */* </protocol> </verify> </testcase>