mirror of
https://github.com/curl/curl.git
synced 2026-07-22 15:37:21 +03:00
parent
8a49b291cb
commit
e431daf013
5 changed files with 86 additions and 11 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue