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 /docs | |
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 'docs')
-rw-r--r-- | docs/cmdline-opts/write-out.d | 3 | ||||
-rw-r--r-- | docs/examples/Makefile.inc | 1 | ||||
-rw-r--r-- | docs/libcurl/curl_easy_getinfo.3 | 5 | ||||
-rw-r--r-- | docs/libcurl/opts/CURLOPT_REFERER.3 | 3 | ||||
-rw-r--r-- | docs/libcurl/opts/Makefile.inc | 3 | ||||
-rw-r--r-- | docs/libcurl/symbols-in-versions | 1 |
6 files changed, 13 insertions, 3 deletions
diff --git a/docs/cmdline-opts/write-out.d b/docs/cmdline-opts/write-out.d index be8f75ad5..0579cae69 100644 --- a/docs/cmdline-opts/write-out.d +++ b/docs/cmdline-opts/write-out.d @@ -93,6 +93,9 @@ When an HTTP request was made without --location to follow redirects (or when --max-redir is met), this variable will show the actual URL a redirect \fIwould\fP have gone to. (Added in 7.18.2) .TP +.B referer +The Referer: header, if there was any. (Added in 7.76.0) +.TP .B remote_ip The remote IP address of the most recently done connection - can be either IPv4 or IPv6 (Added in 7.29.0) diff --git a/docs/examples/Makefile.inc b/docs/examples/Makefile.inc index defaad6d6..84a2bdac6 100644 --- a/docs/examples/Makefile.inc +++ b/docs/examples/Makefile.inc @@ -43,6 +43,7 @@ check_PROGRAMS = \ getinfo \ getinmemory \ getredirect \ + getreferrer \ http-post \ http2-download \ http2-pushinmemory \ diff --git a/docs/libcurl/curl_easy_getinfo.3 b/docs/libcurl/curl_easy_getinfo.3 index d3dfcf26b..845e303e3 100644 --- a/docs/libcurl/curl_easy_getinfo.3 +++ b/docs/libcurl/curl_easy_getinfo.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2021, 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 @@ -50,6 +50,9 @@ See \fICURLINFO_EFFECTIVE_URL(3)\fP .IP CURLINFO_RESPONSE_CODE Last received response code. See \fICURLINFO_RESPONSE_CODE(3)\fP +.IP CURLINFO_REFERER +Referrer header. +See \fICURLINFO_REFERER(3)\fP .IP CURLINFO_HTTP_CONNECTCODE Last proxy CONNECT response code. See \fICURLINFO_HTTP_CONNECTCODE(3)\fP diff --git a/docs/libcurl/opts/CURLOPT_REFERER.3 b/docs/libcurl/opts/CURLOPT_REFERER.3 index c3a0ed781..ce3ed173c 100644 --- a/docs/libcurl/opts/CURLOPT_REFERER.3 +++ b/docs/libcurl/opts/CURLOPT_REFERER.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2021, 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 @@ -58,3 +58,4 @@ Returns CURLE_OK if HTTP support is enabled, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. .SH "SEE ALSO" .BR CURLOPT_USERAGENT "(3), " CURLOPT_HTTPHEADER "(3), " +.BR CURLINFO_REFERER "(3), " diff --git a/docs/libcurl/opts/Makefile.inc b/docs/libcurl/opts/Makefile.inc index 5cec7cb4e..69e241862 100644 --- a/docs/libcurl/opts/Makefile.inc +++ b/docs/libcurl/opts/Makefile.inc @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. +# Copyright (C) 1998 - 2021, 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 @@ -64,6 +64,7 @@ man_MANS = \ CURLINFO_REDIRECT_TIME.3 \ CURLINFO_REDIRECT_TIME_T.3 \ CURLINFO_REDIRECT_URL.3 \ + CURLINFO_REFERER.3 \ CURLINFO_REQUEST_SIZE.3 \ CURLINFO_RESPONSE_CODE.3 \ CURLINFO_RETRY_AFTER.3 \ diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions index 7da5c4cfa..5ff3a3503 100644 --- a/docs/libcurl/symbols-in-versions +++ b/docs/libcurl/symbols-in-versions @@ -271,6 +271,7 @@ CURLINFO_REDIRECT_COUNT 7.9.7 CURLINFO_REDIRECT_TIME 7.9.7 CURLINFO_REDIRECT_TIME_T 7.61.0 CURLINFO_REDIRECT_URL 7.18.2 +CURLINFO_REFERER 7.76.0 CURLINFO_REQUEST_SIZE 7.4.1 CURLINFO_RESPONSE_CODE 7.10.8 CURLINFO_RETRY_AFTER 7.66.0 |