http: return error for a second Location: header

Unless it is identical to the previous one.

Follow-up to dbcaa00657

Adjusted test 580, added test 772 and 773

Fixes #19130
Reported-by: Jakub Stasiak
Closes #19134
This commit is contained in:
Daniel Stenberg 2025-10-19 10:59:38 +02:00
parent cbd7823fd1
commit 9596c4a258
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 138 additions and 18 deletions

View file

@ -20,6 +20,14 @@ Connection: close
Location: and there's a second one too! / moo.html
</data>
<datacheck>
HTTP/1.1 302 eat this!
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Location: this-is-the-first.html
Content-Length: 0
Connection: close
</datacheck>
</reply>
# Client-side
@ -51,5 +59,8 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
<errorcode>
8
</errorcode>
</verify>
</testcase>