mirror of
https://github.com/curl/curl.git
synced 2026-07-24 20:17:17 +03:00
write-out: add '%{proxy_used}'
Returns 1 if the previous transfer used a proxy, otherwise 0. Useful to for example determine if a `NOPROXY` pattern matched the hostname or not. Extended test 970 and 972
This commit is contained in:
parent
cc04c73677
commit
ac208ccf6f
5 changed files with 9 additions and 2 deletions
|
|
@ -95,6 +95,7 @@ static const struct writeoutvar variables[] = {
|
|||
{"onerror", VAR_ONERROR, CURLINFO_NONE, NULL},
|
||||
{"proxy_ssl_verify_result", VAR_PROXY_SSL_VERIFY_RESULT,
|
||||
CURLINFO_PROXY_SSL_VERIFYRESULT, writeLong},
|
||||
{"proxy_used", VAR_PROXY_USED, CURLINFO_USED_PROXY, writeLong},
|
||||
{"redirect_url", VAR_REDIRECT_URL, CURLINFO_REDIRECT_URL, writeString},
|
||||
{"referer", VAR_REFERER, CURLINFO_REFERER, writeString},
|
||||
{"remote_ip", VAR_PRIMARY_IP, CURLINFO_PRIMARY_IP, writeString},
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ typedef enum {
|
|||
VAR_PRIMARY_IP,
|
||||
VAR_PRIMARY_PORT,
|
||||
VAR_PROXY_SSL_VERIFY_RESULT,
|
||||
VAR_PROXY_USED,
|
||||
VAR_REDIRECT_COUNT,
|
||||
VAR_REDIRECT_TIME,
|
||||
VAR_REDIRECT_URL,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue