curl: make --etag-save acknowledge --create-dirs

Add test 693 to verify

Fixes #15730
Suggested-by: Tamir Duberstein
Closes #15732
This commit is contained in:
Daniel Stenberg 2024-12-21 11:45:28 +01:00
parent 3f8452dde7
commit 31c6b50cb2
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 72 additions and 1 deletions

62
tests/data/test693 Normal file
View file

@ -0,0 +1,62 @@
<testcase>
<info>
<keywords>
HTTP
HTTP GET
etags
</keywords>
</info>
#
# Server-side
<reply>
<data nocheck="yes">
HTTP/1.1 200 funky chunky!
Server: fakeit/0.9 fakeitbad/1.0
Transfer-Encoding: chunked
Trailer: chunky-trailer
Connection: mooo
ETag: W/"asdf"
40
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
30
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
21;heresatest=moooo
cccccccccccccccccccccccccccccccc
0
chunky-trailer: header data
</data>
</reply>
#
# Client-side
<client>
<server>
http
</server>
<name>
--etag-save with --create-dirs
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --etag-save %LOGDIR/moo/boo/etag%TESTNUMBER --create-dirs
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
<protocol>
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
</protocol>
<file name="%LOGDIR/moo/boo/etag%TESTNUMBER">
W/"asdf"
</file>
</verify>
</testcase>