tests: add %AMP macro, use it in two tests

To allow replacing `&` characters in `tests/data/test*` files for
XML-compliance.

Also:
- document `%GT`, `%LT`
  Follow-up to de49cc89ab #19470

Closes #19824
This commit is contained in:
Viktor Szakats 2025-12-02 05:05:36 +01:00
parent 0417d323c9
commit 004f41c186
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
4 changed files with 15 additions and 8 deletions

View file

@ -4,7 +4,6 @@
HTTP
HTTP GET
followlocation
notxml
</keywords>
</info>
# Server-side
@ -13,7 +12,7 @@ notxml
HTTP/1.1 301 This is a weirdo text message swsclose
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Location: data.cgi?moo=http://&/%TESTNUMBER0002
Location: data.cgi?moo=http://%AMP/%TESTNUMBER0002
Connection: close
This server reply is for testing a simple Location: following
@ -32,7 +31,7 @@ If this is received, the location following worked
HTTP/1.1 301 This is a weirdo text message swsclose
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Location: data.cgi?moo=http://&/%TESTNUMBER0002
Location: data.cgi?moo=http://%AMP/%TESTNUMBER0002
Connection: close
HTTP/1.1 200 Followed here fine swsclose
@ -66,7 +65,7 @@ Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
GET /want/data.cgi?moo=http://&/%TESTNUMBER0002 HTTP/1.1
GET /want/data.cgi?moo=http://%AMP/%TESTNUMBER0002 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*