Commit Graph

29924 Commits

Author SHA1 Message Date
Jay Satiro
d36c632c86 DYNBUF.md: note Curl_dyn_add* calls Curl_dyn_free on failure
This is the existing behavior and it has been widely assumed in the
codebase.

Closes https://github.com/curl/curl/pull/10645
2023-03-01 04:18:15 -05:00
Stefan Eissing
d9ccc75b00 http2: fix upload busy loop
- Set KEEP_SEND_PAUSE when exhausting remote HTTP/2 window size of a
  stream.

- Clear KEEP_SEND_PAUSE when receiving HTTP/2 window updates on a paused
  stream.

- Also fix http2 send compiler warnings reported in #10449.

Prior to this change, starting in 71b7e016 which precedes 7.88.0,
libcurl may eat CPU during HTTP/2 upload.

Reported-by: Jay Satiro

Fixes https://github.com/curl/curl/issues/10449
Fixes https://github.com/curl/curl/issues/10618
Closes https://github.com/curl/curl/pull/10627
2023-03-01 04:13:49 -05:00
Daniel Stenberg
c50a6eee04
sectransp: make read_cert() use a dynbuf when loading
Closes #10632
2023-03-01 09:38:43 +01:00
Jay Satiro
0b84d0cf1b transfer: limit Windows SO_SNDBUF updates to once a second
- Change readwrite_upload() to call win_update_buffer_size() no more
  than once a second to update SO_SNDBUF (send buffer limit).

Prior to this change during an upload readwrite_upload() could call
win_update_buffer_size() anywhere from hundreds of times per second to
an extreme test case of 100k per second (which is likely due to a bug,
see #10618). In the latter case WPA profiler showed
win_update_buffer_size was the highest capture count in
readwrite_upload. In any case the calls were excessive and unnecessary.

Ref: https://github.com/curl/curl/pull/2762

Closes https://github.com/curl/curl/pull/10611
2023-03-01 01:15:28 -05:00
Daniel Stenberg
a496d46a7b
RELEASE-NOTES: synced 2023-02-28 23:08:14 +01:00
Stefan Eissing
cbe9d82c22
http2: fix for http2-prior-knowledge when reusing connections
- refs #10634 where errors in the HTTP/2 framing layer are observed.
- the bug was that on connection reuse, the code attempted to switch
  in yet another layer of HTTP/2 handling instead of detecting that
  this was already in place.
- added pytest testcase reproducing the issue.

Reported-by: rwmjones on github
Fixes #10634
Closes #10643
2023-02-28 23:04:00 +01:00
Stefan Eissing
efa1aba97c
cf-socket: fix handling of remote addr for accepted tcp sockets
- do not try to determine the remote address of a listen socket. There
  is none.
- Update remote address of an accepted socket by getpeername() if
  available.

Reported-by: Harry Sintonen
Fixes #10622
Closes #10642
2023-02-28 23:03:17 +01:00
Stefan Eissing
a4d015e69f
http: fix unix domain socket use in https connects
- when h2/h3 eyeballing was involved, unix domain socket
  configurations were not honoured
- configuring --unix-socket will disable HTTP/3 as candidate for eyeballing
- combinatino of --unix-socket and --http3-only will fail during initialisation
- adding pytest test_11 to reproduce

Reported-by: Jelle van der Waa
Fixes #10633
Closes #10641
2023-02-28 22:59:19 +01:00
Daniel Stenberg
c9c3ec482b
setopt: move the CURLOPT_CHUNK_DATA pointer to the set struct
To make duphandle work etc

Closes #10635
2023-02-28 08:44:28 +01:00
Viktor Szakats
51211a31a5
quic/schannel: fix compiler warnings
Fixes #10603
Closes #10616
2023-02-28 08:43:16 +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
26c6d822bc
libcurl-errors.3: add the CURLHcode errors from curl_easy_header.3
Closes #10629
2023-02-28 08:21:34 +01:00
Daniel Stenberg
252fce70b1
mqtt: on send error, return error
Reported-by: Maciej Domanski

Closes #10623
2023-02-28 08:11:55 +01:00
Daniel Stenberg
3b23dbeec1
ws: keep the socket non-blocking
Reported-by: marski on github
Fixes #10615
Closes #10625
2023-02-28 00:38:21 +01:00
Daniel Stenberg
788c6b3864
hostip: avoid sscanf and extra buffer copies
Also made create_hostcache_id() return the id length.

Closes #10601
2023-02-27 20:43:13 +01:00
Daniel Stenberg
c5168365c7
PARALLEL-TRANSFERS.md: not "early days" for this anymore
Refresh the language as the support is now over three years old

Closes #10624
2023-02-27 20:08:54 +01:00
Daniel Stenberg
a26547b2a2
easy: remove infof() debug leftover from curl_easy_recv
It said "reached [path]/easy.c:1231"

Closes #10628
2023-02-27 19:50:25 +01:00
Daniel Stenberg
cf3e6ce92f
idn: return error if the conversion ends up with a blank host
Some IDN sequences are converted into "" (nothing), which can make this
function end up with a zero length host name and we cannot consider that
a valid host to continue with.

Reported-by: Maciej Domanski
Closes #10617
2023-02-27 15:12:29 +01:00
Daniel Stenberg
49a9f13c39
examples/http3.c: use CURL_HTTP_VERSION_3
and update the comment

Closes #10619
2023-02-27 15:11:13 +01:00
Daniel Stenberg
22eec78027
x509asn1.c: use correct format specifier for infof() call
Detected by Coverity

Closes #10614
2023-02-27 08:26:01 +01:00
Daniel Stenberg
aa31f9a856
Revert "GHA: add Microsoft C++ Code Analysis"
This reverts commit e0db842b2a.

This tool seems very restricted in how often it might be used by a
project and thus very quickly start to report fails simply because it
refuses to run when "there are more runs than allowed".

Closes #10613
2023-02-26 23:05:12 +01:00
Patrick Monnerat
90756d33d8
tests: test secure mail protocols with explicit SSL requests
New tests 987, 988 and 989, disabled for rustls (hanging).

Closes #10077
2023-02-25 11:49:31 +01:00
Patrick Monnerat
5855c478cb
tests: support for imaps/pop3s/smtps protocols
Closes #10077
2023-02-25 11:49:31 +01:00
Patrick Monnerat
8bfa4d66de
runtests: use a hash table for server port numbers
Closes #10077
2023-02-25 11:49:31 +01:00
andy5995
9fcc91006a
INTERNALS.md: grammar
Closes #10607
2023-02-25 10:54:49 +01:00
Daniel Stenberg
0232e160e1
RELEASE-NOTES: synced 2023-02-25 00:20:06 +01:00
Philip H
682854c790
.cirrus.yml: Bump to FreeBSD 13.2
Closes #10270
2023-02-25 00:15:57 +01:00
Philip H
4b3dc4b452
ngtcp2-gnutls.yml: bump to gnutls 3.8.0
Closes #10507
2023-02-25 00:12:44 +01:00
Philip H
8bd5a13dc3
CI: update ngtcp2 and nghttp2 for pytest
Follow-up: 5c9ee8cef4

Closes #10508
2023-02-25 00:11:46 +01:00
andy5995
8125822e6e
GHA: use same flags for Slackbuild as Slack package
Closes #10526
2023-02-25 00:10:25 +01:00
Daniel Stenberg
3b15ee1e34
rtsp: avoid sscanf for parsing
Closes #10605
2023-02-24 23:56:43 +01:00
Daniel Stenberg
3b8f5bb15b
http_proxy: parse the status line without sscanf
Closes #10602
2023-02-24 23:54:54 +01:00
Daniel Stenberg
cbd3fd7cbb
telnet: error correctly for WS set to "x[num]"
Follow-up to e4f93be9d5
Reported-by: Harry Sintonen
Closes #10606
2023-02-24 23:00:26 +01:00
Daniel Stenberg
5ed7417d2f
krb5: avoid sscanf for parsing
Closes #10599
2023-02-24 17:24:01 +01:00
Daniel Stenberg
835682661c
misc: remove support for curl_off_t < 8 bytes
Closes #10597
2023-02-24 17:05:33 +01:00
Daniel Stenberg
9672cc640c
telnet: parse NEW_ENVIRON without sscanf
Closes #10596
2023-02-24 16:45:58 +01:00
Daniel Stenberg
e4f93be9d5
telnet: parse the WS= argument without sscanf
Closes #10596
2023-02-24 16:45:56 +01:00
Daniel Stenberg
0c28ba2faa
telnet: parse telnet options without sscanf
Closes #10596
2023-02-24 16:45:42 +01:00
Daniel Stenberg
304b5183fd
ftp: replace sscanf for MDTM 213 response parsing
Closes #10590
2023-02-24 16:43:27 +01:00
Daniel Stenberg
dad74488fc
ftp: replace sscanf for PASV parsing
Closes #10590
2023-02-24 16:43:24 +01:00
Daniel Stenberg
b0f54f27a9
ftp: make the EPSV response parser not use sscanf
Closes #10590
2023-02-24 16:43:15 +01:00
Stefan Eissing
f6fe54e21e
ngtcp2: fix unwanted close of file descriptor 0
... causing macOS to hand out 0 as next socket handle and failing on
further operations.

Reported-by: Sergey Fionov
Fixes #10593
Closes #10595
2023-02-24 08:43:35 +01:00
Daniel Stenberg
0242eba06e
select: stop treating POLLRDBAND as an error
POLLRDBAND does not seem to be an general error and on Windows the value
for POLLIN is 768 and the value for POLLRDBAND is 512.

Fixes #10501
Reported-by: opensslonzos-github on github
Closes #10592
2023-02-23 23:41:44 +01:00
Daniel Stenberg
5da5684cec
test978: mark file as text mode
Follow-up to 4ea5702980

To fix test failures on Windows

Closes #10594
2023-02-23 16:32:43 +01:00
Daniel Stenberg
b2151fbc4f
http: rewrite the status line parser without sscanf
Closes #10585
2023-02-23 10:23:12 +01:00
Daniel Stenberg
4ea5702980
test978: verify that --stderr works for -w's stderr as well 2023-02-23 10:05:13 +01:00
Jay Satiro
d9b7f6e750
curl: make -w's %{stderr} use the file set with --stderr
Reported-by: u20221022 on github
Fixes #10491
Closes #10569
2023-02-23 10:05:13 +01:00
Jay Satiro
80b7f05baf winbuild: fix makefile clean
- Fix and move 'clean' code that removes the output and obj directories
  trees from MakefileBuild.vc to Makefile.vc.

Prior to this change the 'clean' code did not work right because the
variables containing the directory names were not fully initialized and
the rmdir syntax was sometimes incorrect (typos). DIRDIST for example
was set to ..\builds\ and not ..\builds\$(CONFIG_NAME_LIB)\ so it would
remove the former and not the latter. If WITH_PREFIX was set then that
directory was removed instead.

Also, DIRDIST (the output directory) even if initialized should not be
removed by MakefileBuild.vc because by that time it could be set to a
user directory that may contain other files if WITH_PREFIX is set (eg we
don't want rmdir /s /q C:\usr\local). Therefore we remove from
Makefile.vc before any of that happens. I added a comment in both
makefiles explaining this.

Closes https://github.com/curl/curl/pull/10576
2023-02-23 03:49:37 -05:00
Jay Satiro
47129b2b4b sectransp: fix compiler warning c89 mixed code/declaration
Since cbf57176 the Cirrus CI 'macOS arm64 SecureTransport http2' has
been failing due to c89 warnings mixed code/declaration. That commit is
not the cause so I assume something has changed in the CI outside of our
configuration. Anyway, we don't mix code/declaration so this is the fix
for that.

Closes https://github.com/curl/curl/pull/10574
2023-02-23 03:47:31 -05:00