mirror of
https://github.com/curl/curl.git
synced 2026-07-25 09:28:00 +03:00
urldata: move cookiehost to struct SingleRequest
To make it scoped for the single request appropriately. Reported-by: Muhamad Arga Reksapati Verify with libtest 2504: a custom Host *disabled* on reused handle Closes #21312
This commit is contained in:
parent
86f1e5b3f6
commit
3a19987a87
9 changed files with 162 additions and 12 deletions
|
|
@ -265,7 +265,7 @@ test2309 \
|
|||
\
|
||||
test2400 test2401 test2402 test2403 test2404 test2405 test2406 test2407 \
|
||||
\
|
||||
test2500 test2501 test2502 test2503 \
|
||||
test2500 test2501 test2502 test2503 test2504 \
|
||||
\
|
||||
test2600 test2601 test2602 test2603 test2604 test2605 \
|
||||
\
|
||||
|
|
|
|||
52
tests/data/test2504
Normal file
52
tests/data/test2504
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="US-ASCII"?>
|
||||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
HTTP
|
||||
cookies
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
# Server-side
|
||||
<reply>
|
||||
<data crlf="headers" nocheck="yes">
|
||||
HTTP/1.1 200 OK
|
||||
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
||||
Server: server.example.com
|
||||
Content-Length: 47
|
||||
Set-Cookie: sid=SECRET123; Path=/
|
||||
|
||||
file contents should appear once for each file
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<tool>
|
||||
lib%TESTNUMBER
|
||||
</tool>
|
||||
<name>
|
||||
custom Host with cookie, handle reuse, no custom Host:
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT
|
||||
</command>
|
||||
</client>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<protocol crlf="headers">
|
||||
GET / HTTP/1.1
|
||||
Host: victim.internal
|
||||
Accept: */*
|
||||
|
||||
GET / HTTP/1.1
|
||||
Host: %HOSTIP:%HTTPPORT
|
||||
Accept: */*
|
||||
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue