Commit Graph

1138 Commits

Author SHA1 Message Date
Daniel Stenberg
0cafff2e5f
RELEASE-NOTES: synced
Starting the journey towards 8.0.0
2023-02-20 23:54:13 +01:00
Daniel Stenberg
8161b8fb79
RELEASE-NOTES: synced
bumped to 7.88.1
2023-02-15 23:49:01 +01:00
Daniel Stenberg
2aed8e179f
curl/websockets.h: extend the websocket frame struct 2023-02-10 08:28:58 +01:00
Jay Satiro
3feb6b46a2 system.h: assume OS400 is always built with ILEC compiler
Prior to this change the OS400 types were only defined when __ILEC400__.
That symbol is only defined by IBM's C compiler and not their C++
compiler, which led to missing types when users on OS400 would compile a
C++ application that included curl.

The IBM C and C++ compilers are the only native compilers on the
platform.

Assisted-by: Jon Rumsey
Reported-by: John Sherrill

Fixes https://github.com/curl/curl/issues/10305
Closes https://github.com/curl/curl/pull/10329
2023-01-21 15:08:23 -05:00
Daniel Stenberg
a56d2b0b94
curl.h: add CURL_HTTP_VERSION_3ONLY
As the previous CURL_HTTP_VERSION_3 option gets a slightly altered meaning.

Closes #10264
2023-01-12 16:17:55 +01:00
Daniel Stenberg
5cb63da771
curl.h: allow up to 10M buffer size
Bump the limit from 512K. There might be reasons for applications using
h3 to set larger buffers and there is no strong reason for curl to have
a very small maximum.

Ref: https://curl.se/mail/lib-2023-01/0026.html

Closes #10256
2023-01-08 20:54:48 +01:00
Daniel Stenberg
2bc1d775f5
copyright: update all copyright lines and remove year ranges
- they are mostly pointless in all major jurisdictions
- many big corporations and projects already don't use them
- saves us from pointless churn
- git keeps history for us
- the year range is kept in COPYING

checksrc is updated to allow non-year using copyright statements

Closes #10205
2023-01-03 09:19:21 +01:00
Daniel Stenberg
fc9f22b46e
curl.h: mark CURLSSLBACKEND_MESALINK as deprecated
Follow-up since 223f26c28a

Deprecated since 7.82.0

Closes #10189
2023-01-01 15:42:20 +01:00
Daniel Stenberg
076a2f6291
share: add sharing of HSTS cache among handles
Closes #10138
2022-12-27 15:22:01 +01:00
Daniel Stenberg
901392cbb7
urlapi: add CURLU_PUNYCODE
Allows curl_url_get() get the punycode version of host names for the
host name and URL parts.

Extend test 1560 to verify.

Closes #10109
2022-12-26 23:29:23 +01:00
Patrick Monnerat
e2aed00430
typecheck: accept expressions for option/info parameters
As expressions can have side effects, evaluate only once.

To enable deprecation reporting only once, get rid of the __typeof__
use to define the local temporary variable and use the target type
(CURLoption/CURLINFO). This also avoids multiple reports on type
conflicts (if some) by the curlcheck_* macros.

Note that CURLOPT_* and CURLINFO_* symbols may be deprecated, but not
their values: a curl_easy_setopt call with an integer constant as option
will never report a deprecation.

Reported-by: Thomas Klausner
Fixes #10148
Closes #10149
2022-12-26 10:04:55 +01:00
Daniel Stenberg
5d0cad97a6
RELEASE_NOTES: synced
bumped version for new cycle
2022-12-21 15:38:50 +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
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
Kenneth Myhra
610b96c6b3
curl.h: include <sys/select.h> on SerenityOS
Closes #10006
2022-11-30 15:37:44 +01:00
Daniel Stenberg
dbd74baf78
include/curl/curl.h: bump the deprecated requirements to gcc 6.1
Reported-by: Michael Kaufmann
Fixes #9917
Closes #9987
2022-11-28 13:13:53 +01:00
Alexandre Ferrieux
49798cac83
CURLOPT_QUICK_EXIT: don't wait for DNS thread on exit
Fixes #2975
Closes #9147
2022-11-18 00:17:27 +01:00
Daniel Stenberg
bbb36409de
include/curl/curl.h: bump the deprecated requirements to gcc 5.3
Reported-by: Stephan Guilloux
Fixes #9917
Closes #9918
2022-11-15 23:09:31 +01:00
Patrick Monnerat
6967571bf2
lib: feature deprecation warnings in gcc >= 4.3
Add a deprecated attribute to functions and enum values that should not
be used anymore.
This uses a gcc 4.3 dialect, thus is only available for this version of
gcc and newer. Note that the _Pragma() keyword is introduced by C99, but
is available as part of the gcc dialect even when compiling in C89 mode.

It is still possible to disable deprecation at a calling module compile
time by defining CURL_DISABLE_DEPRECATION.

Gcc type checking macros are made aware of possible deprecations.

Some testing support Perl programs are adapted to the extended
declaration syntax.

Several test and unit test C programs intentionally use deprecated
functions/options and are annotated to not generate a warning.

New test 1222 checks the deprecation status in doc and header files.

Closes #9667
2022-11-15 10:57:29 +01:00
Patrick Monnerat
e780aae77a
version: add a feature names array to curl_version_info_data
Field feature_names contains a null-terminated sorted array of feature
names. Bitmask field features is deprecated.

Documentation is updated. Test 1177 and tests/version-scan.pl updated to
match new documentation format and extended to check feature names too.

Closes #9583
2022-11-14 09:18:53 +01:00
Jay Satiro
6d75115406 lib: add CURL_WRITEFUNC_ERROR to signal write callback error
Prior to this change if the user wanted to signal an error from their
write callbacks they would have to use logic to return a value different
from the number of bytes (nmemb) passed to the callback. Also, the
inclination of some users has been to just return 0 to signal error,
which is incorrect as that may be the number of bytes passed to the
callback.

To remedy this the user can now return CURL_WRITEFUNC_ERROR instead.

Ref: https://github.com/curl/curl/issues/9873

Closes https://github.com/curl/curl/pull/9874
2022-11-10 03:13:58 -05:00
Hirotaka Tagawa
39538fcc4e
headers: add endif comments
Closes #9853
2022-11-09 00:36:33 +01:00
Daniel Stenberg
f96d375a5b
RELEASE-NOTES: synced
Bumped version to 7.87.0
2022-11-08 10:29:17 +01:00
Michael Drake
1fdca35ddd
curl.h: add CURLOPT_CA_CACHE_TIMEOUT option
Adds a new option to control the maximum time that a cached
certificate store may be retained for.

Currently only the OpenSSL backend implements support for
caching certificate stores.

Closes #9620
2022-11-08 10:06:12 +01:00
Daniel Stenberg
52cc4a85fd
style: use space after comment start and before comment end
/* like this */

/*not this*/

checksrc is updated accordingly

Closes #9828
2022-10-30 22:31:29 +01:00
Randall S. Becker
1e52285335 system.h: support 64-bit curl_off_t for NonStop 32-bit
- Correctly define curl_off_t on NonStop (ie __TANDEM) ia64 and x86 for
  32-bit builds.

Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca>

Closes https://github.com/curl/curl/pull/9817
2022-10-27 16:55:44 -04:00
Ayesh Karunaratne
4484270afc
misc: typo and grammar fixes
- Replace `Github` with `GitHub`.
- Replace `windows` with `Windows`
- Replace `advice` with `advise` where a verb is used.
- A few fixes on removing repeated words.
- Replace `a HTTP` with `an HTTP`

Closes #9802
2022-10-27 10:01:30 +02:00
Daniel Stenberg
6092eaa3e6
RELEASE-NOTES: synced
And bumped version to 7.86.1 for now
2022-10-26 11:23:41 +02:00
Daniel Stenberg
e3f335148a
websockets: remodeled API to support 63 bit frame sizes
curl_ws_recv() now receives data to fill up the provided buffer, but can
return a partial fragment. The function now also get a pointer to a
curl_ws_frame struct with metadata that also mentions the offset and
total size of the fragment (of which you might be receiving a smaller
piece). This way, large incoming fragments will be "streamed" to the
application. When the curl_ws_frame struct field 'bytesleft' is 0, the
final fragment piece has been delivered.

curl_ws_recv() was also adjusted to work with a buffer size smaller than
the fragment size. (Possibly needless to say as the fragment size can
now be 63 bit large).

curl_ws_send() now supports sending a piece of a fragment, in a
streaming manner, in addition to sending the entire fragment in a single
call if it is small enough. To send a huge fragment, curl_ws_send() can
be used to send it in many small calls by first telling libcurl about
the total expected fragment size, and then send the payload in N number
of separate invokes and libcurl will stream those over the wire.

The struct curl_ws_meta() returns is now called 'curl_ws_frame' and it
has been extended with two new fields: *offset* and *bytesleft*. To help
describe the passed on data chunk when a fragment is delivered in many
smaller pieces.

The documentation has been updated accordingly.

Closes #9636
2022-10-07 12:50:58 +02:00
Daniel Stenberg
7295e62c66
curl.h: fix mention of wrong error code in comment
The same error and comment were also used and is now corrected in
CURLOPT_SSH_KEYFUNCTION.3
2022-09-22 09:43:39 +02:00
Daniel Stenberg
307b7543ea
misc: null-terminate
Make use of this term consistently.

Closes #9527
2022-09-17 23:19:29 +02:00
Daniel Stenberg
f71b79feb5
include/curl/websockets.h: add extern "C" for C++
Reported-by: n0name321 on github
Fixes #9509
Closes #9510
2022-09-15 11:18:37 +02:00
Daniel Stenberg
70c8ce5ad0
curl/websockets.h: remove leftover bad typedef
Just a leftover trace of a development thing that did not stay like
that.

Reported-by: Marc Hörsken
Fixes #9465
Cloes #9466
2022-09-10 23:09:38 +02:00
Daniel Stenberg
eebfa3279d
curl_ws_meta: initial implementation 2022-09-09 15:11:14 +02:00
Daniel Stenberg
07cb887ed3
curl_ws_meta.3: added docs 2022-09-09 15:11:14 +02:00
Daniel Stenberg
664249d095
ws: initial websockets support
Closes #8995
2022-09-09 15:11:14 +02:00
Jay Satiro
9c822a9994 header: define public API functions as extern c
Prior to this change linker errors would occur if curl_easy_header or
curl_easy_nextheader was called from a C++ unit.

Bug: https://github.com/curl/curl/issues/9424#issuecomment-1238818007
Reported-by: Andrew Lambert

Closes https://github.com/curl/curl/pull/9446
2022-09-08 11:54:32 -04:00
Daniel Stenberg
5390c9d77a
RELEASE-NOTES: synced
And bump to 7.86.0 for the pending next release
2022-09-07 14:18:28 +02:00
Daniel Stenberg
e08c82f046
RELEASE-NOTES: synced
and bump the tentative next release version to 7.85.1
2022-09-04 23:13:34 +02:00
Viktor Szakats
c9061f242b
misc: spelling fixes
Found using codespell 2.2.1.

Also delete the redundant protocol designator from an archive.org URL.

Reviewed-by: Daniel Stenberg
Closes #9403
2022-08-31 14:31:01 +00:00
Tobias Nygren
e761a1d1d9
curl.h: include <sys/select.h> on SunOS
It is needed for fd_set to be visible to downstream consumers that use
<curl/multi.h>. Header is known to exist at least as far back as Solaris
2.6.

Closes #9329
2022-08-17 13:25:02 +02:00
Daniel Stenberg
2b2a47eb38
RELEASE-NOTES: synced
Bumped to 7.85.0
2022-07-05 10:39:52 +02:00
Daniel Stenberg
be43dd600a
CURLOPT_SERVER_RESPONSE_TIMEOUT: the new name
Starting now, CURLOPT_FTP_RESPONSE_TIMEOUT is the alias instead of the
other way around.

Since 7.20.0, CURLOPT_SERVER_RESPONSE_TIMEOUT has existed as an alias
but since the option is for more protocols than FTP the more "correct"
version of the option is the "server" one so now we switch.

Closes #9104
2022-07-05 10:16:05 +02:00
Daniel Stenberg
e6f8445ede
setopt: add CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR
... as replacements for deprecated CURLOPT_PROTOCOLS and
CURLOPT_REDIR_PROTOCOLS as these new ones do not risk running into the
32 bit limit the old ones are facing.

CURLINFO_PROTCOOL is now deprecated.

The curl tool is updated to use the new options.

Added test 1597 to verify the libcurl protocol parser.

Closes #8992
2022-07-04 08:35:09 +02:00
Daniel Stenberg
804fb71bed
RELEASE-NOTES: synced
bumped to 7.84.1
2022-07-01 09:53:08 +02:00
Daniel Stenberg
1dda49a1d3
curl.h: CURLE_CONV_FAILED is obsoleted
The last use was removed in 7.82.0. Updated some docs too to reflect the
current error code situation.

Closes #9067
2022-06-29 16:03:02 +02:00
Viktor Szakats
a94d6fe706
version: rename threadsafe-init to threadsafe
Referring to Daniel's article [1], making the init function thread-safe
was the last bit to make libcurl thread-safe as a whole. So the name of
the feature may as well be the more concise 'threadsafe', also telling
the story that libcurl is now fully thread-safe, not just its init
function. Chances are high that libcurl wants to remain so in the
future, so there is little likelihood of ever needing any other distinct
`threadsafe-<name>` feature flags.

For consistency we also shorten `CURL_VERSION_THREADSAFE_INIT` to
`CURL_VERSION_THREADSAFE`, update its description and reference libcurl's
thread safety documentation.

[1]: https://daniel.haxx.se/blog/2022/06/08/making-libcurl-init-more-thread-safe/

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro
Closes #8989
2022-06-13 18:59:45 +00:00
max.mehl
ad9bc5976d
copyright: make repository REUSE compliant
Add licensing and copyright information for all files in this repository. This
either happens in the file itself as a comment header or in the file
`.reuse/dep5`.

This commit also adds a Github workflow to check pull requests and adapts
copyright.pl to the changes.

Closes #8869
2022-06-13 09:13:00 +02:00
Daniel Stenberg
5912da253b
select: return error from "lethal" poll/select errors
Adds two new error codes: CURLE_UNRECOVERABLE_POLL and
CURLM_UNRECOVERABLE_POLL one each for the easy and the multi interfaces.

Reported-by: Harry Sintonen
Fixes #8921
Closes #8961
2022-06-08 11:07:01 +02:00