Commit Graph

29633 Commits

Author SHA1 Message Date
Frank Gevaerts
99f72c01c2
contributors.sh: actually use $CURLWWW instead of just setting it.
The script was all set up for flexibility where curl-www is elsewhere in
the filesystem, but then hard-coded ../curl-www anyway...

Closes #10064
2022-12-09 16:50:23 +01:00
Daniel Stenberg
f0b374f662
KNOWN_BUGS: remove items not considered bugs any more
- CURL_GLOBAL_SSL

This option was changed in libcurl 7.57.0 and clearly it has not caused
too many issues and a lot of time has passed.

- Store TLS context per transfer instead of per connection

This is a possible future optimization. One that is much less important
and interesting since the added support for CA caching.

- Microsoft telnet server

This bug was filed in May 2007 against curl 7.16.1 and we have not
received further reports.

- active FTP over a SOCKS

Actually, proxies in general is not working with active FTP mode. This
is now added in proxy documentation.

- DICT responses show the underlying protocol

curl still does this, but since this is now an established behavior
since forever we cannot change it easily and adding an option for it
seems crazy as this protocol is not so little its not worth it. Let's
just live with it.

- Secure Transport disabling hostname validation also disables SNI

This is an already documented restriction in Secure Transport.

- CURLOPT_SEEKFUNCTION not called with CURLFORM_STREAM

The curl_formadd() function is marked and documented as deprecated. No
point in collecting bugs for it. It should not be used further.

- STARTTRANSFER time is wrong for HTTP POSTs

After close source code inspection I cannot see how this is true or that
there is any special treatment for different HTTP methods. We also have
not received many further reports on this, making me strongly suspect
that this is no (longer an) issue.

- multipart formposts file name encoding

The once proposed RFC 5987-encoding is since RFC 7578 documented as MUST
NOT be used. The since then implemented MIME API allows the user to set
the name on their own and can thus provide it encoded as it wants.

- DoH is not used for all name resolves when enabled

It is questionable if users actually want to use DoH for interface and
FTP port name resolving. This restriction is now documented and we
advice users against using name resolving at all for these functions.

Closes #10043
2022-12-09 13:55:01 +01:00
Daniel Stenberg
da8e215f6c
CURLOPT_COOKIEFILE.3: advice => advise
Closes #10063

Reviewed-by: Daniel Gustafsson
2022-12-09 10:51:44 +01:00
Daniel Gustafsson
fdafa0ef58 curl.h: reword comment to not use deprecated option
CURLOPT_INFILE was replaced by CURLOPT_READDATA in 7.9.7,  reword the
comment mentioning it to make code grepping easier as well as improve
the documentation.

Closes: #10062
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2022-12-09 09:41:24 +01:00
Ryan Schmidt
ac4554870d
system.h: fix socklen_t, curl_off_t, long long for Classic Mac OS
Change "__MWERKS__" to "macintosh". When this block was originally added
in 3ac6929 it was probably intended to handle classic Mac OS since the
previous classic Mac OS build procedure for curl (which was removed in
bf327a9) used Metrowerks CodeWarrior.

But there are other classic Mac OS compilers, such as the MPW compilers,
that were not handled by this case. For classic Mac OS,
CURL_TYPEOF_CURL_SOCKLEN_T needs to match what's provided by the
third-party GUSI library, which does not vary by compiler.

Meanwhile CodeWarrior works on platforms other than classic Mac OS, and
they may need different definitions. Separate blocks could be added
later for any of those platforms that curl doesn't already support.

Closes #10049
2022-12-09 08:21:15 +01:00
Ryan Schmidt
b8e605adef
vms: remove SIZEOF_SHORT
The rest of SIZEOF_SHORT was removed in d48dd15.

See #9291
Closes #10061
2022-12-09 08:18:04 +01:00
Daniel Gustafsson
76b73c7468 tool_formparse: avoid clobbering on function params
While perfectly legal to do, clobbering function parameters and using
them as local variables is confusing at best and rarely improves code
readability.  Fix by using a local variable instead, no functionality
is changed.

This also renames the parameter from data to mime_data since the term
data is (soft) reserved for the easy handle struct.

Closes: #10046
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2022-12-08 23:45:18 +01:00
Daniel Gustafsson
60453483b5 noproxy: guard against empty hostnames in noproxy check
When checking for a noproxy setting we need to ensure that we get
a hostname passed in. If there is no hostname then there cannot be
a matching noproxy rule for it by definition.

Closes: #10057
Reported-by: Geeknik Labs
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2022-12-08 23:37:32 +01:00
Daniel Stenberg
c8d24d4e77
c-hyper: CONNECT respones are not server responses
Together with d31915a8db it makes test 265 run fine.

Fixes #8853
Assisted-by: Prithvi MK
Assisted-by: Sean McArthur
Closes #10060
2022-12-08 23:36:23 +01:00
Daniel Stenberg
d31915a8db
test265: Use "connection: keep-alive" response header
When it answers as HTTP/1.0, so that clients (hyper) knows properly that
the connection remains intact.
2022-12-08 16:47:43 +01:00
Daniel Stenberg
3f06b423c4
RELEASE-NOTES: synced 2022-12-08 14:55:39 +01:00
Stefan Eissing
b42156b825
cfilter: improve SSL connection checks
- fixes `Curl_ssl_cf_get_ssl()` to detect also the first filter instance
  as ssl (refs #10053)

- replaces `Curl_ssl_use()` with the correct `Curl_conn_is_ssl()`

Closes #10054
Fixes #10053

Reported-by: Patrick Monnerat
2022-12-08 14:27:06 +01:00
Daniel Stenberg
42bcca4af0
runtests: silence nghttpx errors
Also, move the output of the nghttpx_h3 info to the general "Env:" line
in the test output header.

Reported-by: Marcel Raad
Ref: ca15b7512e (commitcomment-92015094)
Closes #10044
2022-12-08 11:02:11 +01:00
Ryan Schmidt
33f1f4f795 config-mac: define HAVE_SYS_IOCTL_H
This is needed to compile nonblock.c on classic Mac OS with Grand
Unified Socket Interface (GUSI) because nonblock.c uses FIONBIO which is
defined in <sys/filio.h> which is included by <sys/ioctl.h>.

Ref: https://sourceforge.net/projects/gusi/

Closes https://github.com/curl/curl/pull/10042
2022-12-07 15:56:43 -05:00
Philip H
66fabeea2a CI: Change FreeBSD image from 12.3 to 12.4
Ref: https://www.phoronix.com/news/FreeBSD-12.4-Released

Closes https://github.com/curl/curl/pull/10051
2022-12-07 15:46:31 -05:00
Ryan Schmidt
5c68fd7c53 test1421: fix typo
Closes https://github.com/curl/curl/pull/10055
2022-12-07 14:44:49 -05:00
Jay Satiro
fe3463eba7 build: assume errno.h is always available
- Remove errno.h detection from all build configurations.

errno.h is a standard header according to C89.

Closes https://github.com/curl/curl/pull/9986
2022-12-07 14:41:09 -05:00
Jay Satiro
57d3477e77 build: assume assert.h is always available
- Remove assert.h detection from all build configurations.

assert.h is a standard header according to C89.

I had proposed this several years ago as part of a larger change that
was abandoned.

Ref: https://github.com/curl/curl/issues/1237#issuecomment-277500720

Closes https://github.com/curl/curl/pull/9985
2022-12-07 14:30:32 -05:00
Philip H
7865d09e4c
CI: LGTM.com will be shut down in December 2022
Closes #10052
2022-12-07 13:19:11 +01:00
Daniel Stenberg
cbaa80ae20
mailmap: Andy Alt 2022-12-06 23:23:13 +01:00
andy5995
68ffb4063d misc: Fix incorrect spelling
Fix various uses of connnect by replacing them with connect.

Closes: #10045
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2022-12-06 23:18:23 +01:00
Stefan Eissing
2d3e20a2fc
wolfssl: remove special BIO return code handling
- rely solely on the retry flag in BIO, similar to OpenSSL vtls
  implementation.

Ref: https://github.com/curl/curl/pull/10021#issuecomment-1336147053

Closes #10033
2022-12-06 11:08:12 +01:00
Daniel Stenberg
5ec759247a
openssl: return -1 on error in the BIO callbacks
BIO_read and BIO_write return negative numbers on error, including
retryable ones. A regression from 55807e6. Both branches should be
returning -1.

The APIs are patterned after POSIX read and write which, similarly,
return -1 on errors, not zero, with EAGAIN treated as an error.

Bug: https://github.com/curl/curl/issues/10013#issuecomment-1335308146
Reported-by: David Benjamin
Closes #10021
2022-12-06 09:50:29 +01:00
Ryan Schmidt
0ed8ff2d37
config-mac: remove HAVE_SYS_SELECT_H
When compiling for classic Mac OS with GUSI, there is no sys/select.h.
GUSI provides the "select" function prototype in sys/time.h.

Closes #10039
2022-12-06 09:43:03 +01:00
Ryan Schmidt
82b3481309
setup: do not require __MRC__ defined for Mac OS 9 builds
Partially reverts "somewhat protect Mac OS X users from using Mac OS 9
config file", commit 62519bfe05.

Do things that are specific to classic Mac OS (i.e. include config-mac.h
in curl_setup.h and rename "main" to "curl_main" in tool_setup.h) when
only "macintosh" is defined. Remove the additional condition that
"__MRC__" should be defined since that would only be true with the MPW
MrC compiler which prevents the use of other reasonable compilers like
the MPW SC compiler and especially the Metrowerks CodeWarrior compilers.
"macintosh" is only defined by classic Mac OS compilers so this change
should not affect users of Mac OS X / OS X / macOS / any other OS.

Closes #10037
2022-12-06 09:35:47 +01:00
Ryan Schmidt
d502270eb2
curl.h: name all public function parameters
Most public function parameters already have names; this adds those
that were missing.

Closes #10036
2022-12-06 09:29:21 +01:00
Andy Alt
8fd218408d
docs/examples: spell correction ('Retrieve')
Closes #10040
2022-12-06 09:23:19 +01:00
Daniel Stenberg
f3fc089deb
unit1302: slightly extended
To test more base64 decoding
2022-12-06 08:57:04 +01:00
Daniel Stenberg
c6f602c93f
base64: faster base64 decoding
- by using a lookup table instead of strchr()
- by doing full quantums first, then padding

Closes #10032
2022-12-06 08:57:04 +01:00
mickae1
8fe33a9661
libssh2: return error when ssh_hostkeyfunc returns error
return CURLE_PEER_FAILED_VERIFICATION if verification with the callback
return a result different than CURLKHMATCH_OK

Closes #10034
2022-12-06 00:15:18 +01:00
Viktor Szakats
2b584fffce
Makefile.mk: improve a GNU Make hack [ci skip]
Replace the hack of using `$() ` to represent a single space. The new
method silences the `--warn-undefined-variables` debug warning and it's
also a better-known form of solving this problem.

Reviewed-by: Jay Satiro
Closes #10031
2022-12-05 14:31:32 +00:00
Daniel Stenberg
6b30f28875
tests/unit/.gitignore: ignore all unit + 4 digits files 2022-12-05 14:58:06 +01:00
Daniel Stenberg
fc02a78081
base64: encode without using snprintf
For speed. In some tests, this approch is 29 times faster!

Closes #10026
2022-12-05 11:33:34 +01:00
Daniel Stenberg
fa467a2fa9
base64: better alloc size
The previous algorithm allocated more bytes than necessary.

Suggested-by: xtonik on github
Fixes #10024
Closes #10025
2022-12-05 08:11:24 +01:00
Ryan Schmidt
29bb9ba431
config-mac: fix typo: size_T -> size_t
Both MPW and CodeWarrior compilers complained about this.

Closes #10029
2022-12-05 08:10:04 +01:00
Daniel Stenberg
f8ad07c031
RELEASE-NOTES: synced 2022-12-03 11:47:27 +01:00
Jakub Zakrzewski
52279c8e5d
CMake: fix build with CURL_USE_GSSAPI
CMAKE_*_LINKER_FLAGS must be a string but GSS_LINKER_FLAGS is a list, so
we need to replace semicolons with spaces when setting those.

Fixes #9017
Closes #1022
2022-12-02 23:42:40 +01:00
Max Dymond
a4fd257c1b ci: Reuse fuzzing snippet from curl-fuzzer project 2022-12-02 22:22:06 +00:00
Diogo Teles Sant'Anna
a2f5a4ca6f
GHA: clarify workflows permissions, set least possible privilege
Set top-level permissions to None on all workflows, setting per-job
permissions. This avoids that new jobs inherit unwanted permissions.

Discussion: https://curl.se/mail/lib-2022-11/0028.html

Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>

Closes #9928
2022-12-02 23:13:54 +01:00
Viktor Szakats
8fc2423338
Makefile.mk: address minor issues
- Fix `NROFF` auto-detection with certain shell/make-build combinations:

  When a non-MSYS2 GNU Make runs inside an MSYS2 shell, Make executes
  the detection command as-is via `CreateProcess()`. It fails because
  `command` is an `sh` built-in. Ensure to explicitly invoke the shell.

- Initialize user-customizable variables:

  Silences a list of warnings when running GNU Make with the option
  `--warn-undefined-variables`. Another benefit is that it's now easy
  to look up all user-customizable `Makefile.mk` variables by grepping
  for ` ?=` in the curl source tree.

  Suggested-by: Gisle Vanem
  Ref: https://github.com/curl/curl/pull/9764#issuecomment-1330674433

- Fix `MKDIR` invocation:

  Avoid a warning and potential issue in envs without forward-slash
  support.

Closes #10000
2022-12-02 15:20:41 +00:00
Rob de Wit
73c4f9696a
curl_get_line: allow last line without newline char
improve backwards compatibility

Test 3200 verifies

Closes #9973
2022-12-02 11:28:43 +01:00
Daniel Stenberg
73d6f41489
cookie: open cookie jar as a binary file
On Windows there is a difference and for text files, ^Z means end of
file which is not desirable.

Ref: #9973
Closes #10017
2022-12-02 10:07:41 +01:00
Daniel Stenberg
3dfb6aeabb
runtests: only do CRLF replacements for hyper if it is HTTP
Closes #10016
2022-12-01 21:19:40 +01:00
Stefan Eissing
5c27f6c452
openssl: fix for BoringSSL BIO result interpretation mixups
Reported-by: Robin Marx
Fixes #10013
Closes #10015
2022-12-01 18:27:27 +01:00
Max Dymond
4c712a1b25 ci: Remove zuul fuzzing job as it's superseded by CIFuzz 2022-12-01 16:00:11 +00:00
Daniel Stenberg
2f34a7347f
runtests: do CRLF replacements per section only
The `crlf="yes"` attribute and "hyper mode" are now only applied on a
subset of dedicated sections: data, datacheck, stdout and protocol.

Updated test 2500 accordingly.

Also made test1 use crlf="yes" for <protocol>, mostly because it is
often used as a template test case. Going forward, using this attribute
we should be able to write test cases using linefeeds only and avoid
mixed line ending encodings.

Follow-up to ca15b7512e

Fixes #10009
Closes #10010
2022-12-01 15:04:23 +01:00
Stefan Eissing
27ec767ebd
gnutls: use common gnutls init and verify code for ngtcp2
Closes #10007
2022-12-01 10:57:36 +01:00
Baitinq on github
b8ffb02e84
aws_sigv4: fix typos in aws_sigv4.c
Closes #10008
2022-12-01 08:34:37 +01:00
Kenneth Myhra
610b96c6b3
curl.h: include <sys/select.h> on SerenityOS
Closes #10006
2022-11-30 15:37:44 +01:00
Daniel Stenberg
39bbd1cafb
openssl: prefix errors with '[lib]/[version]: '
To help users understand where this (cryptic) error message comes from.

Suggested-by: Philip Sanetra
Ref: #10002
Closes #10004
2022-11-30 14:05:57 +01:00