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:
@@ -369,6 +369,10 @@ static int operate_do(struct Configurable *config)
|
|||||||
heads.stream = newfile;
|
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 */
|
/* save the values of noprogress and isatty to restore them later on */
|
||||||
|
|||||||
Reference in New Issue
Block a user