[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 44/282: curl: Let -D merge headers in one file again
From: |
gnunet |
Subject: |
[gnurl] 44/282: curl: Let -D merge headers in one file again |
Date: |
Wed, 01 Apr 2020 14:28:29 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 1774dbd74c77cd6c728588c8a717903dd16003f3
Author: Emil Engler <address@hidden>
AuthorDate: Tue Jan 21 09:23:21 2020 +0100
curl: Let -D merge headers in one file again
Closes #4762
Fixes #4753
---
src/tool_operate.c | 3 ++-
tests/data/test2006 | 4 ++++
tests/data/test2007 | 4 ++++
tests/data/test2008 | 4 ++++
tests/data/test2009 | 4 ++++
tests/data/test2010 | 4 ++++
6 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 66f2139c8..2e6563a20 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -871,7 +871,8 @@ static CURLcode single_transfer(struct GlobalConfig *global,
if(config->headerfile) {
/* open file for output: */
if(strcmp(config->headerfile, "-")) {
- FILE *newfile = fopen(config->headerfile, "wb");
+ FILE *newfile;
+ newfile = fopen(config->headerfile, per->prev == NULL?"wb":"ab");
if(!newfile) {
warnf(config->global, "Failed to open %s\n", config->headerfile);
result = CURLE_WRITE_ERROR;
diff --git a/tests/data/test2006 b/tests/data/test2006
index 1f5971726..0b84937ed 100644
--- a/tests/data/test2006
+++ b/tests/data/test2006
@@ -86,6 +86,10 @@ Accept: */*
Some data delivered from an HTTP resource
</file1>
<file2 name="log/heads2006">
+Content-Length: 496
+Accept-ranges: bytes
+
+
HTTP/1.1 200 OK
Date: Thu, 21 Jun 2012 14:49:01 GMT
Server: test-server/fake
diff --git a/tests/data/test2007 b/tests/data/test2007
index a8e5f1b45..c8c023efb 100644
--- a/tests/data/test2007
+++ b/tests/data/test2007
@@ -90,6 +90,10 @@ Something delivered from an HTTP resource
s/Last-Modified:.*//
</stripfile2>
<file2 name="log/heads2007">
+Content-Length: 496
+Accept-ranges: bytes
+
+
HTTP/1.1 200 OK
Date: Thu, 21 Jun 2012 14:50:02 GMT
Server: test-server/fake
diff --git a/tests/data/test2008 b/tests/data/test2008
index 1a0033285..570cdba7d 100644
--- a/tests/data/test2008
+++ b/tests/data/test2008
@@ -82,6 +82,10 @@ Some stuff delivered from an HTTP resource
s/Last-Modified:.*//
</stripfile2>
<file2 name="log/heads2008">
+Content-Length: 496
+Accept-ranges: bytes
+
+
HTTP/1.1 200 OK
Date: Thu, 21 Jun 2012 15:23:48 GMT
Server: test-server/fake
diff --git a/tests/data/test2009 b/tests/data/test2009
index 08308d03e..10f95df4c 100644
--- a/tests/data/test2009
+++ b/tests/data/test2009
@@ -83,6 +83,10 @@ Some contents delivered from an HTTP resource
s/Last-Modified:.*//
</stripfile2>
<file2 name="log/heads2009">
+Content-Length: 496
+Accept-ranges: bytes
+
+
HTTP/1.1 200 OK
Date: Thu, 21 Jun 2012 16:27:17 GMT
Server: test-server/fake
diff --git a/tests/data/test2010 b/tests/data/test2010
index 068c481b5..d43f4f1e1 100644
--- a/tests/data/test2010
+++ b/tests/data/test2010
@@ -82,6 +82,10 @@ Contents delivered from an HTTP resource
s/Last-Modified:.*//
</stripfile2>
<file2 name="log/heads2010">
+Content-Length: 496
+Accept-ranges: bytes
+
+
HTTP/1.1 200 OK
Date: Thu, 21 Jun 2012 17:37:27 GMT
Server: test-server/fake
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 60/282: curl: make the -# spaceship bar not wrap the line, (continued)
- [gnurl] 60/282: curl: make the -# spaceship bar not wrap the line, gnunet, 2020/04/01
- [gnurl] 50/282: CURLOPT_PROXY_SSL_OPTIONS.3: Sync with CURLOPT_SSL_OPTIONS.3, gnunet, 2020/04/01
- [gnurl] 61/282: urldata: do string enums without #ifdefs for build scripts, gnunet, 2020/04/01
- [gnurl] 47/282: smtp: Allow RCPT TO command to fail for some recipients, gnunet, 2020/04/01
- [gnurl] 62/282: RELEASE-NOTES: synced, gnunet, 2020/04/01
- [gnurl] 48/282: RELEASE-NOTES: synced, gnunet, 2020/04/01
- [gnurl] 58/282: conn: do not reuse connection if SOCKS proxy credentials differ, gnunet, 2020/04/01
- [gnurl] 37/282: wolfssl: use the wc-prefixed symbol alternatives, gnunet, 2020/04/01
- [gnurl] 28/282: CMake: Add support for CMAKE_LTO option., gnunet, 2020/04/01
- [gnurl] 38/282: RELEASE-NOTES: synced, gnunet, 2020/04/01
- [gnurl] 44/282: curl: Let -D merge headers in one file again,
gnunet <=
- [gnurl] 41/282: http.h: Copyright year out of date, should be 2020, gnunet, 2020/04/01
- [gnurl] 52/282: form.d: fix two minor typos, gnunet, 2020/04/01
- [gnurl] 64/282: README: mention that the docs is in docs/, gnunet, 2020/04/01
- [gnurl] 53/282: wolfssh: make it init properly via Curl_ssh_init(), gnunet, 2020/04/01
- [gnurl] 56/282: conncache: removed unused Curl_conncache_bundle_size(), gnunet, 2020/04/01
- [gnurl] 54/282: singleuse.pl: support new API functions, fix curl_dbg_ handling, gnunet, 2020/04/01
- [gnurl] 55/282: strcase: turn Curl_raw_tolower into static, gnunet, 2020/04/01
- [gnurl] 63/282: curl.h: define CURL_WIN32 on windows, gnunet, 2020/04/01
- [gnurl] 57/282: llist: removed unused Curl_llist_move(), gnunet, 2020/04/01
- [gnurl] 59/282: global_init: assume the EINTR bit by default, gnunet, 2020/04/01