Commit Graph

579 Commits

Author SHA1 Message Date
Daniel Stenberg
53523d7dcc
docs: clarify that more backends have HTTPS proxy support
Closes #11033
2023-04-26 16:28:12 +02:00
Daniel Stenberg
e39754f6a2
curl: add --proxy-http2
For trying HTTP/2 with an HTTPS proxy.

Closes #10926
2023-04-14 10:39:23 +02:00
Daniel Stenberg
a8fbdb461c
gen.pl: error on duplicated See-Also fields
Updated http2.d accordingly.

Closes #10925
2023-04-11 12:31:30 +02:00
Ali Khodkar
8803d2bfd9
write-out.d: add missing periods
Closes #10897
2023-04-08 00:23:48 +02:00
Daniel Stenberg
808cb31756
tool_writeout: add URL component variables
Output specific components from the used URL. The following variables
are added for this purpose:

  url.scheme, url.user, url.password, url.options, url.host, url.port,
  url.path, url.query, url.fragment, url.zoneid

Add the following for outputting parts of the "effective URL":

 urle.scheme, urle.user, urle.password, urle.options, urle.host, urle.port,
 urle.path, urle.query, urle.fragment, urle.zoneid

Added test 423 and 424 to verify.

Closes #10853
2023-04-04 14:42:44 +02:00
Ronan Pigott
8d9c1a8aa8
docs/cmdline-opts: document the dotless config path
The real xdg config path is $XDG_CONFIG_HOME/curlrc, without the dot.
The dotless name seems preferable, so let's match the documentation to
the behavior.

Closes #10849
2023-03-28 10:32:00 +02:00
Daniel Stenberg
5ddd5f2619
data.d: emphasize no conversion
When asking curl to send a POST, curl does not encode or change the data.

Ref: #10820
Closes #10823
2023-03-23 15:35:25 +01:00
Daniel Stenberg
13afb87268
page-footer: add explanation for three missing exit codes
Added in 7.73.0, 7.77.0 and 7.84.0

Closes #10630
2023-02-28 08:26:36 +01:00
積丹尼 Dan Jacobson
8d708e4cad
rate.c: single URLs make no sense in --rate example
Here somehow you need to put more than one URL in these examples, else
they will make no sense, as --rate only affects the second and beyond
URLs. The first URL will always finish the same time no matter what
--rate is given.

Closes #10638
2023-02-28 08:24:23 +01:00
Daniel Stenberg
ddff8ef706
gen.pl: add '%GLOBALS' as a variable for mainpage
And use it in page-header to list all global command line options.
2023-02-22 08:36:21 +01:00
Daniel Stenberg
86ec17b856
docs/cmdline-opts: mark all global options
gen.pl now outputs a generic explanations for them for each option

Fixes #10566
Reported-by: u20221022 on github
Closes #10584
2023-02-22 08:35:45 +01:00
Daniel Stenberg
bf54c9382f
remote-header-name.d: mention that filename* is not supported
and that you can use --clobber to allow overwriting.

Ref: #10533
Closes #10555

Co-authored-by: Jay Satiro <raysatiro@yahoo.com>
2023-02-19 00:11:22 +01:00
Daniel Stenberg
17153e173d
cmdline-opts/Makefile: on error, do not leave a partial
And support 'make V=1' to show the full command line

Closes #10497
2023-02-13 20:53:45 +01:00
Daniel Stenberg
daf4e6a3a1
curl.1: make help, version and manual sections "custom"
Instead of using "multi: boolean", as these are slightly special as in
they do are not enable/disable ones.

Fixes #10490
Reported-by: u20221022 on github
Closes #10497
2023-02-13 20:52:11 +01:00
Daniel Stenberg
33866a31c3
no-clobber.d: only use long form options in man page text
... since they are expanded and the short-form gets mentioned
automatically so if the short form is mentioned as well, it gets
repeated.

Fixes #10461
Closes #10462
Reported-by: Dan Fandrich
2023-02-09 23:38:44 +01:00
Daniel Stenberg
458b85be27
header.d: add a header file example
Closes #10455
2023-02-09 15:45:19 +01:00
John Bampton
0065b146eb
misc: fix spelling
Closes #10437
2023-02-08 08:30:05 +01:00
Martin D'Aloia
3cc9df1817
write-out.d: add 'since version' to %{header_json} documentation
The documentation of `%{header_json}` missed to mention since which
version this variable for `--write-out` is present.

Based on commit https://github.com/curl/curl/commit/4133a69f2daa476bb
we can determine from the tags were this commit is present that the
first version to include it was `7.83.0`.
This could be also checked with:
`git tag --contains 4133a69f2daa476bb6d902687f1dd6660ea9c3c5`

Closes #10395
2023-02-02 08:31:41 +01:00
Jay Satiro
cec47daa8c write-out.d: clarify Windows % symbol escaping
- Clarify that in Windows batch files the % must be escaped as %%, and
  at the command prompt it cannot be escaped which could lead to
  incorrect expansion.

Prior to this change the doc implied % must be escaped as %% in win32
always.

---

Examples showing how a write-out argument is received by curl:

If curl --write-out "%{http_code}" is executed in a batch file:
{http_code}

If curl --write-out "%%{http_code}" is executed in a batch file:
%{http_code}

If curl --write-out "%{http_code}" is executed from the command prompt:
%{http_code}

If curl --write-out "%%{http_code}" is executed from the command prompt:
%%{http_code}

At the command prompt something like "%{speed_download}%{http_code}"
would first be parsed by the command interpreter as %{speed_download}%
and would be expanded as environment variable {speed_download} if it
existed, though that's highly unlikely since Windows environment names
don't use braces.

---

Reported-by: Muhammad Hussein Ammari

Ref: https://github.com/bagder/everything-curl/pull/279

Fixes https://github.com/curl/curl/issues/10323
Closes https://github.com/curl/curl/pull/10337
2023-01-26 18:52:27 -05:00
Daniel Stenberg
13991d60ee
src: add --http3-only
Warning: --http3 and --http3-only are subject to change again (or be
removed) before HTTP/3 support goes non-experimental.

Closes #10264
2023-01-12 16:18:05 +01:00
Daniel Stenberg
5a9a5e171e
docs/cmdline-opts/hsts.d: explain hsts more
Closes #10258
2023-01-08 11:08:10 +01:00
Daniel Stenberg
b45b6b618d
setopt: move the SHA256 opt within #ifdef libssh2
Because only the libssh2 backend not supports it and thus this should
return error if this option is used other backends.

Reported-by: Harry Sintonen

Closes #10255
2023-01-07 23:01:52 +01:00
Daniel Stenberg
2bc1d775f5
copyright: update all copyright lines and remove year ranges
- they are mostly pointless in all major jurisdictions
- many big corporations and projects already don't use them
- saves us from pointless churn
- git keeps history for us
- the year range is kept in COPYING

checksrc is updated to allow non-year using copyright statements

Closes #10205
2023-01-03 09:19:21 +01:00
Daniel Stenberg
c6aa19c1da
writeout: add %{certs} and %{num_certs}
Let users get the server certificate chain using the command line

Closes #10019
2022-12-27 22:41:17 +01:00
John Bampton
80efd3bc61
misc: fix grammar and spelling
Closes #10137
2022-12-22 18:07:07 +01:00
Daniel Stenberg
ee583c68d4
docs: mention indirect effects of --insecure
Warn users that disabling certficate verification allows servers to
"pollute" curl with data it trusts.

Reported-by: Harry Sintonen
Closes #10126
2022-12-21 23:36:58 +01:00
Daniel Stenberg
66f4d50fa6
limit-rate.d: see also --rate 2022-12-16 10:31:13 +01:00
Daniel Stenberg
50750d097a
ssl-reqd.d: clarify that this is for upgrading connections only
Closes #10093
2022-12-15 14:36:37 +01:00
Emil Engler
845f020ea5
docs: extend the dump-header documentation
This commit extends the documentation of the --dump-header command-line
option to reflect the behavior introduced in 8b1e5df7.

See #10079
Closes #10085
2022-12-13 15:04:31 +01:00
Daniel Stenberg
e6b3725716
styled-output.d: this option does not work on Windows
Reported-by: u20221022 on github

Fixes #10082
Closes #10083
2022-12-12 09:07:32 +01:00
andy5995
fd2c9e5e83
page-header: grammar improvement (display transfer rate)
Closes #10068
2022-12-11 12:36:36 +01:00
Daniel Stenberg
f0b374f662
KNOWN_BUGS: remove items not considered bugs any more
- CURL_GLOBAL_SSL

This option was changed in libcurl 7.57.0 and clearly it has not caused
too many issues and a lot of time has passed.

- Store TLS context per transfer instead of per connection

This is a possible future optimization. One that is much less important
and interesting since the added support for CA caching.

- Microsoft telnet server

This bug was filed in May 2007 against curl 7.16.1 and we have not
received further reports.

- active FTP over a SOCKS

Actually, proxies in general is not working with active FTP mode. This
is now added in proxy documentation.

- DICT responses show the underlying protocol

curl still does this, but since this is now an established behavior
since forever we cannot change it easily and adding an option for it
seems crazy as this protocol is not so little its not worth it. Let's
just live with it.

- Secure Transport disabling hostname validation also disables SNI

This is an already documented restriction in Secure Transport.

- CURLOPT_SEEKFUNCTION not called with CURLFORM_STREAM

The curl_formadd() function is marked and documented as deprecated. No
point in collecting bugs for it. It should not be used further.

- STARTTRANSFER time is wrong for HTTP POSTs

After close source code inspection I cannot see how this is true or that
there is any special treatment for different HTTP methods. We also have
not received many further reports on this, making me strongly suspect
that this is no (longer an) issue.

- multipart formposts file name encoding

The once proposed RFC 5987-encoding is since RFC 7578 documented as MUST
NOT be used. The since then implemented MIME API allows the user to set
the name on their own and can thus provide it encoded as it wants.

- DoH is not used for all name resolves when enabled

It is questionable if users actually want to use DoH for interface and
FTP port name resolving. This restriction is now documented and we
advice users against using name resolving at all for these functions.

Closes #10043
2022-12-09 13:55:01 +01:00
Daniel Stenberg
3e33681eaf
KNOWN_BUGS: remove five FTP related issues
- "FTP with CONNECT and slow server"

I believe this is not a problem these days.

- "FTP with NULs in URL parts"

The FTP protocol does not support them properly anyway.

- remove "FTP and empty path parts in the URL"

I don't think this has ever been reported as a real problem but was only
a hypothetical one.

- "Premature transfer end but healthy control channel"

This is not a bug, this is an optimization that *could* be performed but is
not an actual problem.

- "FTP without or slow 220 response"

Instead add to the documentation of the connect timeout that the
connection is considered complete at TCP/TLS/QUIC layer.

Closes #9979
2022-11-26 12:33:58 +01:00
Daniel Stenberg
975efec61b
tool_operate: override the numeric locale and set "C" by force
Makes curl always use dot as decimal separator for options,
independently of what the locale says. Makes scripts and command lines
portable.

Updated docs accordingly.

Reported-by: Daniel Faust

Fixes #9969
Closes #9972
2022-11-25 08:32:23 +01:00
Daniel Stenberg
fb7cf93ba9
netrc.d: provide mutext info
Reported-by: xianghongai on github
Fixes #9899
Closes #9901
2022-11-14 10:06:01 +01:00
Daniel Stenberg
f20231a5f0
cmdline-opts/page-footer: remove long option nroff formatting
As gen.pl adds them
2022-11-14 10:04:58 +01:00
Daniel Stenberg
4154165e5e
cmdline-opts/gen.pl: fix the linkifier
Improved logic for finding existing --options in text and replacing with
the full version with nroff syntax. This also makes the web version link
options better.

Reported-by: xianghongai on github
Fixes #9899
Closes #9902
2022-11-14 10:04:31 +01:00
Daniel Stenberg
b6e1afd069
curl: add --url-query
This option adds a piece of data, usually a name + value pair, to the
end of the URL query part. The syntax is identical to that used for
--data-urlencode with one extension:

If the argument starts with a '+' (plus), the rest of the string is
provided as-is unencoded.

This allows users to "build" query parts with options and URL encoding
even when not doing GET requests, which the already provided option -G
(--get) is limited to.

This idea was born in a Twitter thread.

Closes #9691
2022-11-08 14:37:34 +01:00
Zespre Schmidt
c2fecfbf80
docs: add missing parameters for --retry flag
Closes #9848
2022-11-03 09:36:04 +01:00
Patrick Monnerat
3b9af11c77
gen.pl: do not generate CURLHELP bitmask lines > 79 characters
If a command line option is in many help categories, there is a risk
that CURLHELP bitmask source lines generated for listhelp are longer
than 79 characters.

This change takes care of folding such long lines.

Cloes #9834
2022-11-01 12:00:39 +01:00
Daniel Stenberg
d4fed2a13a
docs: explain the noproxy CIDR notation support
Follow-up to 1e9a538e05

Closes #9818
2022-10-28 09:02:22 +02:00
Daniel Stenberg
ef305de95c
cmdline/docs: add a required 'multi' keyword for each option
The keyword specifies how option works when specified multiple times:

 - single: the last provided value replaces the earlier ones
 - append: it supports being provided multiple times
 - boolean: on/off values
 - mutex: flag-like option that disable anoter flag

The 'gen.pl' script then outputs the proper and unified language for
each option's multi-use behavior in the generated man page.

The multi: header is requires in each .d file and will cause build error
if missing or set to an unknown value.

Closes #9759
2022-10-18 18:50:25 +02:00
Daniel Stenberg
66313cf4b3
header.d: add category smtp and imap
They were previously (erroneously) added manually to tool_listhelp.c
which would make them get removed again when the file is updated next
time, unless added correctly here in header.d

Follow-up to 2437fac01

Closes #9690
2022-10-11 08:13:27 +02:00
John Bampton
e80c4ff3d0
misc: fix spelling in docs and comments
also: remove outdated sentence

Closes #9644
2022-10-05 16:12:10 +02:00
Patrick Monnerat
2437fac013
lib: sanitize conditional exclusion around MIME
The introduction of CURL_DISABLE_MIME came with some additional bugs:
- Disabled MIME is compiled-in anyway if SMTP and/or IMAP is enabled.
- CURLOPT_MIMEPOST, CURLOPT_MIME_OPTIONS and CURLOPT_HTTPHEADER are
  conditioned on HTTP, although also needed for SMTP and IMAP MIME mail
  uploads.

In addition, the CURLOPT_HTTPHEADER and --header documentation does not
mention their use for MIME mail.

This commit fixes the problems above.

Closes #9610
2022-09-29 10:51:04 +02:00
Daniel Stenberg
fd1ce3d4b0
docs: spellfixes
Pointed by the new CI job
2022-09-21 15:20:08 +02:00
Patrick Monnerat
5261efaed8
docs: tell about disabled protocols in CURLOPT_*PROTOCOLS_STR.
Disabled protocols are now handled as if they were unknown.
Also update the possible protocol list.
2022-09-16 23:29:09 +02:00
Daniel Stenberg
79e404d039
curl: warn for --ssl use, considered insecure
Closes #9519
2022-09-16 21:27:20 +02:00
Daniel Stenberg
6698e6ca24
docs/WebSockets.md: docs 2022-09-09 15:11:13 +02:00
Daniel Stenberg
472f1cbe7e
NPN: remove support for and use of
Next Protocol Negotiation is a TLS extension that was created and used
for agreeing to use the SPDY protocol (the precursor to HTTP/2) for
HTTPS. In the early days of HTTP/2, before the spec was finalized and
shipped, the protocol could be enabled using this extension with some
servers.

curl supports the NPN extension with some TLS backends since then, with
a command line option `--npn` and in libcurl with
`CURLOPT_SSL_ENABLE_NPN`.

HTTP/2 proper is made to use the ALPN (Application-Layer Protocol
Negotiation) extension and the NPN extension has no purposes
anymore. The HTTP/2 spec was published in May 2015.

Today, use of NPN in the wild should be extremely rare and most likely
totally extinct. Chrome removed NPN support in Chrome 51, shipped in
June 2016. Removed in Firefox 53, April 2017.

Closes #9307
2022-09-05 07:39:02 +02:00
Jacob Tolar
74af81ca03
cert.d: clarify that escape character works for file paths
Closes #9349
2022-08-27 23:25:32 +02:00
Daniel Stenberg
fdbcd39488
docs/cmdline-opts: remove \& escapes from all .d files
gen.pl escapes them itself now
2022-08-23 13:43:10 +02:00
Daniel Stenberg
567693196a
docs/cmdline-opts/gen.pl: encode leading single and double quotes
As "(aq" and "(dq" to prevent them from implying a meaning in the nroff
output. This removes the need for using \& escapes in the .d files'
description parts.

Closes #9352
2022-08-23 13:43:10 +02:00
Emanuele Torre
2f0056680f
docs/cmdline-opts: fix example and categories for --form-escape
The example was missing a "--form" argument
I also replaced "--form" with "-F" to shorten the line a bit since it
was already very long.

And I also moved --form-escape from the "post" category to the "upload"
category (this is what I originally wanted to fix, before also noticing
the mistake in the example).

Closes #9298
2022-08-12 08:39:03 +02:00
Emil Engler
ce8031d369
docs: add dns category to --resolve
This commit adds the dns category to the --resolve command line option,
because it can be interpreted as both: a low-level connection option and
an option related to the resolving of a hostname.

It is also not common for dns options to belong to the connection
category and vice versa.  --ipv4 and --ipv6 are both good examples.

Closes #9229
2022-08-06 17:05:48 +02:00
Emil Engler
92179353e5 cmdline-opts/gen.pl: improve performance
On some systems, the gen.pl script takes nearly two minutes for the
generation of the main-page, which is a completely unacceptable time.

The slow performance has two causes:
1. Use of a regex locale operator
2. Useless invokations of loops

The commit addresses the first issue by replacing the "\W" wiht
[^a-zA-Z0-9_], which is, according to regex101.com, functionally
equivalent to the previous operation, except that it is obviously
limited to ASCII only, which is fine, as the curl project is
English-only anyway.

The second issue is being addressed by only running the loop if the line
contains a "--" in it. The loop may be completeley removed in the
future.

Co-authored-by: Emanuele Torre <torreemanuele6@gmail.com>

See #8299
Fixes #9230
Closes #9232
2022-08-02 17:10:03 +02:00
Daniel Stenberg
209ffd7d8e docs/cmdline: mark fail and fail-with-body as mutually exclusive
Reported-by: Andreas Sommer
Fixes #9221
Closes #9222
2022-08-02 17:08:21 +02:00
Daniel Stenberg
f7e14fee68
tool_getparam: make --doh-url "" switch it off
A possible future addition could be to parse the URL first too to verify
that it is valid before trying to use it.

Assisted-by: Jay Satiro
Closes #9207
2022-07-27 10:56:13 +02:00
Brad Forschinger
91824e2c4b
netrc.d: remove spurious quote
Closes #9111
2022-07-06 11:29:16 +02:00
Daniel Stenberg
1dda49a1d3
curl.h: CURLE_CONV_FAILED is obsoleted
The last use was removed in 7.82.0. Updated some docs too to reflect the
current error code situation.

Closes #9067
2022-06-29 16:03:02 +02:00
Daniel Stenberg
df45fd1794
docs/cmdline-opts: add copyright and license identifier to each file
gen.pl now insists on C: and SPDX-License-Identifier: fields to be
present in all files.

Closes #9002
2022-06-14 08:48:09 +02:00
max.mehl
ad9bc5976d
copyright: make repository REUSE compliant
Add licensing and copyright information for all files in this repository. This
either happens in the file itself as a comment header or in the file
`.reuse/dep5`.

This commit also adds a Github workflow to check pull requests and adapts
copyright.pl to the changes.

Closes #8869
2022-06-13 09:13:00 +02:00
Daniel Stenberg
cce50bd323
speed-limit/time.d: mention these affect transfers in either direction
Reported-by: Ladar Levison
Fixes #8948
Closes #8951
2022-06-02 15:40:09 +02:00
Daniel Stenberg
c6b2bc6db8
remote-name.d: mention --output-dir
plus add two see-alsos

Closes #8945
2022-06-01 08:11:16 +02:00
Daniel Stenberg
4d94fac9f0
headers api: remove EXPERIMENTAL tag
Closes #8900
2022-05-30 14:13:48 +02:00
Daniel Stenberg
f51ffdb35f
curl.1: add a few see also --tls-max
Closes #8929
2022-05-27 23:31:31 +02:00
Daniel Stenberg
8f48b5d783
curl: add --rate to set max request rate per time unit
--rate "12/m" - for 12 per minute or
--rate "5/h" - for 5 per hour

Removed from TODO

Closes #8671
2022-05-23 17:59:56 +02:00
Jay Satiro
64641d2170
max-time.d: clarify max-time sets max transfer time
Prior to this change the doc said --max-time set the maximum time of the
'whole operation' which is not accurate. The option maps to
CURLOPT_TIMEOUT_MS which sets maximum transfer time.

For example, the maximum time on a transfer is reset if the transfer is
retried (--retry).

Reported-by: Nuru@users.noreply.github.com

Fixes https://github.com/curl/curl/issues/8877
Closes #8879
2022-05-23 17:14:57 +02:00
Balakrishnan Balasubramanian
dfa84a0450
socks: support unix sockets for socks proxy
Usage:
  curl -x "socks5h://localhost/run/tor/socks" "https://example.com"

Updated runtests.pl to run a socksd server listening on unix socket

Added tests test1467 test1468

Added documentation for proxy command line option and socks proxy
options

Closes #8668
2022-05-19 15:35:03 +02:00
Daniel Stenberg
84052154f7
curl: deprecate --random-file and --egd-file
As libcurl no longer has any functionality for them, the tool now does
nothing with them.

Closes #8670
2022-05-17 11:06:07 +02:00
Daniel Stenberg
1ddc8aefb2
page-footer: mention exit code zero too
Success (zero) is also an "exit code" worth mentioning.

Closes #8833
2022-05-12 16:26:20 +02:00
Daniel Stenberg
c126299635
cookie.d: clarify when cookies are always sent 2022-04-25 13:05:47 +02:00
Daniel Stenberg
53399c72ff
gen.pl: change wording for mutexed options
Instead of saying "This option overrides NNN", now say "This option is
mutually exclusive to NNN" in the generated man page ouput, as the
option does not in all cases actually override the others but they are
always mutually exclusive.

Ref: #8704
Closes #8716
2022-04-17 11:21:16 +02:00
Daniel Stenberg
36e09dc302
fail.d: tweak the description
Reviewed-by: Daniel Gustafsson
Suggested-by: Robert Charles Muir
Ref: https://twitter.com/rcmuir/status/1514915401574010887

Closes #8714
2022-04-15 23:50:35 +02:00
Daniel Stenberg
4a8f6869db
English: use American spelling consistently
Authorization, Initialization, Organization etc.

Closes #8673
2022-04-05 14:55:47 +02:00
Daniel Stenberg
a3f4d7cee9
misc: spelling fixes
Mostly in comments but also in the -w documentation for headers_json.

Closes #8647
2022-03-30 10:49:06 +02:00
Daniel Stenberg
89e6129e5a
CURLOPT_PREQUOTE.3: only works for FTP file transfers, not dirs
Also add to quote.d. Add to TODO as something to add in a future.

Reported-by: anon00000000 on github
Closes #8602
Closes #8648
2022-03-29 18:15:44 +02:00
Daniel Stenberg
3a4182d468
docs: lots of minor language polish
Mostly based on recent language decisions from "everything curl":

- remove contractions (isn't => is not)
- *an* HTTP (consistency)
- runtime (no hyphen)
- backend (no hyphen)
- URL is uppercase

Closes #8646
2022-03-29 13:58:14 +02:00
Daniel Stenberg
e7793cb57b
curl/header_json: output the header names in lowercase
To better allow json[“header”].

Reported-by: Peter Korsgaard
Bug: https://daniel.haxx.se/blog/2022/03/24/easier-header-picking-with-curl/comment-page-1/#comment-25878
Closes #8633
2022-03-25 11:24:27 +01:00
Jay Satiro
cabcf403ed docs/opts: Mention Schannel client cert type is P12
Schannel backend code behaves same as Secure Transport, it expects a P12
certificate file or the name of a certificate already in the user's OS
key store. Also, both backends ignore CURLOPT_SSLKEY (tool: --key)
because they expect the private key to already be available from the
keystore or P12 certificate.

Ref: https://github.com/curl/curl/discussions/8581#discussioncomment-2337260

Closes https://github.com/curl/curl/pull/8587
2022-03-22 14:24:06 -04:00
Daniel Stenberg
160b640a8b
test1671: verify -w '%{header_json} 2022-03-22 08:24:25 +01:00
Daniel Stenberg
62b60ed1a0
test1670: verify -w %header{} 2022-03-22 08:24:25 +01:00
Daniel Stenberg
4133a69f2d
curl: add %{header_json} support in -w handling
Outputs all response headers as a JSON object.
2022-03-22 08:24:25 +01:00
Daniel Stenberg
2d45137e1e
curl: add %header{name} support in -w handling
Outputs the response header 'name'
2022-03-22 08:24:25 +01:00
Dan Fandrich
68b356a1b4 keepalive-time.d: It takes many probes to detect brokenness 2022-03-11 17:13:25 -08:00
HexTheDragon
1831a6e7f1
curl: add --no-clobber
Does not overwrite output files if they already exist

Closes #7708
Co-authored-by: Daniel Stenberg
2022-03-11 08:38:01 +01:00
Daniel Stenberg
0a142663a1
remove-on-error.d: typo
Reported-by: Colin Leroy
Bug: https://github.com/curl/curl/pull/8503#pullrequestreview-906520081
2022-03-10 22:56:11 +01:00
Daniel Stenberg
08a96c6e4e
curl: add --remove-on-error
If a transfer returns an error, using this option makes curl remove the
leftover downloded (partial) local file before exiting.

Added test 376 to verify

Closes #8503
2022-03-10 19:57:55 +01:00
Samuel Henrique
9bd1195150
json.d: fix typo (overriden -> overridden)
Closes #8557
2022-03-07 22:48:10 +01:00
Daniel Stenberg
3beb82b850
ipv4/6.d: clarify that they are about using IP addresses
... they may still *resolve* other families, but not use those
addresses.

Ref: #8530
Closes #8543
2022-03-06 23:32:40 +01:00
Jay Satiro
a6e9196724 config.d: Clarify _curlrc filename is still valid on Windows
Recent changes added support for filename .curlrc on Windows, and
when it's not found curl falls back on the original Windows filename
_curlrc. _curlrc was removed from the doc, however it is still valid.

Closes https://github.com/curl/curl/pull/8382
2022-02-04 03:46:26 -05:00
Daniel Stenberg
32160cae84
tool_getparam: initial --json support
Adds these test cases:

 383 - simple single command line option
 384 - reading it from stdin
 385 - getting two --json options on command line
 386 - --next works after --json

Closes #8314
2022-02-01 10:39:55 +01:00
Jay Satiro
50e74ca18a write-out.d: Fix num_headers formatting 2022-01-31 01:04:19 -05:00
Daniel Stenberg
cdb495f743
docs: document HTTP/2 not insisting on TLS 1.2
Both for --http2 and CURLOPT_HTTP_VERSION.

Reported-by: jhoyla on github
Fixes #8235
Closes #8300
2022-01-19 23:30:07 +01:00
Daniel Stenberg
fde0925214
cmdline-opts/gen.pl: fix option matching to improve references
Previously it could mistakenly match partial names when there are
options that start with the same prefix, leading to the wrong references
used.

Closes #8299
2022-01-19 13:29:28 +01:00
Patrick Monnerat
eeca818b1e
openldap: implement SASL authentication
As credentials can be quite different depending on the mechanism used,
there are no default mechanisms for LDAP and simple bind with a DN is
then used.

The caller has to provide mechanism(s) using CURLOPT_LOGIN_OPTIONS to
enable SASL authentication and disable simple bind.

Closes #8152
2022-01-11 11:17:27 +01:00
Daniel Stenberg
223f26c28a
mesalink: remove support
Mesalink has ceased development. We can no longer encourage use of it.
It seems to be continued under the name TabbySSL, but no attempts have
(yet) been to make curl support it.

Fixes #8188
Closes #8191
2022-01-10 11:27:59 +01:00
Daniel Stenberg
2a19ad473a
docs/cmdline-opts: add "mutexed" options for more http versions
Update four http version man page sections.

Closes #8254
2022-01-10 09:33:35 +01:00
Daniel Stenberg
a6f227252c
remote-header-name.d: clarify
- it strips off the path from the server provided name
- it saves in current directory or --output-dir

Ref: https://curl.se/mail/archive-2022-01/0032.html
Closes #8249
2022-01-09 16:04:05 +01:00
Daniel Stenberg
dbf83403e2
next.d. remove .fi/.nf as they are handled by gen.pl
Closes #8228
2022-01-05 22:44:59 +01:00
Daniel Stenberg
996221fc6c
gen.pl: terminate "example" sections better
If the example (section that is prefixed with spaces) ends the
description gen.pl would previously miss to output the terminating .fi

Closes #8228
2022-01-05 22:44:52 +01:00
Daniel Stenberg
7a92f865b4
misc: s/e-mail/email
Consistency is king. Following the lead in everything curl.

Closes #8159
2021-12-19 23:48:13 +01:00
Daniel Stenberg
e30b2064b7
docs: fix proselint nits
- remove a lot of exclamation marks
- use consistent spaces (1, not 2)
- use better words at some places

Closes #8123
2021-12-09 23:16:46 +01:00
Daniel Stenberg
8f2fb3cdbd
retry-all-errors.d: make the example complete
... as it needs --retry too to work
2021-12-07 10:10:51 +01:00
Patrick Monnerat
a40160aee8
openldap: implement STARTTLS
As this introduces use of CURLOPT_USE_SSL option for LDAP, also check
this option in ldap.c as it is not supported by this backend.

Closes #8065
2021-12-06 07:53:04 +01:00
Damien Walsh
172068b76f
request.d: refer to 'method' rather than 'command'
Closes #8094
2021-12-05 23:05:11 +01:00
Daniel Stenberg
6ad053060d
config.d: update documentation to match the path search
Assisted-by: Jay Satiro
2021-11-29 00:57:39 +01:00
Daniel Stenberg
76d6e719d9
docs: address proselint nits
- avoid exclamation marks
- use consistent number of spaces after periods: one
- avoid clichés
- avoid using 'very'

Closes #8060
2021-11-26 14:27:07 +01:00
Daniel Stenberg
c50edee022
insecure.d: detail its use for SFTP and SCP as well
Closes #8056
2021-11-25 22:31:15 +01:00
Daniel Stenberg
0164bb8507
page-footer: fix typo
Closes #8036
2021-11-19 18:11:13 +01:00
Daniel Stenberg
fa5c311904
page-footer: document more environment variables
... that curl might use.

Closes #8027
2021-11-17 11:05:07 +01:00
Daniel Stenberg
73412465a0
netrc.d: edit the .netrc example to look nicer
Works nicely thanks to d1828b470f

Closes #8025
2021-11-17 08:33:05 +01:00
Daniel Stenberg
2511a41bf9
docs/cmdline-opts: do not say "protocols: all"
Remove the lines saying "protocols: all". It makes the output in the
manpage look funny, and the expectation is probably by default that if
not anything is mentioned about protocols the option apply to them all.

Closes #8021
2021-11-15 23:11:55 +01:00
Daniel Stenberg
ddaa85893d
curl.1: require "see also" for every documented option
gen.pl now generates a warning if the "See Also" field is not filled in for a
command line option

All command line options now provide one or more related options. 167
"See alsos" added!

Closes #8019
2021-11-15 23:06:41 +01:00
Daniel Stenberg
f5f12331e5
insecure.d: expand and clarify
Closes #8017
2021-11-15 23:01:06 +01:00
Daniel Stenberg
d1828b470f
gen.pl: improve example output format
Treat consecutive lines that start with a space to be "examples". They
are output enclosed by .nf and .fi

Updated form.d to use this new fanciness

Closes #8016
2021-11-15 22:59:49 +01:00
Daniel Stenberg
3bf54f90f3
Revert "form-escape.d: double the back-slashes for proper man page output"
This reverts commit a2d8eac04a.

silly me, it was intended to be one backslash!
2021-11-15 11:37:37 +01:00
Daniel Stenberg
a2d8eac04a
form-escape.d: double the back-slashes for proper man page output 2021-11-15 11:36:58 +01:00
Daniel Stenberg
59617143cc
page-footer: add a mention of how to report bugs to the man page 2021-11-15 11:28:16 +01:00
Patrick Monnerat
b20b364764
mime: use percent-escaping for multipart form field and file names
Until now, form field and file names where escaped using the
backslash-escaping algorithm defined for multipart mails. This commit
replaces this with the percent-escaping method for URLs.

As this may introduce incompatibilities with server-side applications, a
new libcurl option CURLOPT_MIME_OPTIONS with bitmask
CURLMIMEOPT_FORMESCAPE is introduced to revert to legacy use of
backslash-escaping. This is controlled by new cli tool option
--form-escape.

New tests and documentation are provided for this feature.

Reported by: Ryan Sleevi
Fixes #7789
Closes #7805
2021-11-15 10:40:03 +01:00
Daniel Stenberg
f03778ffae
limit-rate.d: this is average over several seconds
Closes #7970
2021-11-08 09:44:13 +01:00
Daniel Stenberg
a28464ae77
docs: reduce/avoid English contractions
You're => You are
Hasn't => Has not
Doesn't => Does not
Don't => Do not
You'll => You will
etc

Closes #7930
2021-11-07 23:16:27 +01:00
Sergio Durigan Junior
a06ce29482
curl.1: fix typos in the manpage
s/transfering/transferring/
s/transfered/transferred/

Signed-off-by: Sergio Durigan Junior <sergiodj@sergiodj.net>
Closes #7937
2021-11-01 22:58:37 +01:00
Daniel Stenberg
92efb3db7e
docs: reduce use of "very"
"Very" should be avoided in most texts. If intensifiers are needed, try
find better words instead.

Closes #7936
2021-11-01 16:13:12 +01:00
Daniel Stenberg
90611af466
gen.pl: replace leading single quotes with \(aq
... and allow single quotes to be used "normally" in the .d files.

Makes the output curl.1 use better nroff.

Reported-by: Sergio Durigan Junior
Ref: #7928
Closes #7933
2021-11-01 15:37:10 +01:00
Daniel Stenberg
ffb634d4ef
tool_listhelp: easier to generate with gen.pl
tool_listhelp.c is now a separate file with only the command line --help
output, exactly as generated by gen.pl. This makes it easier to generate
updates according to what's in the docs/cmdline-opts docs.

  cd $srcroot/docs/cmdline-opts
  ./gen.pl listhelp *.d > $srcroot/src/tool_listhelp.c

With a configure build, this also works:

  make -C src listhelp

Closes #7787
2021-09-30 17:50:48 +02:00
Daniel Stenberg
0b2260b036
gen.pl: make the output date format work better
Follow-up to 15910dfd14

The previous strftime format used didn't work correctly on Windows, so
change to %B %d %Y which today looks like "September 29 2021".

Reported-by: Gisle Vanem
Bug: #7782
Closes #7793
2021-09-30 09:15:34 +02:00
Daniel Stenberg
ce6e3e5320
cmdline-opts: made the 'Added:' field mandatory
Since "too old" versions are no longer included in the generated man
page, this field is now mandatory so that it won't be forgotten and then
not included in the documentation.

Closes #7786
2021-09-28 16:20:12 +02:00
Daniel Stenberg
ebf18468c0
curl.1: remove mentions of really old version changes
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
2021-09-28 16:19:59 +02:00
Daniel Stenberg
15910dfd14
gen.pl: insert the current date and version in generated man page
Reported-by: Gisle Vanem
Ref: #7780
Closes #7782
2021-09-27 22:35:48 +02:00
Mats Lindestam
d1e7d9197b
libssh2: add SHA256 fingerprint support
Added support for SHA256 fingerprint in command line curl and in
libcurl.

Closes #7646
2021-09-26 23:20:53 +02:00
Daniel Stenberg
dbe693e769
write-out.d: clarify size_download/upload
They show the number of "body" bytes transfered.
Fixes #7702
Closes #7706
2021-09-12 12:33:02 +02:00
Daniel Stenberg
3c40840ca7
docs: remove experimental mentions from HSTS and MQTT
Reported-by: Jonathan Cardoso
Bug: https://github.com/curl/curl/pull/6700#issuecomment-913792863
Closes #7681
2021-09-07 08:21:40 +02:00
Jay Satiro
c1f7a7b525 config.d: note that curlrc is used even when --config
Bug: https://github.com/curl/curl/pull/7666#issuecomment-912214751
Reported-by: Viktor Szakats

Closes https://github.com/curl/curl/pull/7667
2021-09-05 02:34:14 -04:00
Daniel Stenberg
c8210ef06d
get.d: provide more useful examples
Closes #7668
2021-09-04 00:16:53 +02:00
Daniel Stenberg
d02d8d93ff
page-header: add GOPHERS, simplify wording in the 1st para
Closes #7665
2021-09-03 08:39:48 +02:00
Daniel Stenberg
68784d73c3
curl.1: provide examples for each option
The file format for each option now features a "Example:" header that
can provide one or more examples that get rendered appropriately in the
output. All options MUST have at least one example or gen.pl complains
at build-time.

This fix also does a few other minor format and consistency cleanups.

Closes #7654
2021-09-01 14:02:43 +02:00
Daniel Stenberg
46d4373ea7
setopt: enable CURLOPT_IGNORE_CONTENT_LENGTH for hyper
Since this option is also used for FTP, it needs to work to set for
applications even if hyper doesn't support it for HTTP. Verified by test
1137.

Updated docs to specify that the option doesn't work for HTTP when using
the hyper backend.

Closes #7614
2021-08-23 11:23:17 +02:00
Daniel Stenberg
4e53b9430c
man pages: remove trailing whitespaces
Extended test 1173 (via the manpage-syntax.pl script) to detect and warn
for them.

Ref: #7602
Reported-by: a1346054 on github
Closes #7604
2021-08-21 16:44:03 +02:00
Daniel Stenberg
75d379a46f
config.d: escape the backslash properly
Closes #7603
2021-08-21 15:49:37 +02:00
Barry Pollard
2cd1dbc72c
output.d: add method to suppress response bodies
Closes #7560
2021-08-12 14:47:33 +02:00
Daniel Stenberg
a2e29f0731
happy-eyeballs-timeout-ms.d: polish the wording
Reported-by: Josh Soref
Fixes #7433
Closes #7542
2021-08-08 22:41:32 +02:00
Daniel Stenberg
94bd01310b
compressed.d: it's a request, not an order
Clarified

Reported-by: Dan Jacobson
Reviewed-by: Daniel Gustafsson
Fixes #7516
Closes #7517
2021-07-30 12:59:33 +02:00
Daniel Stenberg
9f488fac18
curl.1: mention "global" flags
Mention options that are "global". A global command line option is one
that doesn't get reset at --next uses and therefore don't need to be
used again.

Reported-by: Josh Soref

Fixes #7457
Closes #7510
2021-07-28 22:53:20 +02:00
Josh Soref
4d145346ae docs: fix grammar
Fixes https://github.com/curl/curl/issues/7444
Fixes https://github.com/curl/curl/issues/7451
Fixes https://github.com/curl/curl/issues/7465
Closes https://github.com/curl/curl/pull/7495
2021-07-27 13:44:30 -04:00
Jay Satiro
2a4bf88699 mail-rcpt.d: fix grammar
Remove confusing sentence that says to specify an e-mail address for
mail transfer, since that's implied.

Reported-by: Josh Soref

Fixes https://github.com/curl/curl/issues/7452
Closes https://github.com/curl/curl/pull/7495
2021-07-27 13:43:44 -04:00
Josh Soref
b045a7d77c
limit-rate.d: clarify base unit
Fixes #7439
Closes #7494
2021-07-26 16:03:27 +02:00
Jay Satiro
9a6f974881 docs: change max-filesize caveat again
- Add protocols field to max-filesize.d.

- Revert wording on unknown file size caveat and do not discuss specific
  protocols in that section.

Partial revert of ecf0225. All max-filesize options now have the list of
protocols and it's clearer just to have that list without discussing
specific protocols in the caveat.

Reported-by: Josh Soref

Ref: https://github.com/curl/curl/issues/7453#issuecomment-884128762
2021-07-23 02:56:52 -04:00
Jay Satiro
ecf0225461 docs: mention max-filesize options also apply to MQTT transfers
Also make it clearer that the caveat 'if the file size is unknown it
the option will have no effect' may apply to protocols other than FTP
and HTTP.

Reported-by: Josh Soref

Fixes https://github.com/curl/curl/issues/7453
2021-07-21 01:03:06 -04:00
Josh Soref
9bd629bfad docs/cmdline: fix grammar and typos 2021-07-20 15:18:37 -04:00
Josh Soref
df41598f3c dump-header.d: Drop suggestion to use for cookie storage
Since --cookie-jar is the preferred way to store cookies, no longer
suggest using --dump-header to do so.

Co-authored-by: Daniel Stenberg

Closes https://github.com/curl/curl/issues/7414
2021-07-20 14:59:15 -04:00
Josh Soref
f6401b26c8 doc/cmdline: fix grammar and typos
Closes https://github.com/curl/curl/pull/7454
Closes https://github.com/curl/curl/pull/7455
Closes https://github.com/curl/curl/pull/7456
Closes https://github.com/curl/curl/pull/7459
Closes https://github.com/curl/curl/pull/7460
Closes https://github.com/curl/curl/pull/7461
Closes https://github.com/curl/curl/pull/7462
Closes https://github.com/curl/curl/pull/7463
2021-07-20 11:23:36 -04:00
Josh Soref
95434681bf docs/cmdline: fix grammar and typos
Closes https://github.com/curl/curl/pull/7432
Closes https://github.com/curl/curl/pull/7436
Closes https://github.com/curl/curl/pull/7438
Closes https://github.com/curl/curl/pull/7440
Closes https://github.com/curl/curl/pull/7445
2021-07-20 02:12:32 -04:00
Josh Soref
26ba98807f delegation.d: mention what happens when used multiple times
Closes https://github.com/curl/curl/pull/7408
2021-07-20 02:01:33 -04:00
Josh Soref
4ccb5e84d5 create-file-mode.d: mention what happens when used multiple times
Closes https://github.com/curl/curl/pull/7407
2021-07-20 01:59:52 -04:00
Josh Soref
5a90c77cb6 config.d: split comments and option-per line
Closes https://github.com/curl/curl/pull/7405
2021-07-20 01:57:23 -04:00
Josh Soref
f538bc5a40 docs: spell out directories instead of dirs in create-dirs
Write out directories rather than using the dirs abbrevation. Also
use plural form consistently, even if the code in the end might just
create a single directory.

Closes #7406
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2021-07-18 22:21:33 +02:00
Josh Soref
85f54a150d
docs/cmdline: mention what happens when used multiple times
For --dns-ipv4-addr, --dns-ipv6-addr and --dns-servers

Closes #7410
Closes #7411
Closes #7412
2021-07-18 18:44:26 +02:00
Daniel Stenberg
d896184c9b
disable-epsv.d: remove duplicate "(FTP)"
... since the tooling adds that to the output based on the "Protocols:"
tag.
2021-07-18 18:28:40 +02:00
Max Zettlmeißl
eaab3f084a
docs: make the documentation for --etag-save match the program behaviour
When using curl with the option `--etag-save` I expected it to save the
ETag without its surrounding quotes, as stated by the documentation in
the repository and by the generated man pages.

My first endeavour was to fix the program, but while investigating the
history of the relevant parts, I discovered that curl once saved the
ETag without the quotes.  This was undone by Daniel Stenberg in commit
`98c94596f5928840177b6bd3c7b0f0dd03a431af`, therefore I decided that in
this case the documentation should be adjusted to match the behaviour of
curl.

The changed save behaviour also made parts of the `--etag-compare`
documentation wrong or superfluous, so I adjusted those accordingly.

Closes #7429
2021-07-18 18:24:05 +02:00
Josh Soref
069dd3d271
write-out.d: add missing periods
Closes #7404
2021-07-18 00:03:37 +02:00
Josh Soref
de1004eb0f
cleanup: spell DoH with a lowercase o
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Closes #7413
2021-07-16 23:53:13 +02:00
Josh Soref
04ce9e853c
form.d: add examples of ,/; for file[name]
Fixes #7415
Closes #7417
2021-07-16 23:48:23 +02:00
Борис Верховский
60dc3d1a5b docs: document missing arguments to commands
This is a followup to commit f410b9e538 fixing a few
more commands which takes arguments.

Closes #7382
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2021-07-13 23:49:35 +02:00
Борис Верховский
f410b9e538 tool_help: Document that --tlspassword takes a password
Closes #7378
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2021-07-12 23:22:19 +02:00
Jay Satiro
5d3c409098 write-out.d: Clarify urlnum is not unique for de-globbed URLs
Reported-by: Коваленко Анатолий Викторович

Fixes https://github.com/curl/curl/issues/7342
Closes https://github.com/curl/curl/pull/7369
2021-07-10 01:18:20 -04:00
Jay Satiro
2b311d369d proto.d: fix formatting for paragraphs after margin changes
Closes https://github.com/curl/curl/pull/7341
2021-07-05 02:55:36 -04:00
Jay Satiro
d352a1bb2b pinnedpubkey.d: fix formatting for version support lists
Closes https://github.com/curl/curl/pull/7340
2021-07-05 02:54:54 -04:00
Daniel Stenberg
7020be7d85
--socks4[a]: clarify where the host name is resolved
Closes #7273
2021-06-17 23:07:39 +02:00
Daniel Stenberg
265b14d6b3
metalink: remove
Warning: this will make existing curl command lines that use metalink to
stop working.

Reasons for removal:

1. We've found several security problems and issues involving the
   metalink support in curl. The issues are not detailed here. When
   working on those, it become apparent to the team that several of the
   problems are due to the system design, metalink library API and what
   the metalink RFC says. They are very hard to fix on the curl side
   only.

2. The metalink usage with curl was only very briefly documented and was
   not following the "normal" curl usage pattern in several ways, making
   it surprising and non-intuitive which could lead to further security
   issues.

3. The metalink library was last updated 6 years ago and wasn't so
   active the years before that either. An unmaintained library means
   there's a security problem waiting to happen. This is probably reason
   enough.

4. Metalink requires an XML parsing library, which is complex code (even
   the smaller alternatives) and to this day often gets security
   updates.

5. Metalink is not a widely used curl feature. In the 2020 curl user
   survey, only 1.4% of the responders said that they'd are using it. In
   2021 that number was 1.2%. Searching the web also show very few
   traces of it being used, even with other tools.

6. The torrent format and associated technology clearly won for
   downloading large files from multiple sources in parallel.

Cloes #7176
2021-06-07 08:14:25 +02:00
Daniel Stenberg
628ebd82b9
test269: disable for hyper
--ignore-content-length / CURLOPT_IGNORE_CONTENT_LENGTH doesn't work
with hyper.

Closes #7184
2021-06-03 23:11:11 +02:00
Viktor Szakats
3976dd67a2
docs: use --max-redirs instead of --max-redir
For consistency.

Closes #7130
2021-05-26 14:49:52 +02:00
Daniel Stenberg
5dfa4c08bb
docs: cookies from HTTP headers need domain set
... or the cookies won't get sent. Push users to using the "Netscape"
format instead, which curl uses when saving a cookie "jar".

Reported-by: Martin Dorey
Reviewed-by: Daniel Gustafsson
Fixes #6723
Closes #7077
2021-05-17 10:57:03 +02:00
Lucas Servén Marín
b08863822c docs: fix typo in fail-with-body doc
This commit fixes a small typo in the documentation for the
--fail-with-body flag.

Closes https://github.com/curl/curl/pull/6977
2021-04-27 15:11:08 -04:00
Jay Satiro
54e7475016 schannel: Disable auto credentials; add an option to enable it
- Disable auto credentials by default. This is a breaking change
  for clients that are using it, wittingly or not.

- New libcurl ssl option value CURLSSLOPT_AUTO_CLIENT_CERT tells libcurl
  to automatically locate and use a client certificate for
  authentication, when requested by the server.

- New curl tool options --ssl-auto-client-cert and
  --proxy-ssl-auto-client-cert map to CURLSSLOPT_AUTO_CLIENT_CERT.

This option is only supported for Schannel (the native Windows SSL
library). Prior to this change Schannel would, with no notification to
the client, attempt to locate a client certificate and send it to the
server, when requested by the server. Since the server can request any
certificate that supports client authentication in the OS certificate
store it could be a privacy violation and unexpected.

Fixes https://github.com/curl/curl/issues/2262
Reported-by: Jeroen Ooms
Assisted-by: Wes Hinsley
Assisted-by: Rich FitzJohn

Ref: https://curl.se/mail/lib-2021-02/0066.html
Reported-by: Morten Minde Neergaard

Closes https://github.com/curl/curl/pull/6673
2021-04-22 16:53:37 -04:00
Daniel Stenberg
cf65d4237e
curl: ignore options asking for SSLv2 or SSLv3
Instead output a warning about it and continue with the defaults.

These SSL versions are typically not supported by the TLS libraries since a
long time back already since they are inherently insecure and broken. Asking
for them to be used will just cause an error to be returned slightly later.

In the unlikely event that a user's TLS library actually still supports these
protocol versions, this change might make the request a little less insecure.

Closes #6772
2021-04-19 08:14:05 +02:00
Daniel Stenberg
d7f737dd13
docs: make gen.pl support *italic* and **bold**
Remove some nroffisms from the cmdline doc files to simplify editing,
and instead support this markdown style.

Closes #6771
2021-03-22 16:50:58 +01:00
Jay Satiro
2d04286793 docs: Add SSL backend names to CURL_SSL_BACKEND
- Document the names that can be used with CURL_SSL_BACKEND:
  bearssl, gnutls, gskit, mbedtls, mesalink, nss, openssl, rustls,
  schannel, secure-transport, wolfssl

Ref: https://github.com/curl/curl/issues/2209#issuecomment-360623286
Ref: https://github.com/curl/curl/issues/6717#issuecomment-800745201

Closes https://github.com/curl/curl/pull/6755
2021-03-17 18:15:10 -04:00
Jay Satiro
8a4ef73c8f docs: Explain DOH transfers inherit some SSL settings
- Document in DOH that some SSL settings are inherited but DOH hostname
  and peer verification are not and are controlled separately.

- Document that CURLOPT_SSL_CTX_FUNCTION is inherited by DOH handles but
  we're considering changing behavior to no longer inherit it. Request
  feedback.

Closes https://github.com/curl/curl/pull/6688
2021-03-17 18:12:45 -04:00
Daniel Stenberg
f83d4ea56e
gen.pl: quote "bare" minuses in the nroff curl.1
Reported-by: Alejandro Colomar
Fixes #6698
Closes #6722
2021-03-14 23:44:43 +01:00
Jay Satiro
21445a76df retry.d: Clarify transient 5xx HTTP response codes
- Clarify the only 5xx response codes that are treated as transient are
  500, 502, 503 and 504.

Prior to this change it said it treated all 5xx as transient, but the
code says otherwise.

Ref: https://github.com/curl/curl/blob/curl-7_75_0/src/tool_operate.c#L462-L495

Closes https://github.com/curl/curl/pull/6724
2021-03-12 03:16:22 -05:00
Jay Satiro
cf9d16b98c retry-all-errors.d: Explain curl errors versus HTTP response errors
- Add a paragraph explaining that curl does not consider HTTP response
  errors as curl errors, and how that behavior can be modified by using
  --retry and --fail.

The --retry-all-errors doc says "Retry on any error" which some users
may find misleading without the added explanation.

Ref: https://curl.se/docs/faq.html#Why_do_I_get_downloaded_data_eve
Ref: https://curl.se/docs/faq.html#curl_doesn_t_return_error_for_HT

Reported-by: Lawrence Gripper

Fixes https://github.com/curl/curl/issues/6712
Closes https://github.com/curl/curl/pull/6720
2021-03-12 03:15:48 -05:00
Jay Satiro
bde786b5d1 version.d: Add missing features to the features list
- Add missing entries for gsasl, Kerberos, NTLM_WB, TrackMemory,
  Unicode and zstd.

- Remove krb4 since it's no longer a feature.

Reported-by: Ádler Jonas Gross

Fixes https://github.com/curl/curl/issues/6677
Closes https://github.com/curl/curl/pull/6687
2021-03-04 18:07:06 -05:00
Vladimir Varlamov
e1655b2477 docs: add missing Arg tag to --stderr
Prior to this change the required argument was not shown.

curl.1 before: --stderr
curl.1 after: --stderr <file>

curl --help before:
     --stderr        Where to redirect stderr

curl --help after:
     --stderr <file>  Where to redirect stderr

Closes https://github.com/curl/curl/pull/6692
2021-03-04 18:01:55 -05:00
Daniel Gustafsson
82c583dcf0 cookies: Support multiple -b parameters
Previously only a single -b cookie parameter was supported with the last
one winning.  This adds support for supplying multiple -b params to have
them serialized semicolon separated.  Both cookiefiles and cookies can be
entered multiple times.

Closes #6649
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2021-02-25 18:12:28 +01:00
Viktor Szakats
44872aefc2
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
2021-02-19 13:57:19 +00:00
Jay Satiro
53022e1893 doh: add options to disable ssl verification
- New libcurl options CURLOPT_DOH_SSL_VERIFYHOST,
  CURLOPT_DOH_SSL_VERIFYPEER and CURLOPT_DOH_SSL_VERIFYSTATUS do the
  same as their respective counterparts.

- New curl tool options --doh-insecure and --doh-cert-status do the same
  as their respective counterparts.

Prior to this change DOH SSL certificate verification settings for
verifyhost and verifypeer were supposed to be inherited respectively
from CURLOPT_SSL_VERIFYHOST and CURLOPT_SSL_VERIFYPEER, but due to a bug
were not. As a result DOH verification remained at the default, ie
enabled, and it was not possible to disable. This commit changes
behavior so that the DOH verification settings are independent and not
inherited.

Ref: https://github.com/curl/curl/pull/4579#issuecomment-554723676

Fixes https://github.com/curl/curl/issues/4578
Closes https://github.com/curl/curl/pull/6597
2021-02-14 18:20:48 -05:00
Viktor Szakats
acd90af51f
docs/Makefile.inc: format to be update-friendly
- one source file per line
- convert tabs to spaces
- do not align line-continuation backslashes
- sort source files alphabetically

Reviewed-by: Daniel Stenberg
Closes #6593
2021-02-11 16:12:12 +00:00
Daniel Stenberg
8a964cb217
curl: add --fail-with-body
Prevent both --fail and --fail-with-body on the same command line.

Verify with test 349, 360 and 361.

Closes #6449
2021-02-11 08:35:27 +01:00
Jay Satiro
41863a94b5 create-file-mode.d: add missing Arg tag
Prior to this change the required argument was not shown.

curl.1 before: --create-file-mode
curl.1 after: --create-file-mode <mode>

Reported-by: ZimCodes@users.noreply.github.com

Fixes https://github.com/curl/curl/issues/6590
2021-02-10 13:57:40 -05:00
Jay Satiro
65ca229461 tool_writeout: refactor write-out and write-out json
- Deduplicate the logic used by write-out and write-out json.

Rather than have separate writeLong, writeString, etc, logic for
each of write-out and write-out json instead have respective shared
functions that can output either format and a 'use_json' parameter to
indicate whether it is json that is output.

This will make it easier to maintain. Rather than have to go through
two sets of logic now we only have to go through one.

- Support write-out %{errormsg} and %{exitcode} in json.

- Clarify in the doc that %{exitcode} is the exit code of the transfer.

Prior to this change it just said "The numerical exitcode" which
implies it's the exit code of the tool, and it's not necessarily that.

Closes https://github.com/curl/curl/pull/6544
2021-02-09 02:48:27 -05:00
nimaje
373c9155a0 docs: fix FILE example url in --metalink documentation
In a url after <scheme>:// follows the possibly empty authority part
till the next /, so that url missed a /.

Closes #6573
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2021-02-05 13:34:12 +01:00
Dmitry Wagin
796ce293de
http: improve AWS HTTP v4 Signature auth
- Add support services without region and service prefixes in
the URL endpoint (ex. Min.IO, GCP, Yandex Cloud, Mail.Ru Cloud Solutions, etc)
by providing region and service parameters via aws-sigv4 option.
- Add [:region[:service]] suffix to aws-sigv4 option;
- Fix memory allocation errors.
- Refactor memory management.
- Use Curl_http_method instead() STRING_CUSTOMREQUEST.
- Refactor canonical headers generating.
- Remove repeated sha256_to_hex() usage.
- Add some docs fixes.
- Add some codestyle fixes.
- Add overloaded strndup() for debug - curl_dbg_strndup().
- Update tests.

Closes #6524
2021-01-30 23:48:22 +01:00
Daniel Stenberg
33993d45fe
gen.pl: fix perl syntax
Follow-up to 324cf1d2e
2021-01-12 08:12:41 +01:00
Emil Engler
324cf1d2ee
docs: fix line length bug in gen.pl
The script warns if the length of $opt and $desc is > 78. However, these
two variables are on totally separate lines so the check makes no sense.
Also the $bitmask field is totally forgotten. Currently this leads to
two warnings within `--resolve` and `--aws-sigv4`.

Closes #6438
2021-01-12 08:06:54 +01:00
Emil Engler
efa5b16d38
docs: fix wrong documentation in help.d
curl does not list all categories when you invoke "--help" without any
parameters.

Closes #6436
2021-01-12 00:08:55 +01:00
Daniel Stenberg
90aad9cb1f
aws-sigv4.d: polish the wording
Make it shorter and imperative form

Closes #6439
2021-01-12 00:07:52 +01:00
Emil Engler
725ec470e2
language: s/behaviour/behavior/g
We currently use both spellings the british "behaviour" and the american
"behavior". However "behavior" is more used in the project so I think
it's worth dropping the british name.

Closes #6395
2021-01-02 23:35:59 +01:00
Daniel Stenberg
aa71750687
cmdline-opts/retry.d: mention response code 429 as well
Reported-by: Cherish98
Bug: https://curl.se/mail/archive-2020-12/0018.html
2021-01-02 11:51:55 +01:00
Paul Groke
8324dc8b1a
dns: extend CURLOPT_RESOLVE syntax for adding non-permanent entries
Extend the syntax of CURLOPT_RESOLVE strings: allow using a '+' prefix
(similar to the existing '-' prefix for removing entries) to add
DNS cache entries that will time out just like entries that are added
by libcurl itself.

Append " (non-permanent)" to info log message in case a non-permanent
entry is added.

Adjust relevant comments to reflect the new behavior.

Adjust documentation.

Extend unit1607 to test the new functionality.

Closes #6294
2020-12-29 17:49:36 +01:00