From 91c13d759a69bfef7cf40b68cdba1992ee32b3bc Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Sat, 1 Feb 2014 14:02:34 +0100 Subject: 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. --- src/tool_operate.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/tool_operate.c') 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 */ -- cgit v1.2.3