curl/tests/data/test2506
Daniel Stenberg b4024bf808
http: clear credentials better on redirect
Verify with test 2506: netrc with redirect using proxy

Updated test 998 which was wrong.

Reported-by: Muhamad Arga Reksapati

Closes #21345
2026-04-16 21:51:41 +02:00

64 lines
1 KiB
XML

<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
HTTP
cookies
</keywords>
</info>
<reply>
<data crlf="headers" nocheck="yes">
HTTP/1.1 301 redirect
Date: Tue, 09 Nov 2010 14:49:00 GMT
Content-Length: 3
Location: http://numbertwo.example/%TESTNUMBER0002
ok
</data>
<data2 crlf="headers" nocheck="yes">
HTTP/1.1 200 OK
Date: Tue, 09 Nov 2010 14:49:00 GMT
Content-Length: 4
yes
</data2>
</reply>
<client>
<server>
http
</server>
<features>
proxy
</features>
<tool>
lib%TESTNUMBER
</tool>
<name>
netrc with redirect using proxy
</name>
<file name="%LOGDIR/netrc2506">
machine site.example login batman password robin
</file>
<command>
http://%HOSTIP:%HTTPPORT http://site.example/ %LOGDIR/netrc2506
</command>
</client>
<verify>
<protocol crlf="headers">
GET http://site.example/ HTTP/1.1
Host: site.example
Authorization: Basic %b64[batman:robin]b64%
Accept: */*
Proxy-Connection: Keep-Alive
GET http://numbertwo.example/25060002 HTTP/1.1
Host: numbertwo.example
Accept: */*
Proxy-Connection: Keep-Alive
</protocol>
</verify>
</testcase>