tool_operate: let --create-dirs work for --dump-header as well

Add test 3011 to verify

Proposed-by: Montg0mery on github
Fixes #14941
Closes #14965
This commit is contained in:
Daniel Stenberg 2024-09-19 10:43:58 +02:00
parent 44fc2687b1
commit b4f7ec71ce
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 77 additions and 1 deletions

67
tests/data/test3031 Normal file
View file

@ -0,0 +1,67 @@
<testcase>
<info>
<keywords>
--dump-header
</keywords>
</info>
#
# Server-side
<reply>
<data nocheck="yes" 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
</server>
<features>
http
</features>
<name>
--output-dir with --create-dirs
</name>
<command>
http://%HOSTIP:%HTTPPORT/this/is/the/%TESTNUMBER --dump-header %PWD/%LOGDIR/tmp/out.txt --create-dirs
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
<protocol>
GET /this/is/the/%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
</protocol>
<file name="%LOGDIR/tmp/out.txt" 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
</file>
</verify>
</testcase>