diff options
author | Viktor Szakats <commit@vsz.me> | 2021-02-19 13:57:19 +0000 |
---|---|---|
committer | Viktor Szakats <commit@vsz.me> | 2021-02-19 13:57:19 +0000 |
commit | 44872aefc2d54f297caf2b0cc887df321bc9d791 (patch) | |
tree | 077ea6159543fffdaf7b224014a30088dcdcf5ae /src/tool_writeout.c | |
parent | 70472a44deaff387cf8c8c197e04f3add2a96e2e (diff) | |
download | curl-44872aefc2d54f297caf2b0cc887df321bc9d791.tar.gz |
http: add support to read and store the referrer header
- add CURLINFO_REFERER libcurl option
- add --write-out '%{referer}' command-line option
- extend --xattr command-line option to fill user.xdg.referrer.url extended
attribute with the referrer (if there was any)
Closes #6591
Diffstat (limited to 'src/tool_writeout.c')
-rw-r--r-- | src/tool_writeout.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tool_writeout.c b/src/tool_writeout.c index e914dfa7b..529677818 100644 --- a/src/tool_writeout.c +++ b/src/tool_writeout.c @@ -83,6 +83,7 @@ static const struct writeoutvar variables[] = { {"proxy_ssl_verify_result", VAR_PROXY_SSL_VERIFY_RESULT, CURLINFO_PROXY_SSL_VERIFYRESULT, 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}, {"remote_port", VAR_PRIMARY_PORT, CURLINFO_PRIMARY_PORT, writeLong}, {"response_code", VAR_HTTP_CODE, CURLINFO_RESPONSE_CODE, writeLong}, |