mirror of
https://github.com/curl/curl.git
synced 2024-12-15 06:40:09 +08:00
b5c0fe20e3
Following the footsteps of other clients like Firefox/Chrome. RFC 6761 says clients SHOULD do this. Add test 389 to verify. Reported-by: TheKnarf on github Fixes #9192 Closes #9296
58 lines
912 B
Plaintext
58 lines
912 B
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
.localhost
|
|
</keywords>
|
|
</info>
|
|
|
|
#
|
|
# Server-side
|
|
<reply>
|
|
<data>
|
|
HTTP/1.1 200 OK
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
Server: test-server/fake
|
|
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
|
|
ETag: "21025-dc7-39462498"
|
|
Accept-Ranges: bytes
|
|
Content-Length: 6
|
|
Connection: close
|
|
Content-Type: text/html
|
|
Funny-head: yesyes
|
|
|
|
-foo-
|
|
</data>
|
|
</reply>
|
|
|
|
#
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
http
|
|
</server>
|
|
<name>
|
|
*.localhost is a local host
|
|
</name>
|
|
<command>
|
|
http://curlmachine.localhost:%HTTPPORT/%TESTNUMBER
|
|
</command>
|
|
# Ensure that we're running on localhost
|
|
<precheck>
|
|
perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
|
|
</precheck>
|
|
</client>
|
|
|
|
#
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<protocol>
|
|
GET /%TESTNUMBER HTTP/1.1
|
|
Host: curlmachine.localhost:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
</protocol>
|
|
</verify>
|
|
</testcase>
|