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

25580 Commits

Author SHA1 Message Date
Daniel Stenberg
ac343fed7a
test1908: avoid using fixed port number in test data
Closes #5225
2020-04-13 01:05:01 +02:00
Andrew Kurushin
c35af29222 schannel: Fix blocking timeout logic
- Fix schannel_send for the case when no timeout was set.

Prior to this change schannel would error if the socket was not ready
to send data and no timeout was set.

This commit is similar to parent commit 89dc6e0 which recently made the
same change for SOCKS, for the same reason. Basically it was not well
understood that when Curl_timeleft returns 0 it is not a timeout of 0 ms
but actually means no timeout.

Fixes https://github.com/curl/curl/issues/5177
Closes https://github.com/curl/curl/pull/5221
2020-04-12 18:32:17 -04:00
Jay Satiro
0510cce8c0 socks: Fix blocking timeout logic
- Document in Curl_timeleft's comment block that returning 0 signals no
  timeout (ie there's infinite time left).

- Fix SOCKS' Curl_blockread_all for the case when no timeout was set.

Prior to this change if the timeout had a value of 0 and that was passed
to SOCKET_READABLE it would return right away instead of blocking. That
was likely because it was not well understood that when Curl_timeleft
returns 0 it is not a timeout of 0 ms but actually means no timeout.

Ref: https://github.com/curl/curl/pull/5214#issuecomment-612512360

Closes https://github.com/curl/curl/pull/5220
2020-04-12 18:32:16 -04:00
Marc Hoersken
be28bc2241 gopher: check remaining time left during write busy loop
Prior to this change gopher's blocking code would block forever,
ignoring any set timeout value.

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

Similar to #5220 and #5221
Closes #5214
2020-04-12 18:32:14 -04:00
Dirkjan Bussink
d590908318
gnutls: ensure TLS 1.3 when SRP isn't requested
When SRP is requested in the priority string, GnuTLS will disable
support for TLS 1.3. Before this change, curl would always add +SRP to
the priority list, effectively always disabling TLS 1.3 support.

With this change, +SRP is only added to the priority list when SRP
authentication is also requested. This also allows updating the error
handling here to not have to retry without SRP. This is because SRP is
only added when requested and in that case a retry is not needed.

Closes #5223
2020-04-13 00:06:02 +02:00
Marc Hoersken
ac1e206278
tests/server: add hidden window to gracefully handle WM_CLOSE
Forward Window events as signals to existing signal event handler.
2020-04-12 18:38:12 +02:00
Marc Hoersken
30c8ef7d63
tests/server: add CTRL event handler for Win32 consoles
Forward CTRL events as signals to existing signal event handler.
2020-04-12 15:55:22 +02:00
Marc Hoersken
9869f6dc5a
tests/server: move all signal handling routines to util.[ch]
Avoid code duplication to prepare for portability enhancements.
2020-04-12 15:55:21 +02:00
Daniel Stenberg
b9a0804ad1
compressed.d: stress that the headers are not modified
Suggested-by: Michael Osipov
Assisted-by: Jay Satiro
Bug: https://github.com/curl/curl/issues/5182#issuecomment-611638008
Closes #5217
2020-04-12 11:02:24 +02:00
Marc Hoersken
dd0365d560
tests/server/util.c: use curl_off_t instead of long for pid
Avoid potential overflow of huge PIDs on Windows.

Related to #5188
Assisted-by: Marcel Raad
2020-04-11 23:46:30 +02:00
Marc Hoersken
c1951cdb38
tests: use Cygwin/msys PIDs for stunnel and sshd on Windows
Since the Windows versions of both programs would write Windows
PIDs to their pidfiles which we cannot handle, we need to use
our known perl.exe Cygwin/msys PID together with exec() in order
to tie the spawned processes to the existance of our perl.exe

The perl.exe that is executing secureserver.pl and sshserver.pl
has a Cygwin/msys PID, because it is started inside Cygwin/msys.

Related to #5188
2020-04-11 23:46:15 +02:00
Marc Hoersken
2a93021750
tests: add Windows compatible pidwait like pidkill and pidterm
Related to #5188
2020-04-11 23:46:00 +02:00
Marc Hoersken
3f60a9e995
tests: fix conflict between Cygwin/msys and Windows PIDs
Add 65536 to Windows PIDs to allow Windows specific treatment
by having disjunct ranges for Cygwin/msys and Windows PIDs.

See also:
- https://cygwin.com/git/?p=newlib-cygwin.git;a=commit; ↵
  h=b5e1003722cb14235c4f166be72c09acdffc62ea
- https://cygwin.com/git/?p=newlib-cygwin.git;a=commit; ↵
  h=448cf5aa4b429d5a9cebf92a0da4ab4b5b6d23fe

Replaces #5178
Closes #5188
2020-04-11 23:44:52 +02:00
Daniel Stenberg
6d13ef5325
RELEASE-NOTES: synced 2020-04-11 18:48:31 +02:00
Daniel Stenberg
20f281293f
release-notes.pl: detect the start of the references in cleanup mode 2020-04-11 18:47:23 +02:00
Daniel Stenberg
5afa07fab5
Revert "file: on Windows, refuse paths that start with \\"
This reverts commit 1b71bc532b.

Reminded-by: Chris Roberts
Bug: https://curl.haxx.se/mail/archive-2020-04/0013.html

Closes #5215
2020-04-11 18:20:38 +02:00
Jay Satiro
53f4070827 lib: fix conversion warnings for SOCKET_WRITABLE/READABLE
- If loss of data may occur converting a timediff_t to time_t and
  the time value is > TIME_T_MAX then treat it as TIME_T_MAX.

This is a follow-up to 8843678 which removed the (time_t) typecast
from the macros so that conversion warnings could be identified.

Closes https://github.com/curl/curl/pull/5199
2020-04-11 02:52:25 -04:00
Jay Satiro
17c18fbc30 test1148: tolerate progress updates better (again)
- Ignore intermediate progress updates.

- Support locales that use a character other than period as decimal
  separator (eg 100,0%).

test1148 checks that the progress finishes at 100% and has the right
bar width. Prior to this change the test assumed that the only progress
reported for such a quick transfer was 100%, however in rare instances
(like in the CI where transfer time can slow considerably) there may be
intermediate updates. For example, below is stderrlog1148 from a failed
CI run with explicit \r and \n added (it is one line; broken up so that
it's easier to understand).

\r
\r##################################                                        48.3%
\r######################################################################## 100.0%
\n

Closes https://github.com/curl/curl/pull/5194
2020-04-11 02:51:50 -04:00
Marc Hoersken
8c92f7e82f
sshserver.pl: use cached Win32 environment check variable 2020-04-10 21:03:24 +02:00
Marc Hoersken
3e36af2cfa
appveyor: partially revert 3413a110 to keep build without proxy
Ref: #5211 and #4526
Reported-by: Marcel Raad
2020-04-10 21:01:19 +02:00
Marc Hoersken
3413a11091
appveyor: ignore failing 'connect to non-listening proxy' tests
Closes #5211
2020-04-10 17:13:10 +02:00
Marc Hoersken
638b8558d1
CI/macos: convert CRLF to LF and align indentation 2020-04-10 00:59:35 +02:00
Daniel Stenberg
d4afa0fc20
url: allow non-HTTPS altsvc-matching for debug builds
This is already partly supported but this part was missing.
Reported-by: James Fuller

Closes #5205
2020-04-09 17:46:24 +02:00
Daniel Stenberg
cb232b13de
server/resolve: remove AI_CANONNAME to make macos tell the truth
With this bit set, my mac successfully resolves "ip6-localhost" when in
fact there is no such host known to my machine! That in turn made test
241 wrongly execute and fail.

Closes #5202
2020-04-09 09:45:58 +02:00
Daniel Stenberg
07778542b3
runtests: fix warning about using an undefined variable
Follow-up from 4d939ef6ce
2020-04-09 09:45:52 +02:00
Daniel Stenberg
3f704083bf
release-notes: fix the initial reference list output 2020-04-08 14:54:20 +02:00
Daniel Stenberg
6435aaa70b
github actions: run when pushed to master or */ci + PRs
Avoid double-builds when using "local" branches for PRs. For both macos
and fuzz jobs.

Closes #5201
2020-04-08 14:19:08 +02:00
Daniel Stenberg
4d939ef6ce
runtests: provide nicer errormsg when protocol "dump" file is empty 2020-04-08 14:15:47 +02:00
Gilles Vollant
0fdf965126
schannel: support .P12 or .PFX client certificates
Used with curl command line option like this: --cert
<filename>:<password> --cert-type p12

Closes #5193
2020-04-08 14:13:12 +02:00
Daniel Stenberg
741cb81d09
tests: verify split initial HTTP requests with CURL_SMALLREQSEND
test1294: "split request" being when the entire request isn't sent in
the first go, and the remainder is sent in the PERFORM state. A GET
request is otherwise not sending anything during PERFORM.

test1295: same kind of split but with POST

Closes #5197
2020-04-08 08:14:32 +02:00
Daniel Stenberg
0ef54abf52
http: don't consider upload done if the request isn't completely sent off
Fixes #4919
Closes #5197
2020-04-08 08:14:23 +02:00
Daniel Stenberg
3e376059bb
http: allow Curl_add_buffer_send() to do a short first send by force
In a debug build, settting the environment variable "CURL_SMALLREQSEND"
will make the first HTTP request send not send more bytes than the set
amount, thus ending up verifying that the logic for handling a split
HTTP request send works correctly.
2020-04-08 08:12:59 +02:00
Daniel Stenberg
0bcf975c38
connect: store connection info for QUIC connections
Restores the --head functionality to the curl utility which extracts
'protocol' that is stored that way.

Reported-by: James Fuller
Fixes #5196
Closes #5198
2020-04-08 08:10:08 +02:00
Daniel Stenberg
860eaebae6
tests/README: update the port numbers list
Since the pipelining server is long gone.
Reported-by: James Fuller
2020-04-07 13:15:14 +02:00
Daniel Stenberg
88436786c8
select: remove typecast from SOCKET_WRITABLE/READABLE macros
So that they don't hide conversions-by-mistake

Reviewed-by: Jay Satiro
Closes #5190
2020-04-07 00:09:34 +02:00
Daniel Stenberg
946a71a14f
CURLOPT_WRITEFUNCTION.3: add inline example and new see-also
Closes #5192
2020-04-07 00:07:49 +02:00
Daniel Stenberg
9b23a1da7c
release-notes: output trailing references sorted numerically 2020-04-06 23:45:31 +02:00
Daniel Stenberg
fef4334091
cleanup: correct copyright year range on a few files 2020-04-06 23:21:52 +02:00
Daniel Stenberg
efa830f9f6
configure: remove use of -vec-report0 from CFLAGS with icc
... as it apparently isn't (always) supported.
Reported-by: Alain Miniussi
Fixes #5096
Closes #5191
2020-04-06 23:19:06 +02:00
Daniel Stenberg
ae57e27b3e
warnless: remove code block for icc that didn't work
Reported-by: Alain Miniussi
Fixes #5096
2020-04-06 23:18:56 +02:00
Marc Hoersken
298a8235fd
dist: add missing setup-win32.h
Follow up to d820224b8b
2020-04-06 18:05:13 +02:00
Daniel Stenberg
fcf955aca5
RELEASE-NOTES: synced 2020-04-06 16:43:32 +02:00
Daniel Stenberg
17211ade28
scripts/release-notes.pl: add helper script for RELEASE-NOTES maintenance
This script helps putting entries in the RELEASE-NOTES using a coherent
style and sorting with a minimal human editing effort - as long as the
first line in the commit message is good enough! There's a short howto
at the top of the file.
2020-04-06 16:22:49 +02:00
Dennis Felsing
2ebc1236ab
configure: don't check for Security.framework when cross-compiling
Since it checks for the local file, not the cross-compiled one.

Closes #5189
2020-04-06 15:23:08 +02:00
Daniel Stenberg
920dfacbf4
TODO: Option to make -Z merge lined based outputs on stdout
Closes #5175
2020-04-06 00:05:42 +02:00
Daniel Stenberg
66828f4fd3
lib: never define CURL_CA_BUNDLE with a getenv
- it breaks the build (since 6de756c9b1)
- it's not documented and not consistent across platforms
- the curl tool does that getenv magic

Bug: https://github.com/curl/curl/commit/6de756c#r38127030
Reported-by: Gisle Vanem

Closes #5187
2020-04-05 23:59:20 +02:00
Marc Hoersken
f50bc76c99
lib670: use the same Win32 API check as all other lib tests 2020-04-05 18:25:03 +02:00
Marc Hoersken
45b843cbb8
appveyor: use random test server ports based upon APPVEYOR_API_URL
Avoid conflicts of test server ports with AppVeyor API on localhost.

Closes #5034
2020-04-05 17:39:43 +02:00
Marc Hoersken
b667bbe2ca
appveyor: sort builds by type and add two new variants
Related to #5034 and #5063
2020-04-05 17:35:48 +02:00
Marc Hoersken
4ba6ba2d94
appveyor: show failed tests in log even if test is ignored
And print API response with newline only if there is one
2020-04-05 17:33:07 +02:00