aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-06-23 16:53:02 -0700
committerDaniel Stenberg <daniel@haxx.se>2015-06-25 11:53:56 -0700
commit1f70cdef985aa5635a4f84be612b242ccaa8a10b (patch)
tree62b02a1001f5ef32a28e8d406e8a05e972ad9ceb /src
parente3e06e1aee9739907e51d396012c0e97fe020a2e (diff)
tool_header_cb: fflush the header stream
Flush the header stream when -D is used so that they are sent off earlier. Bug: https://github.com/bagder/curl/issues/324 Reported-by: Cédric Connes
Diffstat (limited to 'src')
-rw-r--r--src/tool_cb_hdr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c
index af9bb87ea..fd208e862 100644
--- a/src/tool_cb_hdr.c
+++ b/src/tool_cb_hdr.c
@@ -75,6 +75,8 @@ size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata)
size_t rc = fwrite(ptr, size, nmemb, heads->stream);
if(rc != cb)
return rc;
+ /* flush the stream to send off what we got earlier */
+ (void)fflush(heads->stream);
}
/*