aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tool_writeout.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/tool_writeout.c b/src/tool_writeout.c
index ffe47c633..d394411b0 100644
--- a/src/tool_writeout.c
+++ b/src/tool_writeout.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -60,6 +60,8 @@ typedef enum {
VAR_LOCAL_PORT,
VAR_HTTP_VERSION,
VAR_SCHEME,
+ VAR_STDOUT,
+ VAR_STDERR,
VAR_NUM_OF_VARS /* must be the last */
} replaceid;
@@ -101,6 +103,8 @@ static const struct variable replacements[]={
{"local_port", VAR_LOCAL_PORT},
{"http_version", VAR_HTTP_VERSION},
{"scheme", VAR_SCHEME},
+ {"stdout", VAR_STDOUT},
+ {"stderr", VAR_STDERR},
{NULL, VAR_NONE}
};
@@ -320,6 +324,12 @@ void ourWriteOut(CURL *curl, struct OutStruct *outs, const char *writeinfo)
curl_easy_getinfo(curl, CURLINFO_SCHEME,
&stringp))
fprintf(stream, "%s", stringp);
+ /* FALLTHROUGH */
+ case VAR_STDOUT:
+ stream = stdout;
+ break;
+ case VAR_STDERR:
+ stream = stderr;
break;
default:
break;