forked from curl/curl
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tool: overwrite instead of append when using -D
This commit fixes a bug, in which the tool appends to a text file instead of overwriting it, when a previous transfer took place. See curl#4753 See curl#4762 Fixes curl#10074 Closes curl#10079
- Loading branch information
1 parent
99f72c0
commit 21fabf4
Showing
3 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<testcase> | ||
<info> | ||
<keywords> | ||
HTTP | ||
</keywords> | ||
</info> | ||
|
||
# | ||
# Server-side | ||
<reply> | ||
<data> | ||
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> | ||
<name> | ||
HTTP GET with overwriting a header file | ||
</name> | ||
<command> | ||
-D log/heads%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER --next -D log/heads%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER | ||
</command> | ||
</client> | ||
|
||
# | ||
# Verify data after the test has been "shot" | ||
<verify> | ||
<file1 name="log/heads%TESTNUMBER" mode="text"> | ||
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 | ||
|
||
</file1> | ||
|
||
</verify> | ||
</testcase> |