1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-10 19:45:04 -05:00
Commit Graph

26129 Commits

Author SHA1 Message Date
Daniel Stenberg
6e18568ba3
easyoptions: provide debug function when DEBUGBUILD
... not CURLDEBUG as they're not always set in conjunction.

Follow-up to 6ebe63fac2

Fixes #5877
Closes #5878
2020-08-28 23:35:12 +02:00
Marc Hoersken
5fcad1c1c6
sockfilt: handle FD_CLOSE winsock event on write socket
Learn from the way Cygwin handles and maps the WinSock events
to simulate correct and complete poll and select behaviour
according to Richard W. Stevens Network Programming book.

Follow up to #5867
Closes #5879
2020-08-28 22:30:39 +02:00
Marc Hoersken
003e81e2a3
multi: handle connection state winsock events
Learn from the way Cygwin handles and maps the WinSock events
to simulate correct and complete poll and select behaviour
according to Richard W. Stevens Network Programming book.

Reviewed-by: Jay Satiro
Reviewed-by: Marcel Raad

Follow up to #5634
Closes #5867
2020-08-28 17:57:52 +02:00
Daniel Stenberg
a2c85bb8e4
Curl_pgrsTime - return new time to avoid timeout integer overflow
Setting a timeout to INT_MAX could cause an immediate error to get
returned as timeout because of an overflow when different values of
'now' were used.

This is primarily fixed by having Curl_pgrsTime() return the "now" when
TIMER_STARTSINGLE is set so that the parent function will continue using
that time.

Reported-by: Ionuț-Francisc Oancea
Fixes #5583
Closes #5847
2020-08-28 14:16:41 +02:00
Daniel Stenberg
68a5132474
TLS: fix SRP detection by using the proper #ifdefs
USE_TLS_SRP will be true if *any* selected TLS backend can use SRP

HAVE_OPENSSL_SRP is defined when OpenSSL can use it

HAVE_GNUTLS_SRP is defined when GnuTLS can use it

Clarify in the curl_verison_info docs that CURL_VERSION_TLSAUTH_SRP is
set if at least one of the supported backends offers SRP.

Reported-by: Stefan Strogin
Fixes #5865
Closes #5870
2020-08-28 14:13:05 +02:00
Dan Kenigsberg
c77f6fd1cb
docs: SSLCERTS: fix English syntax
Signed-off-by: Dan Kenigsberg <danken@redhat.com>

Closes #5876
2020-08-28 13:39:09 +02:00
Alessandro Ghedini
0ac310a825
docs: non-existing macros in man pages
As reported by man(1) when invoked as:

  man --warnings -E UTF-8 -l -Tutf8 -Z <file> >/dev/null

Closes #5846
2020-08-27 23:07:53 +02:00
Alessandro Ghedini
3165ea053b
curl.1: fix typo invokved -> invoked
Closes #5846
2020-08-27 23:07:39 +02:00
Daniel Stenberg
85868537d6
buildconf: invoke 'autoreconf -fi' instead
The custom script isn't necessary anymore - but remains for simplicity
and just invokes autoreconf.

Closes #5853
2020-08-27 22:53:34 +02:00
Emil Engler
616c30ad67
lib: make Curl_gethostname accept a const pointer
The address of that variable never gets changed, only the data in it so
why not make it a "char * const"?

Closes #5866
2020-08-27 22:52:22 +02:00
Daniel Stenberg
0da301a082
docs/libcurl: update "Added in" version for curl_easy_option*
Follow-up to 6ebe63fac2
2020-08-27 16:13:41 +02:00
Daniel Stenberg
4608fa4ae6
scripts: improve the "get latest curl release tag" logic
... by insiting on it matching "^curl-".
2020-08-27 14:25:24 +02:00
Daniel Stenberg
ad691b191a
configure: added --disable-get-easy-options
To allow disabling of the curl_easy_option APIs in a build.

Closes #5365
2020-08-27 14:17:42 +02:00
Daniel Stenberg
6ebe63fac2
options: API for meta-data about easy options
const struct curl_easyoption *curl_easy_option_by_name(const char *name);

 const struct curl_easyoption *curl_easy_option_by_id (CURLoption id);

 const struct curl_easyoption *
 curl_easy_option_next(const struct curl_easyoption *prev);

The purpose is to provide detailed enough information to allow for
example libcurl bindings to get option information at run-time about
what easy options that exist and what arguments they expect.

Assisted-by: Jeroen Ooms
Closes #5365
2020-08-27 14:17:36 +02:00
Eric Curtin
9ee5701f12
HTTP/3: update to OpenSSL_1_1_1g-quic-draft-29
Closes #5871
2020-08-27 14:15:25 +02:00
Daniel Stenberg
7731c35886
RELEASE-NOTES: synced 2020-08-27 11:31:27 +02:00
Jay Satiro
fbe07c6829 openssl: Fix wincrypt symbols conflict with BoringSSL
OpenSSL undefines the conflicting symbols but BoringSSL does not so we
must do it ourselves.

Reported-by: Samuel Tranchet
Assisted-by: Javier Blazquez

Ref: https://bugs.chromium.org/p/boringssl/issues/detail?id=371
Ref: https://github.com/openssl/openssl/blob/OpenSSL_1_1_1g/include/openssl/ossl_typ.h#L66-L73

Fixes https://github.com/curl/curl/issues/5669
Closes https://github.com/curl/curl/pull/5857
2020-08-26 23:24:41 -04:00
Daniel Stenberg
d854572ccc
socketpair: allow CURL_DISABLE_SOCKETPAIR
... to completely disable the use of socketpair

Closes #5850
2020-08-26 22:58:21 +02:00
Daniel Stenberg
ce88e21c72
curl_get_line: build only if cookies or alt-svc are enabled
Closes #5851
2020-08-26 22:56:26 +02:00
fullincome
01e2679b49
schannel: fix memory leak when using get_cert_location
The get_cert_location function allocates memory only on success.
Previously get_cert_location was able to allocate memory and return
error. It wasn't obvious and in this case the memory wasn't
released.

Fixes #5855
Closes #5860
2020-08-26 22:54:11 +02:00
Emil Engler
99119fc8a3
git: ignore libtests in 3XXX area
Currently the file tests/libtest/lib3010 is not getting
ignored by git. This fixes it by adding the 3XXX area to
the according .gitignore file.

Closes #5859
2020-08-26 22:53:02 +02:00
Emil Engler
a6a17662f2
doh: add error message for DOH_DNS_NAME_TOO_LONG
When this error code was introduced in b6a53fff6c, it was
forgotten to be added in the errors array and doh_strerror function.

Closes #5863
2020-08-26 22:51:29 +02:00
Daniel Stenberg
7691f68ba3
ngtcp2: adapt to the new pkt_info arguments
Guidance-by: Tatsuhiro Tsujikawa

Closes #5864
2020-08-26 22:40:30 +02:00
Daniel Stenberg
f31b2e7cb8
winbuild/README.md: make <options> visible
Follow-up to be753add31
2020-08-26 15:57:04 +02:00
Daniel Stenberg
be753add31
winbuild: convert the instruction text to README.md
Closes #5861
2020-08-26 15:49:21 +02:00
Daniel Stenberg
259a81555d
lib1560: verify "redirect" to double-slash leading URL
Closes #5849
2020-08-25 13:06:34 +02:00
Marc Hoersken
3334ee6bcb
multi: expand pre-check for socket readiness
Check readiness of all sockets before waiting on them
to avoid locking in case the one-time event FD_WRITE
was already consumed by a previous wait operation.

More information about WinSock network events:
https://docs.microsoft.com/en-us/windows/win32/api/
   winsock2/nf-winsock2-wsaeventselect#return-value

Closes #5634
2020-08-25 12:11:45 +02:00
rcombs
d2a7d7c185
multi: implement wait using winsock events
This avoids using a pair of TCP ports to provide wakeup functionality
for every multi instance on Windows, where socketpair() is emulated
using a TCP socket on loopback which could in turn lead to socket
resource exhaustion.

A previous version of this patch failed to account for how in WinSock,
FD_WRITE is set only once when writing becomes possible and not again
until after a send has failed due to the buffer filling. This contrasts
to how FD_READ and FD_OOB continue to be set until the conditions they
refer to no longer apply. This meant that if a user wrote some data to
a socket, but not enough data to completely fill its send buffer, then
waited on that socket to become writable, we'd erroneously stall until
their configured timeout rather than returning immediately.

This version of the patch addresses that issue by checking each socket
we're waiting on to become writable with select() before the wait, and
zeroing the timeout if it's already writable.

Assisted-by: Marc Hörsken
Reviewed-by: Marcel Raad
Reviewed-by: Daniel Stenberg
Tested-by: Gergely Nagy
Tested-by: Rasmus Melchior Jacobsen
Tested-by: Tomas Berger

Replaces #5397
Reverts #5632
Closes #5634
2020-08-25 12:11:24 +02:00
Marc Hoersken
17f58c8d98
select: reduce duplication of Curl_poll in Curl_socket_check
Change Curl_socket_check to use select-fallback in Curl_poll
instead of implementing it in Curl_socket_check and Curl_poll.

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro

Replaces #5262 and #5492
Closes #5707
2020-08-25 11:21:44 +02:00
Marc Hoersken
e21bd22f84
select: fix poll-based check not detecting connect failure
This commit changes Curl_socket_check to use POLLPRI to
check for connect failure on the write socket, because
POLLPRI maps to fds_err. This is in line with select(2).

The select-based socket check correctly checks for connect
failures by adding the write socket also to fds_err.

The poll-based implementation (which internally can itself
fallback to select again) did not previously check for
connect failure by using POLLPRI with the write socket.

See the follow up commit to this for more information.

This commit makes sure connect failures can be detected
and handled if HAVE_POLL_FINE is defined, eg. on msys2-devel.

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro

Replaces #5509
Prepares #5707
2020-08-25 11:20:58 +02:00
Marc Hoersken
0f7c332f9f
select.h: make socket validation macros test for INVALID_SOCKET
With Winsock the valid range is [0..INVALID_SOCKET-1] according to
https://docs.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2

Reviewed-by: Jay Satiro
Reviewed-by: Marcel Raad
Reviewed-by: Daniel Stenberg

Closes #5760
2020-08-25 11:17:06 +02:00
Daniel Stenberg
3a9042ea14
docs: --output-dir is added in 7.73.0, nothing else
Follow-up to 5620d2cc78
2020-08-24 22:49:32 +02:00
Daniel Stenberg
5620d2cc78
curl: add --output-dir
Works with --create-dirs and with -J

Add test 3008, 3009, 3011, 3012 and 3013 to verify.

Closes #5637
2020-08-24 22:41:37 +02:00
Daniel Stenberg
510d98157f
configure: fix pkg-config detecting wolfssl
When amending the include path with "/wolfssl", this now properly strips
off all whitespace from the path variable! Previously this would lead to
pkg-config builds creating bad command lines.

Closes #5848
2020-08-24 19:21:20 +02:00
Michael Musset
ebc6c54c74
sftp: add the option CURLKHSTAT_FINE_REPLACE
Replace the old fingerprint of the host with a new.

Closes #5685
2020-08-24 17:26:08 +02:00
Daniel Stenberg
ddf47bbc0a
RELEASE-NOTES: synced
The next release is now to become 7.73.0
2020-08-24 17:02:16 +02:00
Daniel Stenberg
4ebac06106
checksrc: verify do-while and spaces between the braces
Updated mprintf.c to comply

Closes #5845
2020-08-24 16:38:17 +02:00
Daniel Stenberg
4be1f8dc01
curl: support XDG_CONFIG_HOME to find .curlrc
Added test433 to verify. Updated documentation.

Reviewed-by: Jay Satiro
Suggested-by: Eli Schwartz
Fixes #5829
Closes #5837
2020-08-24 16:37:09 +02:00
Daniel Stenberg
98c94596f5
etag: save and use the full received contents
... which makes it support weak tags and non-standard etags too!

Added test case 347 to verify blank incoming ETag:

Fixes #5610
Closes #5833
2020-08-24 10:02:41 +02:00
Daniel Stenberg
bc3b5bcf87
setopt: if the buffer exists, refuse the new BUFFERSIZE
The buffer only exists during transfer and then we shouldn't change the
size (the setopt is not documented to work then).

Reported-by: Harry Sintonen
Closes #5842
2020-08-24 09:08:56 +02:00
COFFEETALES
fab5185275
sftp: add new quote commands 'atime' and 'mtime'
Closes #5810
2020-08-24 09:01:56 +02:00
Daniel Stenberg
88b1ca7cba
CURLE_PROXY: new error code
Failures clearly returned from a (SOCKS) proxy now causes this return
code. Previously the situation was not very clear as what would be
returned and when.

In addition: when this error code is returned, an application can use
CURLINFO_PROXY_ERROR to query libcurl for the detailed error, which then
returns a value from the new 'CURLproxycode' enum.

Closes #5770
2020-08-24 08:41:48 +02:00
Daniel Stenberg
d71ac6711a
runtests: make cleardir() erase dot files too
Because test cases might use dot files.

Closes #5838
2020-08-23 17:45:41 +02:00
Daniel Stenberg
712d16cbe0
KNOWN_BUGS: 'no_proxy' string-matches IPv6 numerical addreses
Also: the current behavior is now documented in the curl.1 and
CURLOPT_NOPROXY.3 man pages.

Reported-by: Andrew Barnes
Closes #5745
Closes #5841
2020-08-23 00:09:39 +02:00
Viktor Szakats
38039da764
Makefile.m32: add ability to override zstd libs [ci skip]
Similarly to brotli, where this was already possible.
E.g. it allows to link zstd statically to libcurl.dll.

Ref: https://github.com/curl/curl-for-win/issues/12
Ref: d9b266afd2

Closes https://github.com/curl/curl/pull/5840
2020-08-22 21:08:28 +00:00
Daniel Stenberg
327bd5d026
runtests: avoid 'fail to start' repeated messages in attempt loops
Closes #5834
2020-08-21 17:16:05 +02:00
Daniel Stenberg
15f76a50ee
runtests: clear pid variables when failing to start a server
... as otherwise the parent doesn't detect the failure and believe it
actually worked to start.

Reported-by: Christian Weisgerber
Bug: https://curl.haxx.se/mail/lib-2020-08/0018.html
Closes #5834
2020-08-21 17:15:59 +02:00
Daniel Stenberg
6b60767bd8
TODO: Virtual external sockets
Closes #5835
2020-08-21 10:06:31 +02:00
Don
7f8863f741
dist: add missing CMake Find modules to the distribution
Closes #5836
2020-08-21 00:12:55 +02:00
Daniel Stenberg
5bb1721579
RELEASE-NOTES: synced
... and version bumped to 7.72.1
2020-08-19 23:43:52 +02:00