Commit Graph

410 Commits

Author SHA1 Message Date
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