Commit Graph

27447 Commits

Author SHA1 Message Date
Nyholm 8749ce651f docs: correct spelling errors and a broken link
Update grammar and spelling in docs and source code comments.

Closes: #7427
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2021-07-18 21:14:36 +02:00
Marc Hoersken 2c2b26145f
CI/cirrus: install impacket from PyPI instead of FreeBSD packages
Availability of impacket as FreeBSD package is too flaky.

Stick to legacy version of cryptography which still
supports OpenSSL version 1.0.2 due to FreeBSD 11.

Reviewed-by: Daniel Stenberg

Closes #7418
2021-07-18 19:42:47 +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
MAntoniak 9a47d77126
lib: fix compiler warnings with CURL_DISABLE_NETRC
warning C4189: 'netrc_user_changed': local variable is initialized but
not referenced

warning C4189: 'netrc_passwd_changed': local variable is initialized but
not referenced

Closes #7423
2021-07-18 18:37:05 +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
Josie Huddleston c12ad2d4e8
easy: during upkeep, attach Curl_easy to connections in the cache
During the protocol-specific parts of connection upkeep, some code
assumes that the data->conn pointer already is set correctly.  However,
there's currently no guarantee of that in the code.

This fix temporarily attaches each connection to the Curl_easy object
before performing the protocol-specific connection check on it, in a
similar manner to the connection checking in extract_if_dead().

Fixes #7386
Closes #7387
Reported-by: Josie Huddleston
2021-07-17 23:43:55 +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 b463c10950
TheArtOfHttpScripting: polish
- add missing backticks and comma

- fix proxy description:

* example proxy isn't local
* locally doesn't really make sense

Closes #7416
2021-07-16 23:51:17 +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
MAntoniak d84fb30681
mbedtls: Remove unnecessary include
- curl_setup.h: all references to mbedtls_md4* functions and structures
  are in the md4.c. This file already includes the <mbedtls/md4.h> file
  along with the file existence control (defined (MBEDTLS_MD4_C))

- curl_ntlm_core.c: unnecessary include - repeated below

Closes #7419
2021-07-16 23:45:50 +02:00
Daniel Stenberg 30f9ce2301
RELEASE-NOTES: synced 2021-07-16 23:27:49 +02:00
User Sg 6a66f72829 multi: fix crash in curl_multi_wait / curl_multi_poll
Appears to have been caused by 51c0ebc (precedes 7.77.0) which added a
VALID_SOCK check to one of the loops through the sockets but not the
other.

Reported-by: sylgal@users.noreply.github.com
Authored-by: sylgal@users.noreply.github.com

Fixes https://github.com/curl/curl/issues/7379
Closes https://github.com/curl/curl/pull/7389
2021-07-16 14:17:47 -04:00
Daniel Gustafsson b45d6e2c6a tool_help: remove unused define
The PRINT_LINES_PAUSE macro is no longer used, and has been mostly
cleaned out but one occurrence remained.

Closes https://github.com/curl/curl/pull/7380
2021-07-16 14:01:22 -04:00
Sergey Markelov e919848ead build: fix compiler warnings when CURL_DISABLE_VERBOSE_STRINGS
fix compiler warnings about unused variables and parameters when
built with --disable-verbose.

Closes https://github.com/curl/curl/pull/7377
2021-07-16 13:55:52 -04:00
Andrea Pappacoda af1ee130f8 build: fix IoctlSocket FIONBIO check
Prior to this change HAVE_IOCTLSOCKET_CAMEL_FIONBIO mistakenly checked
for (lowercase) ioctlsocket when it should have checked for IoctlSocket.

Closes https://github.com/curl/curl/pull/7375
2021-07-16 13:37:05 -04:00
t.artikov 29c7cf79e8 configure: fix nghttp2 library name for static builds
Don't hardcode the nghttp2 library name,
because it can vary, be "nghttp2_static" for example.

Fixes https://github.com/curl/curl/issues/7367
Closes https://github.com/curl/curl/pull/7368
2021-07-16 13:34:39 -04:00
Gisle Vanem bc035f5c9d [PellesC] fix _lseeki64() macro 2021-07-16 07:32:06 +02:00
Gisle Vanem c6fd7cbf10 [SChannel] Use '_tcsncmp()' instead
Revert previous change for PellesC. 

Instead replace all use of `_tcsnccmp()` with `_tcsncmp()`.
2021-07-16 07:30:35 +02:00
Gisle Vanem 3cd9a23e80 [PellesC] missing '_tcsnccmp'
PellesC compiler does not have this macro in it's `<tchar.h>`
2021-07-16 07:30:35 +02:00
Daniel Gustafsson 6c293cfcf0 TODO: add mention of mbedTLS 3 incompatibilities
Wyatt OʼDay reported in #7385 that mbedTLS isn't backwards compatible
and curl no longer builds with it. Document the need to fix our support
until so has been done.

Closes #7390
Fixes #7385
Reported-by: Wyatt OʼDay
Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
2021-07-14 23:54:43 +02:00
Daniel Gustafsson 21ef78b556 docs: fix inconsistencies in EGDSOCKET documentation
Only the OpenSSL backend actually use the EGDSOCKET, and also use
TLS consistently rather than mixing SSL and TLS. While there, also
fix a minor spelling nit.

Closes: #7391
Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
2021-07-14 23:47:37 +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
Randolf J 0d9de0a09f docs: fix incorrect argument name reference
The documentation for the read callback was erroneously referencing
the nitems argument by nmemb.  The error was introduced in commit
ce0881edee.

Closes #7383
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2021-07-13 22:04:05 +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
Daniel Gustafsson 02dfce1837 scripts: Fix typo in release-notes instructions
The command to run had a typo in the pathname which prevented copy
pasting it to work, which has annoyed me enough to fix this now.
2021-07-10 22:36:26 +02:00
Daniel Gustafsson 2053c00dd5 RELEASE-NOTES: synced 2021-07-10 22:34:55 +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
William Desportes 4e5a91b6aa docs: Fix typos
Closes: #7370
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2021-07-03 22:11:26 +02:00
Jonathan Wernberg 9bf79d0a5a
Revert "ftp: Expression 'ftpc->wait_data_conn' is always false"
The reverted commit introduced a logic error in code that was
correct.

The client using libcurl would notice the error since FTP file
uploads in active transfer mode would somtimes complete with
success despite no transfer having been performed and the
"uploaded" file thus not being on the remote server afterwards.

The FTP server would notice the error because it receives a
RST on the data connection it has established with the client
before any data was transferred at all.

The logic error happens if the STOR response from the server have
arrived by the time ftp_multi_statemach() in the affected code path
is called, but the incoming data connection have not arrived yet.
In that case, the processing of the STOR response will cause
'ftpc->wait_data_conn' to be set to TRUE, contradicting the comment
in the code. Since 'complete' will also be set, later logic would
believe the transfer was done.

In most cases, the STOR response will not have arrived yet when
the affected code path is executed, or the incoming connection will
also have arrived, and thus the error would not express itself.
But if the speed difference of the device using libcurl and the
FTP server is exactly right, the error may happen as often as in
one out of hundred file transfers.

This reverts commit 49f3117a23.

Bug: https://curl.se/mail/lib-2021-07/0025.html
Closes #7362
2021-07-08 10:18:25 +02:00
Daniel Stenberg 9053dbbf62
msnprintf: return number of printed characters excluding null byte
... even when the output is "capped" by the maximum length argument.

Clarified in the docs.

Closes #7361
2021-07-08 10:05:39 +02:00
Daniel Stenberg e7416cfd2b
infof: remove newline from format strings, always append it
- the data needs to be "line-based" anyway since it's also passed to the
  debug callback/application

- it makes infof() work like failf() and consistency is good

- there's an assert that triggers on newlines in the format string

- Also removes a few instances of "..."

- Removes the code that would append "..." to the end of the data *iff*
  it was truncated in infof()

Closes #7357
2021-07-07 22:54:01 +02:00
Daniel Stenberg 1026b36ea0
examples/multi-single: fix scan-build warning
warning: Value stored to 'mc' during its initialization is never read

Follow-up to ae8e11ed5f

Closes #7360
2021-07-07 13:06:18 +02:00
Daniel Stenberg 1e488d38c9
wolfssl: failing to set a session id is not reason to error out
... as it is *probably* just timed out.

Reported-by: Francisco Munoz

Closes #7358
2021-07-07 10:19:28 +02:00
Daniel Stenberg ae8e11ed5f
docs/examples: use curl_multi_poll() in multi examples
The API is soon two years old and deserves being shown as the primary
way to drive multi code as it makes it much easier to write code.

multi-poll: removed

multi-legacy: add to show how we did multi API use before
curl_multi_wait/poll.

Closes #7352
2021-07-07 08:15:09 +02:00
Daniel Stenberg 738fb63e61
KNOWN_BUGS: flaky Windows CI builds
Closes #6972
2021-07-05 23:30:44 +02:00
Daniel Stenberg ff7c775a6d
RELEASE-NOTES: synced 2021-07-05 22:55:14 +02:00
Daniel Stenberg c3d612662d
test1147: hyper doesn't allow "crazy" request headers like built-in
... so strip that from the test.

Closes #7349
2021-07-05 22:51:13 +02:00
Daniel Stenberg a62ece3f57
c-hyper: bail on too long response headers
To match with built-in behaviors. Makes test 1154 work.

Closes #7350
2021-07-05 22:49:12 +02:00
Daniel Stenberg 0965348cd8
test1151: added missing CRLF to work with hyper
Closes #7350
2021-07-05 22:49:02 +02:00
Daniel Stenberg 0b0269341b
c-hyper: add support for transfer-encoding in the request
Closes #7348
2021-07-05 22:46:01 +02:00
Andrea Pappacoda 4f3828d5a2
cmake: remove libssh2 feature checks
libssh2 features are detected based on version since commit
9dbbba9976

Closes #7343
2021-07-05 22:44:00 +02:00
Daniel Stenberg e41feede34
test1116: hyper doesn't pass through "surprise-trailers"
Closes #7344
2021-07-05 22:39:42 +02:00
Daniel Stenberg cffbccd096
socks4: scan for the IPv4 address in resolve results
Follow-up to 84d2839740 which changed the resolving to always resolve
both address families, but since SOCKS4 only supports IPv4 it should
scan for and use the first available IPv4 address.

Reported-by: shithappens2016 on github
Fixes #7345
Closes #7346
2021-07-05 22:38:13 +02: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 0a0bc4a077
TODO: "Support in-memory certs/ca certs/keys" done
Has been suppored for a while now with the *BLOB options.
2021-07-02 10:19:21 +02:00
Daniel Stenberg a37fc62e8b
examples: safer and more proper read callback logic
The same callback code is used in:

 imap-append.c
 smtp-authzid.c
 smtp-mail.c
 smtp-multi.c
 smtp-ssl.c
 smtp-tls.c

It should not assume that it can copy full lines into the buffer as it
will encourage sloppy coding practices. Instead use byte-wise logic and
check/acknowledge the buffer size appropriately.

Reported-by: Harry Sintonen
Fixes #7330
Closes #7331
2021-07-01 14:27:12 +02:00
Daniel Stenberg 07fa74d34a
test1519: adjusted to work with hyper
Closes #7333
2021-07-01 14:26:06 +02:00