From: Marc Hoersken Date: Sat, 1 Feb 2014 13:02:34 +0000 (+0100) Subject: curl: output protocol headers using binary mode X-Git-Tag: curl-7_36_0~152 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=91c13d759a69bfef7cf40b68cdba1992ee32b3bc;p=curl curl: output protocol headers using binary mode Since protocol headers contain explicit line-endings there should be no automatic conversion to ASCII text or CRLF line-endings. This might break third party tools that already depend on this behaviour. We might need to introduce an option to make this optional. --- diff --git a/src/tool_operate.c b/src/tool_operate.c index 9c61623fe..0ecbcada9 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -369,6 +369,10 @@ static int operate_do(struct Configurable *config) heads.stream = newfile; } } + else { + /* always use binary mode for protocol header output */ + set_binmode(heads.stream); + } } /* save the values of noprogress and isatty to restore them later on */