mirror of
https://github.com/curl/curl.git
synced 2026-05-15 23:46:21 +03:00
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
This commit is contained in:
parent
e3e06e1aee
commit
1f70cdef98
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue