diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-06-16 11:30:36 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-06-16 23:38:13 +0200 |
commit | 5385450afd61328e7d24b50eeffc2b1571cd9e2f (patch) | |
tree | abed28837e3bc58605b3963280b9b2aec62815d8 /src/tool_cfgable.h | |
parent | ce2cc568f822605ae4258ec25b87b59b24c7bd19 (diff) | |
download | curl-5385450afd61328e7d24b50eeffc2b1571cd9e2f.tar.gz |
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
Diffstat (limited to 'src/tool_cfgable.h')
-rw-r--r-- | src/tool_cfgable.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h index 38777f6fd..8d74905d9 100644 --- a/src/tool_cfgable.h +++ b/src/tool_cfgable.h @@ -27,6 +27,12 @@ #include "tool_metalink.h" +typedef enum { + ERR_NONE, + ERR_BINARY_TERMINAL = 1, /* binary to terminal detected */ + ERR_LAST +} curl_error; + struct GlobalConfig; struct OperationConfig { @@ -141,6 +147,7 @@ struct OperationConfig { bool insecure_ok; /* set TRUE to allow insecure SSL connects */ bool proxy_insecure_ok; /* set TRUE to allow insecure SSL connects for proxy */ + bool terminal_binary_ok; bool verifystatus; bool create_dirs; bool ftp_create_dirs; @@ -236,6 +243,8 @@ struct OperationConfig { double expect100timeout; bool suppress_connect_headers; /* suppress proxy CONNECT response headers from user callbacks */ + curl_error synthetic_error; /* if non-zero, it overrides any libcurl + error */ struct GlobalConfig *global; struct OperationConfig *prev; struct OperationConfig *next; /* Always last in the struct */ |