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
This commit is contained in:
Daniel Stenberg 2026-04-14 08:51:44 +02:00
parent 0567e72168
commit 2aad1df87f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 159 additions and 12 deletions

52
tests/data/test2504 Normal file
View 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>