mirror of
https://github.com/curl/curl.git
synced 2026-04-13 00:31:41 +08:00
This uses c-ares under the hood and supports the CURL_DNS_SERVER environment variable - for debug builds only. The getaddrinfo() replacement function is only used if CURL_DNS_SERVER is set to make a debug build work more like a release version without the variable set. 'override-dns' is a new feature for the test suite when curl can be told to use a dedicated DNS server, and test 2102 is the first to require this. Requires c-ares 1.26.0 or later. Closes #17134
61 lines
856 B
Plaintext
61 lines
856 B
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
HTTP GET
|
|
</keywords>
|
|
</info>
|
|
|
|
#
|
|
# Server-side
|
|
<reply>
|
|
<data crlf="yes">
|
|
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
|
|
dns
|
|
</server>
|
|
<features>
|
|
override-dns
|
|
</features>
|
|
<name>
|
|
HTTP GET with host name
|
|
</name>
|
|
<setenv>
|
|
CURL_DNS_SERVER=127.0.0.1:%DNSPORT
|
|
</setenv>
|
|
<command>
|
|
http://examplehost.example:%HTTPPORT/%TESTNUMBER
|
|
</command>
|
|
</client>
|
|
|
|
#
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<protocol crlf="yes">
|
|
GET /%TESTNUMBER HTTP/1.1
|
|
Host: examplehost.example:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
</protocol>
|
|
</verify>
|
|
</testcase>
|