]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl.1: remove mentions of really old version changes
authorDaniel Stenberg <daniel@haxx.se>
Tue, 28 Sep 2021 08:30:59 +0000 (10:30 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 28 Sep 2021 14:19:59 +0000 (16:19 +0200)
To make the man page more readable, this change removes all references
to changes in support/versions etc that happened before 7.30.0 from the
curl.1 output file. 7.30.0 was released on Apr 12 2013. This particular
limit is a bit arbitrary but was fairly easy to grep for.

It is handled like this: the 'Added' keyword is only used in output if
it refers to 7.30.0 or later. All occurances of "(Added in $VERSION)" in
description will be stripped out if the mentioned $VERSION is from
before 7.30.0. It is therefore important that the "Added in..."
references are always written exactly like that - and on a single line,
not split over two.

This change removes about 80 version number references from curl.1, down
to 138 from 218.

Closes #7786

12 files changed:
docs/cmdline-opts/ftp-port.d
docs/cmdline-opts/gen.pl
docs/cmdline-opts/page-footer
docs/cmdline-opts/page-header
docs/cmdline-opts/proto-redir.d
docs/cmdline-opts/proxy.d
docs/cmdline-opts/request.d
docs/cmdline-opts/socks4.d
docs/cmdline-opts/socks4a.d
docs/cmdline-opts/socks5-hostname.d
docs/cmdline-opts/socks5.d
docs/cmdline-opts/write-out.d

index 52e55e58f9069624ae16713bb9aec94703778d19..7675bc0c888a0de0db5c6499f6aba61dbd6c51ef 100644 (file)
@@ -30,7 +30,8 @@ If this option is used several times, the last one will be used. Disable the
 use of PORT with --ftp-pasv. Disable the attempt to use the EPRT command
 instead of PORT by using --disable-eprt. EPRT is really PORT++.
 
-Since 7.19.5, you can append \&":[start]-[end]\&" to the right of the address,
-to tell curl what TCP port range to use. That means you specify a port range,
-from a lower to a higher number. A single number works as well, but do note
-that it increases the risk of failure since the port may not be available.
+You can also append \&":[start]-[end]\&" to the right of the address, to tell
+curl what TCP port range to use. That means you specify a port range, from a
+lower to a higher number. A single number works as well, but do note that it
+increases the risk of failure since the port may not be available.
+(Added in 7.19.5)
index d63aed168a0736e909ccac14254f5a6a35ca084c..1e9f8469648dbaea5b3f242e6df81816d4399d83 100755 (executable)
@@ -76,6 +76,12 @@ sub manpageify {
 sub printdesc {
     my @desc = @_;
     for my $d (@desc) {
+        if($d =~ /\(Added in ([0-9.]+)\)/i) {
+            my $ver = $1;
+            if(too_old($ver)) {
+                $d =~ s/ *\(Added in $ver\)//gi;
+            }
+        }
         if($d !~ /^.\\"/) {
             # **bold**
             $d =~ s/\*\*([^ ]*)\*\*/\\fB$1\\fP/g;
@@ -127,8 +133,25 @@ sub protocols {
     }
 }
 
+sub too_old {
+    my ($version)=@_;
+    if($version =~ /^(\d+)\.(\d+)\.(\d+)/) {
+        my $a = $1 * 1000 + $2 * 10 + $3;
+        if($a < 7300) {
+            # we consider everything before 7.30.0 to be too old to mention
+            # specific changes for
+            return 1;
+        }
+    }
+    return 0;
+}
+
 sub added {
     my ($standalone, $data)=@_;
+    if(too_old($data)) {
+        # don't mention ancient additions
+        return "";
+    }
     if($standalone) {
         return ".SH \"ADDED\"\nAdded in curl version $data\n";
     }
index c88cd5fab8c9540273dba62cfe0191f57f666679..9794b9cb34e0039f5ec8c02a3615d84a991581dc 100644 (file)
@@ -61,8 +61,8 @@ analyze the TLS traffic in real time using network analyzing tools such as
 Wireshark. This works with the following TLS backends: OpenSSL, libressl,
 BoringSSL, GnuTLS, NSS and wolfSSL.
 .SH "PROXY PROTOCOL PREFIXES"
-Since curl version 7.21.7, the proxy string may be specified with a
-protocol:// prefix to specify alternative proxy protocols.
+The proxy string may be specified with a protocol:// prefix to specify
+alternative proxy protocols. (Added in 7.21.7)
 
 If no protocol is specified in the proxy string or if the string doesn't match
 a supported one, the proxy will be treated as an HTTP proxy.
index 2a1a7dac94460481ba3545ab13c5dcd01b3e4700..b52d2fc979f7adba38e609268ebc5e666e1e2c78 100644 (file)
@@ -194,6 +194,4 @@ options -O, -L and -v at once as -OLv.
 In general, all boolean options are enabled with --**option** and yet again
 disabled with --**no-**option. That is, you use the exact same option name
 but prefix it with "no-". However, in this list we mostly only list and show
-the --option version of them. (This concept with --no options was added in
-7.19.0. Previously most options were toggled on/off through repeated use of
-the same command line option.)
+the --option version of them.
index 81d495dd8f3c234ab88b7c75c8b405a89731443e..73a27d0399b9d8837b5a9d071be006cde3908973 100644 (file)
@@ -13,8 +13,6 @@ Example, allow only HTTP and HTTPS on redirect:
 
  curl --proto-redir -all,http,https http://example.com
 
-By default curl will allow HTTP, HTTPS, FTP and FTPS on redirect (7.65.2).
-Older versions of curl allowed all protocols on redirect except several
-disabled for security reasons: Since 7.19.4 FILE and SCP are disabled, and
-since 7.40.0 SMB and SMBS are also disabled. Specifying *all* or *+all*
-enables all protocols on redirect, including those disabled for security.
+By default curl will only allow HTTP, HTTPS, FTP and FTPS on redirect (since
+7.65.2). Specifying *all* or *+all* enables all protocols on redirects, which
+is not good for security.
index 81d9bc9521cac42f7fd3f47f94ac66944d58304b..bc9cb2983640c5a923938f0579962581a24dc155 100644 (file)
@@ -10,7 +10,7 @@ Use the specified proxy.
 The proxy string can be specified with a protocol:// prefix. No protocol
 specified or http:// will be treated as HTTP proxy. Use socks4://, socks4a://,
 socks5:// or socks5h:// to request a specific SOCKS version to be used.
-(The protocol support was added in curl 7.21.7)
+(Added in 7.21.7)
 
 HTTPS proxy support via https:// protocol prefix was added in 7.52.0 for
 OpenSSL, GnuTLS and NSS.
index 0db0bc9f7700a012c1339d560fb698f8c8752af9..d2bb99d540bb6d0b3abf941840182bb958f7be0e 100644 (file)
@@ -30,8 +30,8 @@ Specifies a custom FTP command to use instead of LIST when doing file lists
 with FTP.
 
 (POP3)
-Specifies a custom POP3 command to use instead of LIST or RETR. (Added in
-7.26.0)
+Specifies a custom POP3 command to use instead of LIST or RETR.
+(Added in 7.26.0)
 
 (IMAP)
 Specifies a custom IMAP command to use instead of LIST. (Added in 7.30.0)
index 1cae1e1fcec0379753abeae08b6dbb00be84ba06..6494f33d37665b699613799634bb95054a54a282 100644 (file)
@@ -12,8 +12,8 @@ and passing the address on to the proxy.
 This option overrides any previous use of --proxy, as they are mutually
 exclusive.
 
-Since 7.21.7, this option is superfluous since you can specify a socks4 proxy
-with --proxy using a socks4:// protocol prefix.
+This option is superfluous since you can specify a socks4 proxy with --proxy
+using a socks4:// protocol prefix. (Added in 7.21.7)
 
 Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at the same time
 --proxy is used with an HTTP/HTTPS proxy. In such a case curl first connects to
index 8edefdd1b626aa59fa58367168d6fe68a6e66839..28359e05fc66ec652501315e7b0bcab5a62193e3 100644 (file)
@@ -11,8 +11,8 @@ assumed at port 1080. This asks the proxy to resolve the host name.
 This option overrides any previous use of --proxy, as they are mutually
 exclusive.
 
-Since 7.21.7, this option is superfluous since you can specify a socks4a proxy
-with --proxy using a socks4a:// protocol prefix.
+This option is superfluous since you can specify a socks4a proxy with --proxy
+using a socks4a:// protocol prefix. (Added in 7.21.7)
 
 Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at the same time
 --proxy is used with an HTTP/HTTPS proxy. In such a case curl first connects to
index 729a7bf85902754d7080fe42d46f02d777e3df90..599e80ef35652ca38f93ef49e96416c200fe65d9 100644 (file)
@@ -11,8 +11,8 @@ the port number is not specified, it is assumed at port 1080.
 This option overrides any previous use of --proxy, as they are mutually
 exclusive.
 
-Since 7.21.7, this option is superfluous since you can specify a socks5
-hostname proxy with --proxy using a socks5h:// protocol prefix.
+This option is superfluous since you can specify a socks5 hostname proxy with
+--proxy using a socks5h:// protocol prefix. (Added in 7.21.7)
 
 Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at the same time
 --proxy is used with an HTTP/HTTPS proxy. In such a case curl first connects to
index 99c740f885e54405a723bbe1471bd188571458f2..85c349d6b4e6a11b752eb2f4a5b8b67dd03fa784 100644 (file)
@@ -11,8 +11,8 @@ port number is not specified, it is assumed at port 1080.
 This option overrides any previous use of --proxy, as they are mutually
 exclusive.
 
-Since 7.21.7, this option is superfluous since you can specify a socks5 proxy
-with --proxy using a socks5:// protocol prefix.
+This option is superfluous since you can specify a socks5 proxy with --proxy
+using a socks5:// protocol prefix. (Added in 7.21.7)
 
 Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at the same time
 --proxy is used with an HTTP/HTTPS proxy. In such a case curl first connects to
index 6168059786e0b2c71baf2dd2e2cd9173ae6498e5..3da4756ae690acdf90bca6f5d037c0ede078e1fb 100644 (file)
@@ -48,8 +48,7 @@ server. (Added in 7.15.4)
 .TP
 .B http_code
 The numerical response code that was found in the last retrieved HTTP(S) or
-FTP(s) transfer. In 7.18.2 the alias **response_code** was added to show the
-same info.
+FTP(s) transfer.
 .TP
 .B http_connect
 The numerical code that was found in the last response (from a proxy) to a