curl: prevent binary output spewed to terminal

... unless "--output -" is used. Binary detection is done by simply
checking for a binary zero in early data.

Added test 1425 1426 to verify.

Closes #1512
This commit is contained in:
Daniel Stenberg 2017-06-16 11:30:36 +02:00
parent ce2cc568f8
commit 5385450afd
10 changed files with 47 additions and 17 deletions

View file

@ -1554,7 +1554,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
config->proxy_insecure_ok = toggle;
break;
case '9':
case '9': /* --proxy-tlsv1 */
/* TLS version 1 for proxy */
config->proxy_ssl_version = CURL_SSLVERSION_TLSv1;
break;