Commit Graph

30239 Commits

Author SHA1 Message Date
Daniel Stenberg
1c5ed24ee0
tests/keywords.pl: remove
This script does not work since the introduction of the test
preprocessing. If we need this functionality, it probably needs to be
moved into the runtests tool or similar.

Reported-by: Dan Fandrich
Fixes #10895
Closes #10987
2023-04-17 19:59:58 +02:00
Stefan Eissing
fc2f1e547a
http2: support HTTP/2 to forward proxies, non-tunneling
- with `--proxy-http2` allow h2 ALPN negotiation to
  forward proxies
- applies to http: requests against a https: proxy only,
  as https: requests will auto-tunnel
- adding a HTTP/1 request parser in http1.c
- removed h2h3.c
- using new request parser in nghttp2 and all h3 backends
- adding test 2603 for request parser
- adding h2 proxy test cases to test_10_*

scorecard.py: request scoring accidentally always run curl
with '-v'. Removed that, expect double numbers.

labeller: added http1.* and h2-proxy sources to detection

Closes #10967
2023-04-17 17:27:49 +02:00
Daniel Stenberg
fb1d62ff07
curl_easy_unescape.3: rename the argument
and highlight it appropriately in the text.

Closes #10979
2023-04-17 14:54:50 +02:00
Viktor Szakats
81c9c8cd39
autotools: sync up clang picky warnings with cmake
Bringing missing options over from CMake.

Move around existing `-Wno-pointer-bool-conversion` option to come
_after_ `-Wconversion`.

Reviewed-by: Marcel Raad
Closes #10974
2023-04-17 11:35:56 +00:00
Daniel Stenberg
17c71df421
tests/libtest/lib1900.c: remove
This file was left behind when the rest of the test was previously removed.

Follow-up to e50a877df7
2023-04-17 12:45:14 +02:00
Daniel Stenberg
8ff820388f
src/tool_operhlp.c: fix value stored to 'uerr' is never read
Ref: https://github.com/curl/curl/pull/10974#issuecomment-1510461343
Reported-by: Viktor Szakats
Closes #10982
2023-04-17 09:07:07 +02:00
Viktor Szakats
9c543de0ec
cmake: speed up and extend picky clang/gcc options
Extend existing picky compiler options with ones missing compared to
autotools builds. Also sync options between clang and gcc.

Redesign the way we enable these options to avoid the slow option
detection almost completely.

This reduces the number of detections from 35 to zero for clang and
3 for gcc, even after adding a bunch of new options.

clang 3.0 (2011-11-29) and gcc 2.95 (1999-07-31) now required.

Also show enabled picky options.

Ref: https://github.com/libssh2/libssh2/pull/952

Reviewed-by: Daniel Stenberg
Closes #10973
2023-04-16 22:28:25 +00:00
Andreas Falkenhahn
15a361892d
nbtlm: use semicolons instead of commas for (void) args
Closes #10978
2023-04-16 17:05:15 +02:00
Daniel Stenberg
81b2b577df
multi: free up more data earleier in DONE
Before checking for more users of the connection and possibly bailing
out.

Fixes #10971
Reported-by: Paweł Wegner
Closes #10972
2023-04-15 23:30:05 +02:00
Daniel Stenberg
b32b7bb37a
RELEASE-NOTES: synced 2023-04-15 11:09:38 +02:00
Daniel Stenberg
54ac447b11
curl: do NOT append file name to path for upload when there's a query
Added test 425 to verify.

Reported-by: Dirk Rosenkranz
Bug: https://curl.se/mail/archive-2023-04/0008.html
Closes #10969
2023-04-15 10:52:33 +02:00
Daniel Stenberg
7ed010ce21
libcurl-thread.3: improved name resolver wording
And make better .SH sections

Closes #10966
2023-04-14 16:36:48 +02:00
Colman Mbuya
ef8b1690c8
CURLOPT_PROXY_SSL_VERIFYPEER.3: fix minor grammar mistake
Closes #10968
2023-04-14 16:35:19 +02:00
Daniel Stenberg
e39754f6a2
curl: add --proxy-http2
For trying HTTP/2 with an HTTPS proxy.

Closes #10926
2023-04-14 10:39:23 +02:00
Daniel Stenberg
c39f981ff4
KNOWN_BUGS: remove fixed or outdated issues, move non-bugs
- remove h3 issues believed to be fixed

- make the flaky CI issue be generic and not Windows specific

- "TLS session cache does not work with TFO" now documented

  This is now a documented restriction and not a bug. TFO in general is
  rarely used and has other problems, making it a low-priotity thing to
  work on.

- remove "Renegotiate from server may cause hang for OpenSSL backend"

  This is an OpenSSL issue, not a curl one. Even if it taints curl.

- rm "make distclean loops forever"

- rm "configure finding libs in wrong directory"

  Added a section to docs/INSTALL.md about it.

- "A shared connection cache is not thread-safe"

  Moved over to TODO and expanded for other sharing improvements we
  could do

- rm "CURLOPT_OPENSOCKETPAIRFUNCTION is missing"

- rm "Blocking socket operations in non-blocking API"

  Already listed as a TODO

- rm "curl compiled on OSX 10.13 failed to run on OSX 10.10"

  Water under the bridge. No one cares about this anymore.

- rm "build on Linux links libcurl to libdl"

  Verified to not be true (anymore).

- rm "libpsl is not supported"

  The cmake build supports it since cafb356e19

Closes #10963
2023-04-14 09:50:19 +02:00
Daniel Stenberg
21e7e44fb9
url: fix PVS nits
- expression 'hostptr' is always true
- a part of conditional expression is always true: proxypasswd
- expression 'proxyuser' is always true
- avoid multiple Curl_now() calls in allocate_conn

Ref: #10929
Closes #10959
2023-04-14 09:29:33 +02:00
Daniel Stenberg
0ebf111b37
bufq: simplify since expression is always true
The check for 'len' is already done so it will remain true until
updated. Pointed out by PVS.

Ref: #10929
Closes #10958
2023-04-14 09:28:33 +02:00
Daniel Stenberg
a299099ba4
hash: fix assigning same value
Pointed out by PVS

Ref: #10929
Closes #10956
2023-04-14 09:26:26 +02:00
Daniel Stenberg
c79356d852
cookie: address PVS nits
- avoid assigning the same value again
- remove superfluous check of co->domain
- reduce variable scope for namep/valuep

Ref: #10929
Closes #10954
2023-04-14 09:23:04 +02:00
Stefan Eissing
4bc597d27c cf-socket: Disable socket receive buffer by default
- Disable socket receive buffer unless USE_RECV_BEFORE_SEND_WORKAROUND
  is in place.

While we would like to use the receive buffer, we have stalls in
parallel transfers where not all buffered data is consumed and no socket
events happen.

Note USE_RECV_BEFORE_SEND_WORKAROUND is a Windows sockets workaround
that has been disabled by default since b4b6e4f1, due to other bugs.

Closes https://github.com/curl/curl/pull/10961
2023-04-14 03:15:05 -04:00
Stefan Eissing
43d7ccd03d
cf-h2-proxy: fix processing ingress to stop too early
- progress ingress stopped too early, causing data
  from the underlying filters to not be processed and
  report that no tunnel data was available
- this lead to "hangers" where no socket activity was
  seen but data rested in buffers

Closes #10952
2023-04-13 23:54:43 +02:00
Stefan Eissing
be800a6cab
http3: check stream_ctx more thoroughly in all backends
- callbacks and filter methods might be invoked at unexpected
  times, e.g. when the transfer's stream_ctx has not been initialized
  yet or, more likely, has already been taken down.
- check for existance of stream_ctx in such places and return
  an error or silently succeed the call.

Closes #10951
2023-04-13 23:53:36 +02:00
Daniel Stenberg
7e68133d04
ftp: fix 'portsock' variable was assigned the same value
Pointed out by PVS

Ref: #10929
Closes #10955
2023-04-13 18:14:30 +02:00
Daniel Stenberg
41a53b159d
ftp: remove dead code
This condition can never be true here since it is handled already 28
lines above.

Pointed out by PVS.

Ref: #10929
Closes #10957
2023-04-13 18:13:40 +02:00
Daniel Stenberg
aabfa60371
cf-h1-proxy: skip an extra NULL assign
and use Curl_safefree() once to save another NULL assign. Found by PVS.

Ref. #10929
Closes #10953
2023-04-13 17:23:50 +02:00
Philip H
314dc407d6
GHA: suppress git clone output
Follow-up: 8203aa6ed4

Closes #10949
2023-04-13 17:22:13 +02:00
Stefan Eissing
f67d6a6888
cf-socket: remove dead code discovered by PVS
Closes #10960
2023-04-13 17:20:29 +02:00
Daniel Stenberg
8b8d7acc6e
http: skip a double NULL assign
and also use a local variable to shorten the long names and increase
readability in the function. Pointed out by PVS.

Ref: #10929
Closes #10950
2023-04-13 17:16:43 +02:00
Daniel Stenberg
51b615a3eb
mime: skip NULL assigns after Curl_safefree()
Pointed out by PVS.

Ref: #10929
Closes #10947
2023-04-13 17:15:08 +02:00
Daniel Stenberg
aa3ee0a13a
rtsp: skip NULL assigns after Curl_safefree()
... since this is a macro that assigns NULL itself. Pointed out by PVS.

Ref: #10929
Closes #10946
2023-04-13 17:14:03 +02:00
Daniel Stenberg
d50045509c
smb: remove double assign
The same value is assigned the same value already a few lines above.
Pointed out by PVS.

Ref: #10929
Closes #10945
2023-04-13 17:12:55 +02:00
Daniel Stenberg
19c36f5ca3
transfer: skip extra assign
The 'result' variable already contains CURLE_OK at this point, no use in
setting it again. Pointed out by PVS.

Ref: #10929
Closes #10944
2023-04-13 14:39:08 +02:00
Daniel Stenberg
3f1d89ed24
urlapi: skip a pointless assign
It stores a null byte after already having confirmed there is a null
byte there. Detected by PVS.

Ref: #10929
Closes #10943
2023-04-13 14:36:28 +02:00
Philip H
8203aa6ed4
GHA: suppress git clone output
Closes #10939
2023-04-13 08:56:48 +02:00
Stefan Eissing
5126cbda00
tests: make test_12_01 a bit more forgiving on connection counts 2023-04-13 08:46:53 +02:00
Stefan Eissing
24726a437e
cf-socket: add socket recv buffering for most tcp cases
- use bufq as recv buffer, also for Windows pre-receive handling
- catch small reads followed by larger ones in a single socket
  call. A common pattern on TLS connections.

Closes #10787
2023-04-13 08:46:38 +02:00
Daniel Stenberg
4cfa5bcc9a
urlapi: cleanups
- move host checks together
- simplify the scheme parser loop and the end of host name parser
- avoid itermediate buffer storing in multiple places
- reduce scope for several variables
- skip the Curl_dyn_tail() call for speed
- detect IPv6 earlier and skip extra checks for such hosts
- normalize directly in dynbuf instead of itermediate buffer
- split out the IPv6 parser into its own funciton
- call the IPv6 parser directly for ipv6 addresses
- remove (unused) special treatment of % in host names
- junkscan() once in the beginning instead of scattered
- make junkscan return error code
- remove unused query management from dedotdotify()
- make Curl_parse_login_details use memchr
- more use of memchr() instead of strchr() and less strlen() calls
- make junkscan check and return the URL length

An optimized build runs one of my benchmark URL parsing programs ~41%
faster using this branch. (compared against the shipped 7.88.1 library
in Debian)

Closes #10935
2023-04-13 08:41:40 +02:00
Josh McCullough
233b4e4589
http2: fix typo in infof() call
Closes #10940
2023-04-13 08:39:56 +02:00
Daniel Stenberg
ca05e1afba
noproxy: pointer to local array 'hostip' is stored outside scope
Ref: #10929
Closes #10933
2023-04-12 09:00:20 +02:00
Stefan Eissing
dd8130406e
connect: fix https connection setup to treat ssl_mode correctly
- for HTTPS protocol, a disabled ssl should never be acceptables.

Closes #10934
2023-04-12 08:51:14 +02:00
Douglas R. Reno
fb08dd9c90
CMakeLists.txt: fix typo for Haiku detection
Closes #10937
2023-04-12 08:50:18 +02:00
Dan Fandrich
8e75c4f978 pathhelp: use the cached $use_cygpath when available 2023-04-11 14:55:32 -07:00
Dan Fandrich
def8dc8071 runtests: eliminate unneeded variable 2023-04-11 14:55:32 -07:00
Dan Fandrich
a3605d6a56 runtests: make the # of server start attempts a constant 2023-04-11 14:55:32 -07:00
Dan Fandrich
44256902f3 runtests: on startup failure call displaylogs only in serverfortest
This reduces the number of calls spread throughout the code.

Ref: #10818
Closes #10919
2023-04-11 14:55:32 -07:00
Dan Fandrich
f82a38e0f3 runtests: return an error code with startservers()
The code indicates the kind of failure encountered in starting a server,
which can be used by the caller to tailor the user experience.

Ref: #10818
2023-04-11 14:55:32 -07:00
Dan Fandrich
19b062a492 runtests: abort early if runpingpongserver is given a bad server type 2023-04-11 14:55:32 -07:00
Dan Fandrich
f25627014e runtests: don't use the SMB server verification time as reference
%FTPTIME2 and %FTPTIME3 should be set by the FTP server only, for
consistency.
2023-04-11 14:55:32 -07:00
Dan Fandrich
d39db81192 tests: factor out the test server management code
This now lives in servers.pm with some configuration variables moved to
globalconfig.pm

Ref: #10818
2023-04-11 14:55:32 -07:00
Dan Fandrich
a2ce734e28 runtests: remove an inappropriate use of runclientoutput
This function is intended for running client code, not servers.
2023-04-11 14:55:32 -07:00