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.
This commit is contained in:
Marc Hoersken 2014-02-01 14:02:34 +01:00
parent 89c29aa70f
commit 91c13d759a
1 changed files with 4 additions and 0 deletions

View File

@ -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 */