curl/tests/data/test1619
Daniel Stenberg d63432d1f8
tool_cb_hdr: only truncate etags output when regular file
When sending the output to stdout it cannot truncate.

Add test1619 to verify --etag-save to stdout

Spotted by Codex Security

Closes #21103
2026-03-26 23:39:28 +01:00

45 lines
576 B
XML

<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
HTTP
HTTP GET
</keywords>
</info>
<reply>
<data nocheck="yes" crlf="headers">
HTTP/1.1 200 OK
ETag: W/"heyheyhey"
Content-Length: 4
yes
</data>
</reply>
<client>
<server>
http
</server>
<name>
--etag-save to stdout
</name>
<command >
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -O --etag-save -
</command>
</client>
<verify>
<protocol crlf="headers">
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
</protocol>
<stdout>
W/"heyheyhey"
</stdout>
</verify>
</testcase>