From: Viktor Szakats Date: Tue, 9 Dec 2025 00:15:29 +0000 (+0100) Subject: tests/data: move section data to external files X-Git-Tag: rc-8_18_0-2~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70d71e8761843ac81e388f15b373bd025d77a4dc;p=thirdparty%2Fcurl.git tests/data: move section data to external files To make the test files XML-compliant, and the expected results possibly easier to manage by keeping them in `.md`, `.html`, `.1` and `.txt` files. Non-XML-compliant files are down to 31 (1.6%) after this patch. Closes #19882 --- diff --git a/.github/scripts/pyspelling.yaml b/.github/scripts/pyspelling.yaml index 8e26b76189..bb0585ab7a 100644 --- a/.github/scripts/pyspelling.yaml +++ b/.github/scripts/pyspelling.yaml @@ -30,4 +30,4 @@ matrix: - 'strong' - 'em' sources: - - '**/*.md|!docs/BINDINGS.md|!docs/DISTROS.md|!docs/CIPHERS-TLS12.md|!docs/wcurl.md' + - '**/*.md|!docs/BINDINGS.md|!docs/DISTROS.md|!docs/CIPHERS-TLS12.md|!docs/wcurl.md|!tests/data/data*.md' diff --git a/.github/scripts/spacecheck.pl b/.github/scripts/spacecheck.pl index d0776a97d1..2c3a2e3b0a 100755 --- a/.github/scripts/spacecheck.pl +++ b/.github/scripts/spacecheck.pl @@ -31,6 +31,7 @@ my @tabs = ( "Makefile\\.(am|example)\$", "/mkfile", "\\.sln\$", + "^tests/data/data1706-stdout.txt", "^tests/data/test", ); diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 910dbd6991..140d507d77 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -283,6 +283,9 @@ test3200 test3201 test3202 test3203 test3204 test3205 test3206 test3207 test3208 test3209 test3210 test3211 test3212 test3213 test3214 test3215 test3216 \ test4000 test4001 -EXTRA_DIST = $(TESTCASES) DISABLED data-xml1 \ +EXTRA_DIST = $(TESTCASES) DISABLED data-xml1 data320.html \ +data1461.txt data1463.txt \ data1400.c data1401.c data1402.c data1403.c data1404.c data1405.c data1406.c \ -data1407.c data1420.c data1465.c data1481.c +data1407.c data1420.c data1465.c data1481.c \ +data1705-1.md data1705-2.md data1705-3.md data1705-4.md data1705-stdout.1 \ +data1706-1.md data1706-2.md data1706-3.md data1706-4.md data1706-stdout.txt diff --git a/tests/data/data1461.txt b/tests/data/data1461.txt new file mode 100644 index 0000000000..62fe8de989 --- /dev/null +++ b/tests/data/data1461.txt @@ -0,0 +1,21 @@ +Usage: curl [options...] + -d, --data HTTP POST data + -f, --fail Fail fast with no output on HTTP errors + -h, --help Get help for commands + -o, --output Write to file instead of stdout + -O, --remote-name Write output to file named as remote file + -i, --show-headers Show response headers in output + -s, --silent Silent mode + -T, --upload-file Transfer local FILE to destination + -u, --user Server user and password + -A, --user-agent Send User-Agent to server + -v, --verbose Make the operation more talkative + -V, --version Show version number and quit + +This is not the full help; this menu is split into categories. +Use "--help category" to get an overview of all categories, which are: +auth, connection, curl, deprecated, dns, file, ftp, global, http, imap, ldap,%SP +output, pop3, post, proxy, scp, sftp, smtp, ssh, telnet, tftp, timeout, tls,%SP +upload, verbose. +Use "--help all" to list all options +Use "--help [option]" to view documentation for a given option diff --git a/tests/data/data1463.txt b/tests/data/data1463.txt new file mode 100644 index 0000000000..830377fc0d --- /dev/null +++ b/tests/data/data1463.txt @@ -0,0 +1,5 @@ +file: FILE protocol + --create-file-mode File mode for created files + -I, --head Show document info only + -l, --list-only List only mode + -r, --range Retrieve only the bytes within RANGE diff --git a/tests/data/data1705-1.md b/tests/data/data1705-1.md new file mode 100644 index 0000000000..3e06c1b38f --- /dev/null +++ b/tests/data/data1705-1.md @@ -0,0 +1,11 @@ + + +# DESCRIPTION + +**curl** is a tool for transferring data from or to a server using URLs. It +supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, +IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, +SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. + +curl is powered by libcurl for all transfer-related features. See +*libcurl(3)* for details. diff --git a/tests/data/data1705-2.md b/tests/data/data1705-2.md new file mode 100644 index 0000000000..812862a952 --- /dev/null +++ b/tests/data/data1705-2.md @@ -0,0 +1,40 @@ +--- +c: Copyright (C) Daniel Stenberg, , et al. +SPDX-License-Identifier: curl +Short: v +Long: fakeitreal +Mutexed: trace trace-ascii +Help: Make the operation more talkative +Category: important verbose global +Added: 4.0 +Multi: boolean +Scope: global +See-also: + - include + - silent + - trace + - trace-ascii +Example: + - --fakeitreal $URL +--- + +# `--verbose` + +Makes curl verbose during the operation. Useful for debugging and seeing +what's going on under the hood. A line starting with \> means header data sent +by curl, \< means header data received by curl that is hidden in normal cases, +and a line starting with * means additional info provided by curl. + +If you only want HTTP headers in the output, --include or --dump-header might +be more suitable options. + +If you think this option still does not give you enough details, consider using +--trace or --trace-ascii instead. + +Note that verbose output of curl activities and network traffic might contain +sensitive data, including usernames, credentials or secret data content. Be +aware and be careful when sharing trace logs with others. + +End with a quote + + hello diff --git a/tests/data/data1705-3.md b/tests/data/data1705-3.md new file mode 100644 index 0000000000..5041962d40 --- /dev/null +++ b/tests/data/data1705-3.md @@ -0,0 +1,48 @@ +--- +c: Copyright (C) Daniel Stenberg, , et al. +SPDX-License-Identifier: curl +Long: proto +Arg: +Help: Enable/disable PROTOCOLS +Added: 7.20.2 +Category: connection curl +Multi: single +See-also: + - fakeitreal + - proto-default +Example: + - --proto =http,https,sftp $URL +--- + +# `--proto` + +Limit what protocols to allow for transfers. Protocols are evaluated left to +right, are comma separated, and are each a protocol name or 'all', optionally +prefixed by zero or more modifiers. Available modifiers are: + +## + +Permit this protocol in addition to protocols already permitted (this is +the default if no modifier is used). + +## - +Deny this protocol, removing it from the list of protocols already permitted. + +## = +Permit only this protocol (ignoring the list already permitted), though +subject to later modification by subsequent entries in the comma separated +list. + +## + +For example: --proto -ftps uses the default protocols, but disables ftps + +--proto -all,https,+http only enables http and https + +--proto =http,https also only enables http and https + +Unknown and disabled protocols produce a warning. This allows scripts to +safely rely on being able to disable potentially dangerous protocols, without +relying upon support for that protocol being built into curl to avoid an error. + +This option can be used multiple times, in which case the effect is the same +as concatenating the protocols into one instance of the option. diff --git a/tests/data/data1705-4.md b/tests/data/data1705-4.md new file mode 100644 index 0000000000..297b56c4b6 --- /dev/null +++ b/tests/data/data1705-4.md @@ -0,0 +1,22 @@ + + +# PROXY PROTOCOL PREFIXES +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 does not +match a supported one, the proxy is treated as an HTTP proxy. + +The supported proxy protocol prefixes are as follows: +## http:// +Makes it use it as an HTTP proxy. The default if no scheme prefix is used. +## https:// +Makes it treated as an **HTTPS** proxy. +## socks4:// +Makes it the equivalent of --socks4 +## socks4a:// +Makes it the equivalent of --socks4a +## socks5:// +Makes it the equivalent of --socks5 +## socks5h:// +Makes it the equivalent of --socks5-hostname diff --git a/tests/data/data1705-stdout.1 b/tests/data/data1705-stdout.1 new file mode 100644 index 0000000000..f4439a21f1 --- /dev/null +++ b/tests/data/data1705-stdout.1 @@ -0,0 +1,126 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" * SPDX-License-Identifier: curl +.\" * +.\" ************************************************************************** +.\" +.\" DO NOT EDIT. Generated by the curl project managen man page generator. +.\" +.TH curl 1 "%DATE" "curl %VERNUM" "curl Manual" +.SH DESCRIPTION +\fBcurl\fP is a tool for transferring data from or to a server using URLs. It +supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, +IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, +SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. + +curl is powered by libcurl for all transfer\-related features. See +\fIlibcurl(3)\fP for details. +.IP "\-v, \-\-fakeitreal" +Makes curl verbose during the operation. Useful for debugging and seeing +what\(aqs going on under the hood. A line starting with > means header data sent +by curl, < means header data received by curl that is hidden in normal cases, +and a line starting with * means additional info provided by curl. + +If you only want HTTP headers in the output, \fI\-\-include\fP or \fI\-\-dump\-header\fP might +be more suitable options. + +If you think this option still does not give you enough details, consider using +\fI\-\-trace\fP or \fI\-\-trace\-ascii\fP instead. + +Note that verbose output of curl activities and network traffic might contain +sensitive data, including usernames, credentials or secret data content. Be +aware and be careful when sharing trace logs with others. + +End with a quote + +.nf +hello +.fi + +This option is global and does not need to be specified for each use of \fI\-\-next\fP. + +Providing \fI\-\-fakeitreal\fP multiple times has no extra effect. +Disable it again with \-\-no-fakeitreal. + +Example: +.nf +curl --fakeitreal https://example.com +.fi + +This option is mutually exclusive with \fI\-\-trace\fP and \fI\-\-trace\-ascii\fP. +See also \fI\-\-include\fP, \fI\-\-silent\fP, \fI\-\-trace\fP and \fI\-\-trace\-ascii\fP. +.IP "\-\-proto " +Limit what protocols to allow for transfers. Protocols are evaluated left to +right, are comma separated, and are each a protocol name or \(aqall\(aq, optionally +prefixed by zero or more modifiers. Available modifiers are: +.RS +.IP + +Permit this protocol in addition to protocols already permitted (this is +the default if no modifier is used). +.IP - +Deny this protocol, removing it from the list of protocols already permitted. +.IP = +Permit only this protocol (ignoring the list already permitted), though +subject to later modification by subsequent entries in the comma separated +list. +.RE +.IP +For example: \fI\-\-proto\fP \-ftps uses the default protocols, but disables ftps + +\fI\-\-proto\fP \-all,https,+http only enables http and https + +\fI\-\-proto\fP =http,https also only enables http and https + +Unknown and disabled protocols produce a warning. This allows scripts to +safely rely on being able to disable potentially dangerous protocols, without +relying upon support for that protocol being built into curl to avoid an error. + +This option can be used multiple times, in which case the effect is the same +as concatenating the protocols into one instance of the option. + +If \fI\-\-proto\fP is provided several times, the last set value is used. + +Example: +.nf +curl --proto =http,https,sftp https://example.com +.fi + +See also \fI\-\-fakeitreal\fP and \fI\-\-proto\-default\fP. +.SH PROXY PROTOCOL PREFIXES +The proxy string may be specified with a protocol:// prefix to specify +alternative proxy protocols. + +If no protocol is specified in the proxy string or if the string does not +match a supported one, the proxy is treated as an HTTP proxy. + +The supported proxy protocol prefixes are as follows: +.IP http:// +Makes it use it as an HTTP proxy. The default if no scheme prefix is used. +.IP https:// +Makes it treated as an \fBHTTPS\fP proxy. +.IP socks4:// +Makes it the equivalent of \fI\-\-socks4\fP +.IP socks4a:// +Makes it the equivalent of \fI\-\-socks4a\fP +.IP socks5:// +Makes it the equivalent of \fI\-\-socks5\fP +.IP socks5h:// +Makes it the equivalent of \fI\-\-socks5\-hostname\fP diff --git a/tests/data/data1706-1.md b/tests/data/data1706-1.md new file mode 100644 index 0000000000..3e06c1b38f --- /dev/null +++ b/tests/data/data1706-1.md @@ -0,0 +1,11 @@ + + +# DESCRIPTION + +**curl** is a tool for transferring data from or to a server using URLs. It +supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, +IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, +SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. + +curl is powered by libcurl for all transfer-related features. See +*libcurl(3)* for details. diff --git a/tests/data/data1706-2.md b/tests/data/data1706-2.md new file mode 100644 index 0000000000..6665c5b21c --- /dev/null +++ b/tests/data/data1706-2.md @@ -0,0 +1,36 @@ +--- +c: Copyright (C) Daniel Stenberg, , et al. +SPDX-License-Identifier: curl +Short: v +Long: fakeitreal +Mutexed: trace trace-ascii +Help: Make the operation more talkative +Category: important verbose global +Added: 4.0 +Multi: boolean +Scope: global +See-also: + - include + - silent + - trace + - trace-ascii +Example: + - --fakeitreal $URL +--- + +# `--verbose` + +Makes curl verbose during the operation. Useful for debugging and seeing +what's going on under the hood. A line starting with \> means header data sent +by curl, \< means header data received by curl that is hidden in normal cases, +and a line starting with * means additional info provided by curl. + +If you only want HTTP headers in the output, --include or --dump-header might +be more suitable options. + +If you think this option still does not give you enough details, consider using +--trace or --trace-ascii instead. + +Note that verbose output of curl activities and network traffic might contain +sensitive data, including usernames, credentials or secret data content. Be +aware and be careful when sharing trace logs with others. diff --git a/tests/data/data1706-3.md b/tests/data/data1706-3.md new file mode 100644 index 0000000000..5041962d40 --- /dev/null +++ b/tests/data/data1706-3.md @@ -0,0 +1,48 @@ +--- +c: Copyright (C) Daniel Stenberg, , et al. +SPDX-License-Identifier: curl +Long: proto +Arg: +Help: Enable/disable PROTOCOLS +Added: 7.20.2 +Category: connection curl +Multi: single +See-also: + - fakeitreal + - proto-default +Example: + - --proto =http,https,sftp $URL +--- + +# `--proto` + +Limit what protocols to allow for transfers. Protocols are evaluated left to +right, are comma separated, and are each a protocol name or 'all', optionally +prefixed by zero or more modifiers. Available modifiers are: + +## + +Permit this protocol in addition to protocols already permitted (this is +the default if no modifier is used). + +## - +Deny this protocol, removing it from the list of protocols already permitted. + +## = +Permit only this protocol (ignoring the list already permitted), though +subject to later modification by subsequent entries in the comma separated +list. + +## + +For example: --proto -ftps uses the default protocols, but disables ftps + +--proto -all,https,+http only enables http and https + +--proto =http,https also only enables http and https + +Unknown and disabled protocols produce a warning. This allows scripts to +safely rely on being able to disable potentially dangerous protocols, without +relying upon support for that protocol being built into curl to avoid an error. + +This option can be used multiple times, in which case the effect is the same +as concatenating the protocols into one instance of the option. diff --git a/tests/data/data1706-4.md b/tests/data/data1706-4.md new file mode 100644 index 0000000000..297b56c4b6 --- /dev/null +++ b/tests/data/data1706-4.md @@ -0,0 +1,22 @@ + + +# PROXY PROTOCOL PREFIXES +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 does not +match a supported one, the proxy is treated as an HTTP proxy. + +The supported proxy protocol prefixes are as follows: +## http:// +Makes it use it as an HTTP proxy. The default if no scheme prefix is used. +## https:// +Makes it treated as an **HTTPS** proxy. +## socks4:// +Makes it the equivalent of --socks4 +## socks4a:// +Makes it the equivalent of --socks4a +## socks5:// +Makes it the equivalent of --socks5 +## socks5h:// +Makes it the equivalent of --socks5-hostname diff --git a/tests/data/data1706-stdout.txt b/tests/data/data1706-stdout.txt new file mode 100644 index 0000000000..b352864a8d --- /dev/null +++ b/tests/data/data1706-stdout.txt @@ -0,0 +1,116 @@ +DESCRIPTION + + curl is a tool for transferring data from or to a server using URLs. It + supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, + HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, + SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. + + curl is powered by libcurl for all transfer-related features. See + libcurl(3) for details. + + -v, --fakeitreal + Makes curl verbose during the operation. Useful for debugging and + seeing what's going on under the hood. A line starting with > + means header data sent by curl, < means header data received by + curl that is hidden in normal cases, and a line starting with * + means additional info provided by curl. + + If you only want HTTP headers in the output, --include or + --dump-header might be more suitable options. + + If you think this option still does not give you enough details, + consider using --trace or --trace-ascii instead. + + Note that verbose output of curl activities and network traffic + might contain sensitive data, including usernames, credentials or + secret data content. Be aware and be careful when sharing trace + logs with others. + + This option is global and does not need to be specified for each + use of --next. Providing --fakeitreal multiple times has no extra + effect. Disable it again with --no-fakeitreal. + + Example: + curl --fakeitreal https://example.com + + This option is mutually exclusive with --trace and --trace-ascii. + See also --include, --silent, --trace and --trace-ascii. + + --proto + Limit what protocols to allow for transfers. Protocols are + evaluated left to right, are comma separated, and are each a + protocol name or 'all', optionally prefixed by zero or more + modifiers. Available modifiers are: + + + + + Permit this protocol in addition to protocols already + permitted (this is the default if no modifier is used). + + - + + Deny this protocol, removing it from the list of protocols + already permitted. + + = + + Permit only this protocol (ignoring the list already + permitted), though subject to later modification by subsequent + entries in the comma separated list. + + For example: --proto -ftps uses the default protocols, but + disables ftps + + --proto -all,https,+http only enables http and https + + --proto =http,https also only enables http and https + + Unknown and disabled protocols produce a warning. This allows + scripts to safely rely on being able to disable potentially + dangerous protocols, without relying upon support for that + protocol being built into curl to avoid an error. + + This option can be used multiple times, in which case the effect + is the same as concatenating the protocols into one instance of + the option. If --proto is provided several times, the last set + value is used. + + Example: + curl --proto =http,https,sftp https://example.com + + See also --fakeitreal and --proto-default. + +PROXY PROTOCOL PREFIXES + + The proxy string may be specified with a protocol:// prefix to specify + alternative proxy protocols. + + If no protocol is specified in the proxy string or if the string does not + match a supported one, the proxy is treated as an HTTP proxy. + + The supported proxy protocol prefixes are as follows: + + http:// + + Makes it use it as an HTTP proxy. The default if no scheme prefix is + used. + + https:// + + Makes it treated as an HTTPS proxy. + + socks4:// + + Makes it the equivalent of --socks4 + + socks4a:// + + Makes it the equivalent of --socks4a + + socks5:// + + Makes it the equivalent of --socks5 + + socks5h:// + + Makes it the equivalent of --socks5-hostname diff --git a/tests/data/data320.html b/tests/data/data320.html new file mode 100644 index 0000000000..2756af5f3b --- /dev/null +++ b/tests/data/data320.html @@ -0,0 +1,20 @@ + +

This is GnuTLS

+ + +

Session ID: 003030000100000001000000000000000030330001000000B062410001000000

+
If your browser supports session resuming, then you should see the same session ID, when you press the reload button.
+

Connected as user 'jsmith'.

+

+ + + + + +

Protocol version:TLS1.2
Key Exchange:SRP
CompressionNULL
CipherAES-NNN-CBC
MACSHA1
CiphersuiteSRP_SHA_AES_NNN_CBC_SHA1
+


Your HTTP header was:

Host: localhost:9011%CR
+User-Agent: curl-test-suite%CR
+Accept: */*%CR
+%CR
+

+ diff --git a/tests/data/test1461 b/tests/data/test1461 index f45d0dcd12..27c58bfeea 100644 --- a/tests/data/test1461 +++ b/tests/data/test1461 @@ -2,7 +2,6 @@ --help -notxml @@ -32,27 +31,7 @@ curl important --help 0 -Usage: curl [options...] - -d, --data HTTP POST data - -f, --fail Fail fast with no output on HTTP errors - -h, --help Get help for commands - -o, --output Write to file instead of stdout - -O, --remote-name Write output to file named as remote file - -i, --show-headers Show response headers in output - -s, --silent Silent mode - -T, --upload-file Transfer local FILE to destination - -u, --user Server user and password - -A, --user-agent Send User-Agent to server - -v, --verbose Make the operation more talkative - -V, --version Show version number and quit - -This is not the full help; this menu is split into categories. -Use "--help category" to get an overview of all categories, which are: -auth, connection, curl, deprecated, dns, file, ftp, global, http, imap, ldap,%SP -output, pop3, post, proxy, scp, sftp, smtp, ssh, telnet, tftp, timeout, tls,%SP -upload, verbose. -Use "--help all" to list all options -Use "--help [option]" to view documentation for a given option +%includetext %SRCDIR/data/data%TESTNUMBER.txt% diff --git a/tests/data/test1463 b/tests/data/test1463 index e67bdfdae4..61168ad303 100644 --- a/tests/data/test1463 +++ b/tests/data/test1463 @@ -3,7 +3,6 @@ FILE --help -notxml @@ -33,11 +32,7 @@ curl file category --help 0 -file: FILE protocol - --create-file-mode File mode for created files - -I, --head Show document info only - -l, --list-only List only mode - -r, --range Retrieve only the bytes within RANGE +%includetext %SRCDIR/data/data%TESTNUMBER.txt% diff --git a/tests/data/test1464 b/tests/data/test1464 index 4a4f6b3633..be0b0c5f4d 100644 --- a/tests/data/test1464 +++ b/tests/data/test1464 @@ -33,11 +33,7 @@ curl file category --help with lower/upper mix 0 -file: FILE protocol - --create-file-mode File mode for created files - -I, --head Show document info only - -l, --list-only List only mode - -r, --range Retrieve only the bytes within RANGE +%includetext %SRCDIR/data/data1463.txt% diff --git a/tests/data/test1705 b/tests/data/test1705 index dc21207860..5db0039d82 100644 --- a/tests/data/test1705 +++ b/tests/data/test1705 @@ -4,7 +4,6 @@ script documentation managen -notxml @@ -23,133 +22,16 @@ _footer.md
- - -# DESCRIPTION - -**curl** is a tool for transferring data from or to a server using URLs. It -supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, -IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, -SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. - -curl is powered by libcurl for all transfer-related features. See -*libcurl(3)* for details. +%includetext %SRCDIR/data/data%TESTNUMBER-1.md% ---- -c: Copyright (C) Daniel Stenberg, , et al. -SPDX-License-Identifier: curl -Short: v -Long: fakeitreal -Mutexed: trace trace-ascii -Help: Make the operation more talkative -Category: important verbose global -Added: 4.0 -Multi: boolean -Scope: global -See-also: - - include - - silent - - trace - - trace-ascii -Example: - - --fakeitreal $URL ---- - -# `--verbose` - -Makes curl verbose during the operation. Useful for debugging and seeing -what's going on under the hood. A line starting with \> means header data sent -by curl, \< means header data received by curl that is hidden in normal cases, -and a line starting with * means additional info provided by curl. - -If you only want HTTP headers in the output, --include or --dump-header might -be more suitable options. - -If you think this option still does not give you enough details, consider using ---trace or --trace-ascii instead. - -Note that verbose output of curl activities and network traffic might contain -sensitive data, including usernames, credentials or secret data content. Be -aware and be careful when sharing trace logs with others. - -End with a quote - - hello +%includetext %SRCDIR/data/data%TESTNUMBER-2.md% ---- -c: Copyright (C) Daniel Stenberg, , et al. -SPDX-License-Identifier: curl -Long: proto -Arg: -Help: Enable/disable PROTOCOLS -Added: 7.20.2 -Category: connection curl -Multi: single -See-also: - - fakeitreal - - proto-default -Example: - - --proto =http,https,sftp $URL ---- - -# `--proto` - -Limit what protocols to allow for transfers. Protocols are evaluated left to -right, are comma separated, and are each a protocol name or 'all', optionally -prefixed by zero or more modifiers. Available modifiers are: - -## + -Permit this protocol in addition to protocols already permitted (this is -the default if no modifier is used). - -## - -Deny this protocol, removing it from the list of protocols already permitted. - -## = -Permit only this protocol (ignoring the list already permitted), though -subject to later modification by subsequent entries in the comma separated -list. - -## - -For example: --proto -ftps uses the default protocols, but disables ftps - ---proto -all,https,+http only enables http and https - ---proto =http,https also only enables http and https - -Unknown and disabled protocols produce a warning. This allows scripts to -safely rely on being able to disable potentially dangerous protocols, without -relying upon support for that protocol being built into curl to avoid an error. - -This option can be used multiple times, in which case the effect is the same -as concatenating the protocols into one instance of the option. +%includetext %SRCDIR/data/data%TESTNUMBER-3.md% - - -# PROXY PROTOCOL PREFIXES -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 does not -match a supported one, the proxy is treated as an HTTP proxy. - -The supported proxy protocol prefixes are as follows: -## http:// -Makes it use it as an HTTP proxy. The default if no scheme prefix is used. -## https:// -Makes it treated as an **HTTPS** proxy. -## socks4:// -Makes it the equivalent of --socks4 -## socks4a:// -Makes it the equivalent of --socks4a -## socks5:// -Makes it the equivalent of --socks5 -## socks5h:// -Makes it the equivalent of --socks5-hostname +%includetext %SRCDIR/data/data%TESTNUMBER-4.md% @@ -168,132 +50,7 @@ WARN: option1.md mutexes a non-existing option: trace-ascii option2.md:15:1:WARN: see-also a non-existing option: proto-default -.\" ************************************************************************** -.\" * _ _ ____ _ -.\" * Project ___| | | | _ \| | -.\" * / __| | | | |_) | | -.\" * | (__| |_| | _ <| |___ -.\" * \___|\___/|_| \_\_____| -.\" * -.\" * Copyright (C) Daniel Stenberg, , et al. -.\" * -.\" * This software is licensed as described in the file COPYING, which -.\" * you should have received as part of this distribution. The terms -.\" * are also available at https://curl.se/docs/copyright.html. -.\" * -.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell -.\" * copies of the Software, and permit persons to whom the Software is -.\" * furnished to do so, under the terms of the COPYING file. -.\" * -.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -.\" * KIND, either express or implied. -.\" * -.\" * SPDX-License-Identifier: curl -.\" * -.\" ************************************************************************** -.\" -.\" DO NOT EDIT. Generated by the curl project managen man page generator. -.\" -.TH curl 1 "%DATE" "curl %VERNUM" "curl Manual" -.SH DESCRIPTION -\fBcurl\fP is a tool for transferring data from or to a server using URLs. It -supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, -IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, -SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. - -curl is powered by libcurl for all transfer\-related features. See -\fIlibcurl(3)\fP for details. -.IP "\-v, \-\-fakeitreal" -Makes curl verbose during the operation. Useful for debugging and seeing -what\(aqs going on under the hood. A line starting with > means header data sent -by curl, < means header data received by curl that is hidden in normal cases, -and a line starting with * means additional info provided by curl. - -If you only want HTTP headers in the output, \fI\-\-include\fP or \fI\-\-dump\-header\fP might -be more suitable options. - -If you think this option still does not give you enough details, consider using -\fI\-\-trace\fP or \fI\-\-trace\-ascii\fP instead. - -Note that verbose output of curl activities and network traffic might contain -sensitive data, including usernames, credentials or secret data content. Be -aware and be careful when sharing trace logs with others. - -End with a quote - -.nf -hello -.fi - -This option is global and does not need to be specified for each use of \fI\-\-next\fP. - -Providing \fI\-\-fakeitreal\fP multiple times has no extra effect. -Disable it again with \-\-no-fakeitreal. - -Example: -.nf -curl --fakeitreal https://example.com -.fi - -This option is mutually exclusive with \fI\-\-trace\fP and \fI\-\-trace\-ascii\fP. -See also \fI\-\-include\fP, \fI\-\-silent\fP, \fI\-\-trace\fP and \fI\-\-trace\-ascii\fP. -.IP "\-\-proto " -Limit what protocols to allow for transfers. Protocols are evaluated left to -right, are comma separated, and are each a protocol name or \(aqall\(aq, optionally -prefixed by zero or more modifiers. Available modifiers are: -.RS -.IP + -Permit this protocol in addition to protocols already permitted (this is -the default if no modifier is used). -.IP - -Deny this protocol, removing it from the list of protocols already permitted. -.IP = -Permit only this protocol (ignoring the list already permitted), though -subject to later modification by subsequent entries in the comma separated -list. -.RE -.IP -For example: \fI\-\-proto\fP \-ftps uses the default protocols, but disables ftps - -\fI\-\-proto\fP \-all,https,+http only enables http and https - -\fI\-\-proto\fP =http,https also only enables http and https - -Unknown and disabled protocols produce a warning. This allows scripts to -safely rely on being able to disable potentially dangerous protocols, without -relying upon support for that protocol being built into curl to avoid an error. - -This option can be used multiple times, in which case the effect is the same -as concatenating the protocols into one instance of the option. - -If \fI\-\-proto\fP is provided several times, the last set value is used. - -Example: -.nf -curl --proto =http,https,sftp https://example.com -.fi - -See also \fI\-\-fakeitreal\fP and \fI\-\-proto\-default\fP. -.SH PROXY PROTOCOL PREFIXES -The proxy string may be specified with a protocol:// prefix to specify -alternative proxy protocols. - -If no protocol is specified in the proxy string or if the string does not -match a supported one, the proxy is treated as an HTTP proxy. - -The supported proxy protocol prefixes are as follows: -.IP http:// -Makes it use it as an HTTP proxy. The default if no scheme prefix is used. -.IP https:// -Makes it treated as an \fBHTTPS\fP proxy. -.IP socks4:// -Makes it the equivalent of \fI\-\-socks4\fP -.IP socks4a:// -Makes it the equivalent of \fI\-\-socks4a\fP -.IP socks5:// -Makes it the equivalent of \fI\-\-socks5\fP -.IP socks5h:// -Makes it the equivalent of \fI\-\-socks5\-hostname\fP +%includetext %SRCDIR/data/data%TESTNUMBER-stdout.1% diff --git a/tests/data/test1706 b/tests/data/test1706 index dd24365d05..cfe6285308 100644 --- a/tests/data/test1706 +++ b/tests/data/test1706 @@ -4,7 +4,6 @@ script documentation managen -notxml @@ -23,129 +22,16 @@ _footer.md
- - -# DESCRIPTION - -**curl** is a tool for transferring data from or to a server using URLs. It -supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, -IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, -SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. - -curl is powered by libcurl for all transfer-related features. See -*libcurl(3)* for details. +%includetext %SRCDIR/data/data%TESTNUMBER-1.md% ---- -c: Copyright (C) Daniel Stenberg, , et al. -SPDX-License-Identifier: curl -Short: v -Long: fakeitreal -Mutexed: trace trace-ascii -Help: Make the operation more talkative -Category: important verbose global -Added: 4.0 -Multi: boolean -Scope: global -See-also: - - include - - silent - - trace - - trace-ascii -Example: - - --fakeitreal $URL ---- - -# `--verbose` - -Makes curl verbose during the operation. Useful for debugging and seeing -what's going on under the hood. A line starting with \> means header data sent -by curl, \< means header data received by curl that is hidden in normal cases, -and a line starting with * means additional info provided by curl. - -If you only want HTTP headers in the output, --include or --dump-header might -be more suitable options. - -If you think this option still does not give you enough details, consider using ---trace or --trace-ascii instead. - -Note that verbose output of curl activities and network traffic might contain -sensitive data, including usernames, credentials or secret data content. Be -aware and be careful when sharing trace logs with others. +%includetext %SRCDIR/data/data%TESTNUMBER-2.md% ---- -c: Copyright (C) Daniel Stenberg, , et al. -SPDX-License-Identifier: curl -Long: proto -Arg: -Help: Enable/disable PROTOCOLS -Added: 7.20.2 -Category: connection curl -Multi: single -See-also: - - fakeitreal - - proto-default -Example: - - --proto =http,https,sftp $URL ---- - -# `--proto` - -Limit what protocols to allow for transfers. Protocols are evaluated left to -right, are comma separated, and are each a protocol name or 'all', optionally -prefixed by zero or more modifiers. Available modifiers are: - -## + -Permit this protocol in addition to protocols already permitted (this is -the default if no modifier is used). - -## - -Deny this protocol, removing it from the list of protocols already permitted. - -## = -Permit only this protocol (ignoring the list already permitted), though -subject to later modification by subsequent entries in the comma separated -list. - -## - -For example: --proto -ftps uses the default protocols, but disables ftps - ---proto -all,https,+http only enables http and https - ---proto =http,https also only enables http and https - -Unknown and disabled protocols produce a warning. This allows scripts to -safely rely on being able to disable potentially dangerous protocols, without -relying upon support for that protocol being built into curl to avoid an error. - -This option can be used multiple times, in which case the effect is the same -as concatenating the protocols into one instance of the option. +%includetext %SRCDIR/data/data%TESTNUMBER-3.md% - - -# PROXY PROTOCOL PREFIXES -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 does not -match a supported one, the proxy is treated as an HTTP proxy. - -The supported proxy protocol prefixes are as follows: -## http:// -Makes it use it as an HTTP proxy. The default if no scheme prefix is used. -## https:// -Makes it treated as an **HTTPS** proxy. -## socks4:// -Makes it the equivalent of --socks4 -## socks4a:// -Makes it the equivalent of --socks4a -## socks5:// -Makes it the equivalent of --socks5 -## socks5h:// -Makes it the equivalent of --socks5-hostname +%includetext %SRCDIR/data/data%TESTNUMBER-4.md% @@ -164,122 +50,7 @@ WARN: option1.md mutexes a non-existing option: trace-ascii option2.md:15:1:WARN: see-also a non-existing option: proto-default -DESCRIPTION - - curl is a tool for transferring data from or to a server using URLs. It - supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, - HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, - SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. - - curl is powered by libcurl for all transfer-related features. See - libcurl(3) for details. - - -v, --fakeitreal - Makes curl verbose during the operation. Useful for debugging and - seeing what's going on under the hood. A line starting with > - means header data sent by curl, < means header data received by - curl that is hidden in normal cases, and a line starting with * - means additional info provided by curl. - - If you only want HTTP headers in the output, --include or - --dump-header might be more suitable options. - - If you think this option still does not give you enough details, - consider using --trace or --trace-ascii instead. - - Note that verbose output of curl activities and network traffic - might contain sensitive data, including usernames, credentials or - secret data content. Be aware and be careful when sharing trace - logs with others. - - This option is global and does not need to be specified for each - use of --next. Providing --fakeitreal multiple times has no extra - effect. Disable it again with --no-fakeitreal. - - Example: - curl --fakeitreal https://example.com - - This option is mutually exclusive with --trace and --trace-ascii. - See also --include, --silent, --trace and --trace-ascii. - - --proto - Limit what protocols to allow for transfers. Protocols are - evaluated left to right, are comma separated, and are each a - protocol name or 'all', optionally prefixed by zero or more - modifiers. Available modifiers are: - - + - - Permit this protocol in addition to protocols already - permitted (this is the default if no modifier is used). - - - - - Deny this protocol, removing it from the list of protocols - already permitted. - - = - - Permit only this protocol (ignoring the list already - permitted), though subject to later modification by subsequent - entries in the comma separated list. - - For example: --proto -ftps uses the default protocols, but - disables ftps - - --proto -all,https,+http only enables http and https - - --proto =http,https also only enables http and https - - Unknown and disabled protocols produce a warning. This allows - scripts to safely rely on being able to disable potentially - dangerous protocols, without relying upon support for that - protocol being built into curl to avoid an error. - - This option can be used multiple times, in which case the effect - is the same as concatenating the protocols into one instance of - the option. If --proto is provided several times, the last set - value is used. - - Example: - curl --proto =http,https,sftp https://example.com - - See also --fakeitreal and --proto-default. - -PROXY PROTOCOL PREFIXES - - The proxy string may be specified with a protocol:// prefix to specify - alternative proxy protocols. - - If no protocol is specified in the proxy string or if the string does not - match a supported one, the proxy is treated as an HTTP proxy. - - The supported proxy protocol prefixes are as follows: - - http:// - - Makes it use it as an HTTP proxy. The default if no scheme prefix is - used. - - https:// - - Makes it treated as an HTTPS proxy. - - socks4:// - - Makes it the equivalent of --socks4 - - socks4a:// - - Makes it the equivalent of --socks4a - - socks5:// - - Makes it the equivalent of --socks5 - - socks5h:// - - Makes it the equivalent of --socks5-hostname +%includetext %SRCDIR/data/data%TESTNUMBER-stdout.txt% diff --git a/tests/data/test320 b/tests/data/test320 index 0967823d38..ca68674571 100644 --- a/tests/data/test320 +++ b/tests/data/test320 @@ -11,31 +11,7 @@ notxml # Server-side -HTTP/1.0 200 OK%CR -Content-type: text/html%CR -%CR - - -

This is GnuTLS

- - -

Session ID: 003030000100000001000000000000000030330001000000B062410001000000

-
If your browser supports session resuming, then you should see the same session ID, when you press the reload button.
-

Connected as user 'jsmith'.

-

- - - - - -

Protocol version:TLS1.2
Key Exchange:SRP
CompressionNULL
CipherAES-NNN-CBC
MACSHA1
CiphersuiteSRP_SHA_AES_NNN_CBC_SHA1
-


Your HTTP header was:

Host: localhost:9011%CR
-User-Agent: curl-test-suite%CR
-Accept: */*%CR
-%CR
-

- - +%includetext %SRCDIR/data/data%TESTNUMBER.html%