mirror of
https://github.com/curl/curl.git
synced 2026-04-12 12:21:42 +08:00
Add a new commandline option --out-null that discards all response bytes into the void. Replaces non-portable use of '-o /dev/null' with more efficiency. Feature added in 8.16.0 Closes #17800
81 lines
1.2 KiB
Plaintext
81 lines
1.2 KiB
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
</keywords>
|
|
</info>
|
|
|
|
# Server-side
|
|
<reply>
|
|
<data nocheck="yes">
|
|
HTTP/1.1 200 OK
|
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
|
Server: test-server/fake
|
|
Response: 1
|
|
Content-Type: text/html
|
|
Content-Length: 8
|
|
|
|
Hello1!
|
|
</data>
|
|
<data2>
|
|
HTTP/1.1 200 OK
|
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
|
Server: test-server/fake
|
|
Response: 2
|
|
Content-Type: text/html
|
|
Content-Length: 8
|
|
|
|
Hello2!
|
|
</data2>
|
|
</reply>
|
|
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
http
|
|
</server>
|
|
<features>
|
|
</features>
|
|
|
|
<name>
|
|
mix --output and --out-null
|
|
</name>
|
|
<command>
|
|
http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER0002 --out-null -o -
|
|
</command>
|
|
</client>
|
|
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<protocol>
|
|
GET /want/%TESTNUMBER HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
GET /want/%TESTNUMBER0002 HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
</protocol>
|
|
<stdout>
|
|
HTTP/1.1 200 OK
|
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
|
Server: test-server/fake
|
|
Response: 1
|
|
Content-Type: text/html
|
|
Content-Length: 8
|
|
|
|
HTTP/1.1 200 OK
|
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
|
Server: test-server/fake
|
|
Response: 2
|
|
Content-Type: text/html
|
|
Content-Length: 8
|
|
|
|
Hello2!
|
|
</stdout>
|
|
</verify>
|
|
</testcase>
|