Commit Graph

29562 Commits

Author SHA1 Message Date
Daniel Stenberg
b151faa083
lib1560: add some basic IDN host name tests
Closes #10094
2022-12-15 22:57:08 +01:00
Daniel Stenberg
cc0aaf6e82
idn: rename the files to idn.[ch] and hold all IDN functions
Closes #10094
2022-12-15 22:56:58 +01:00
Daniel Stenberg
301812bec2
idn: remove Curl_win32_ascii_to_idn
It was not used. Introduce a new IDN header for the prototype(s).

Closes #10094
2022-12-15 22:56:52 +01:00
Daniel Stenberg
590ecb6de5
RELEASE-NOTES: synced 2022-12-15 16:35:18 +01:00
Daniel Stenberg
6f40703ba0
curl_url_get.3: remove spurious backtick
Put there by mistake.

Follow-up from 9a8564a92

Closes #10101
2022-12-15 15:56:26 +01:00
Daniel Stenberg
50e781d3ec
socks: fix infof() flag for outputing a char
It used to be a 'long', %lu is no longer correct.

Follow-up to 57d2d9b6be
Detected by Coverity CID 1517663

Closes #10100
2022-12-15 15:52:17 +01:00
Daniel Stenberg
50750d097a
ssl-reqd.d: clarify that this is for upgrading connections only
Closes #10093
2022-12-15 14:36:37 +01:00
Daniel Stenberg
af0924210b
curl_url_set.3: document CURLU_DISALLOW_USER
Closes #10099
2022-12-15 12:38:57 +01:00
Daniel Stenberg
5de6848f10
cmake: set the soname on the shared library
Set SONAME and VERSION for platforms we think this works on. Remove
issue from KNOWN_BUGS.

Assisted-by: Jakub Zakrzewski

Closes #10023
2022-12-15 12:36:25 +01:00
Daniel Stenberg
614f78131a
tool_paramhlp: free the proto strings on exit
And also make sure that repeated use of the options free the previous
string before it stores a new.

Follow-up from e6f8445ede

Closes #10098
2022-12-15 08:28:38 +01:00
Daniel Stenberg
24d494c264
tool_cfgable: free the ssl_ec_curves on exit
Follow-up to ede125b7b

Closes #10097
2022-12-15 08:26:04 +01:00
Daniel Stenberg
c20b35ddae
urlapi: reject more bad letters from the host name: &+()
Follow-up from eb0167ff7d

Extend test 1560 to verify

Closes #10096
2022-12-15 08:23:48 +01:00
Daniel Stenberg
b740f152a8
altsvc: fix rejection of negative port numbers
Follow-up to ac612dfeee

strtoul() accepts a leading minus so better make sure there is none

Extended test 356 somewhat to use a huge negative 64 bit number that
otherwise becomes a low positive number.

Closes #10095
2022-12-15 08:21:20 +01:00
Daniel Stenberg
57d2d9b6be
lib: use size_t or int etc instead of longs
Since long is not using a consistent data size in curl builds, making it
often "waste" 32 bits.

Closes #10088
2022-12-14 12:31:01 +01:00
Daniel Stenberg
58f55ba57e
azure: use "unversioned" clang and clang-tools for scanbuild job
To make it less fragile

Closes #10092
2022-12-14 12:25:18 +01:00
Daniel Gustafsson
6b19247e79 x509asn1: avoid freeing unallocated pointers
When utf8asn1str fails there is no allocation returned, so freeing
the return pointer in **to is at best a no-op and at worst a double-
free bug waiting to happen. The current coding isn't hiding any such
bugs but to future proof, avoid freeing the return value pointer iff
the function failed.

Closes: #10087
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2022-12-14 10:14:27 +01:00
Emil Engler
a20f99de74 curl_url_set.3: fix typo
Closes: #10089
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2022-12-13 20:29:37 +01:00
Daniel Stenberg
86b4b66c54
test2304: verify websocket handling when connection is closed 2022-12-13 15:13:09 +01:00
Daniel Stenberg
b716511f0f
server/sws: if asked to close connection, skip the websocket handling 2022-12-13 15:13:09 +01:00
Daniel Stenberg
734c1f8909
ws: if no connection is around, return error
- curl_ws_send returns CURLE_SEND_ERROR if data->conn is gone

- curl_ws_recv returns CURLE_GOT_NOTHING on connection close

- curl_ws_recv.3: mention new return code for connection close + example
  embryo

Closes #10084
2022-12-13 15:13:03 +01:00
Emil Engler
845f020ea5
docs: extend the dump-header documentation
This commit extends the documentation of the --dump-header command-line
option to reflect the behavior introduced in 8b1e5df7.

See #10079
Closes #10085
2022-12-13 15:04:31 +01:00
Daniel Stenberg
d4709fa4b7
RELEASE-NOTES: synced 2022-12-12 09:15:50 +01:00
Daniel Stenberg
e6b3725716
styled-output.d: this option does not work on Windows
Reported-by: u20221022 on github

Fixes #10082
Closes #10083
2022-12-12 09:07:32 +01:00
Emil Engler
8b1e5df73d
tool: determine the correct fopen option for -D
This commit fixes a bug in the dump-header feature regarding the
determination of the second fopen(3) option.

Reported-by: u20221022 on github

See #4753
See #4762
Fixes #10074
Closes #10079
2022-12-12 09:04:51 +01:00
MonkeybreadSoftware
1a88b6b653 docs/curl_ws_send: Fixed typo in websocket docs
Replace as with is in relevant sentences.

Closes: #10081
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2022-12-11 20:52:12 +01:00
Prithvi MK
b80dae232e
c-hyper: fix multi-request mechanism
It makes test 565 run fine.

Fixes #8896
Closes #10080
Assisted-by: Daniel Stenberg
2022-12-11 14:15:53 +01:00
andy5995
fd2c9e5e83
page-header: grammar improvement (display transfer rate)
Closes #10068
2022-12-11 12:36:36 +01:00
andy5995
d95a575de3
docs/DEPRECATE.md: grammar improvement and sp correction
The main thing I wanted to do was fix the spelling of "spent", but I
think this rewording improves the flow of the paragraph.

Closes #10067
2022-12-11 12:35:33 +01:00
Boris Verkhovskiy
4ac64eadf6
tool_cfgable: make socks5_gssapi_nec a boolean
Closes #10078
2022-12-11 12:34:19 +01:00
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