Daniel Stenberg
6d9bf0db7e
WEBSOCKET.md: remove dead link
2024-01-09 16:00:29 +01:00
Daniel Stenberg
e2fbe56610
CI: spellcheck/appveyor: invoke configure --without-libpsl
...
Follow-up to 2998874bb6
2024-01-09 16:00:29 +01:00
Daniel Stenberg
89bb115e4a
cmdline/docs/*.d: switch to using ## instead of .IP
...
To make the editing easier. To write and to read.
Closes #12667
2024-01-09 16:00:23 +01:00
Daniel Stenberg
a859e29a60
gen.pl: support ## for doing .IP in table-like lists
...
Warn on use of .RS/.IP/.RE
Closes #12667
2024-01-09 16:00:16 +01:00
Jay Satiro
0ad13e0618
cookie.d: Document use of empty string to enable cookie engine
...
- Explain that --cookie "" can be used to enable the cookie engine
without reading any initial cookies.
As is documented in CURLOPT_COOKIEFILE.
Ref: https://curl.se/libcurl/c/CURLOPT_COOKIEFILE.html
Bug: https://github.com/curl/curl/issues/12643#issuecomment-1879844420
Reported-by: janko-js@users.noreply.github.com
Closes https://github.com/curl/curl/pull/12646
2024-01-09 03:40:47 -05:00
Daniel Stenberg
ac4dbc9cb5
setopt: use memdup0 when cloning COPYPOSTFIELDS
...
Closes #12651
2024-01-09 09:23:15 +01:00
Daniel Stenberg
2959f45b7d
telnet: use dynbuf instad of malloc for escape buffer
...
Previously, send_telnet_data() would malloc + free a buffer every time
for escaping IAC codes. Now, it reuses a dynbuf for this purpose.
Closes #12652
2024-01-09 09:21:01 +01:00
Daniel Stenberg
d18811b52b
CI: install libpsl or configure --without-libpsl in builds
...
As a follow-up to the stricted libpsl check in configure
2024-01-09 09:10:58 +01:00
Daniel Stenberg
2998874bb6
configure: make libpsl detection failure cause error
...
To force users to explictily disable it if they really don't want it
used and make it harder to accidentally miss it.
--without-libpsl is the option to use if PSL is not wanted.
Closes #12661
2024-01-09 09:09:51 +01:00
Daniel Stenberg
912d80c680
RELEASE-NOTES: synced
2024-01-08 23:00:21 +01:00
Daniel Stenberg
a3abc81a48
pop3: replace calloc + memcpy with memdup0
...
... and make sure to return error on out of memory.
Closes #12650
2024-01-08 22:55:39 +01:00
Daniel Stenberg
cfe7902111
lib: add debug log outputs for CURLE_BAD_FUNCTION_ARGUMENT
...
Closes #12658
2024-01-08 22:48:24 +01:00
Daniel Stenberg
8e0323b4b5
mime: use memdup0 instead of malloc + memcpy
...
Closes #12649
2024-01-08 22:40:43 +01:00
Daniel Stenberg
fb414370ac
tool_getparam: move the --rate logic into set_rate()
2024-01-08 22:39:18 +01:00
Daniel Stenberg
9e4e527735
tool_getparam: switch to an enum for every option
...
To make the big switch much easier to read/understand and to make it
easier to add new options.
2024-01-08 22:39:11 +01:00
Daniel Stenberg
1f4433dad4
tool_getparam: build post data using dynbuf (more)
2024-01-08 22:38:22 +01:00
Daniel Stenberg
1dba44b2f1
tool_getparam: replace malloc + copy by dynbuf for --data
2024-01-08 22:38:22 +01:00
Daniel Stenberg
f37840a46e
tool_getparam: make data_urlencode avoid direct malloc
...
use aprintf() instead
2024-01-08 22:38:22 +01:00
Daniel Stenberg
3870d03b5d
tool_getparam: move the --url-query logic into url_query()
...
This function is not doing post at all so it was always weirdly placed.
2024-01-08 22:38:22 +01:00
Daniel Stenberg
8aecfad9e6
tool_getparam: move the --data logic into set_data()
2024-01-08 22:38:22 +01:00
Daniel Stenberg
f6e97effb6
tool_getparam: unify the cmdline switch() into a single one
...
- easier to follow, easier to modify, easier to extend, possibly slightly
faster
- each case now has the long option as a comment
2024-01-08 22:38:22 +01:00
Daniel Stenberg
07dd60c05b
tool_getparam: bsearch cmdline options
...
- the option names are now alpha sorted and lookup is a lot faster
- use case sensitive matching. It was previously case insensitive, but that
was not documented nor tested.
- remove "partial match" feature. It was not documented, not tested and
was always fragile as existing use could break when we add a new
option
- lookup short options via a table
Closes #12631
2024-01-08 22:38:22 +01:00
Gabe
57cc70e559
COPYING: update copyright year
...
Closes #12654
2024-01-08 18:40:06 +01:00
Stefan Eissing
d0cb2c7a1f
url: init conn->sockfd and writesockfd to CURL_SOCKET_BAD
...
Also add more tracing to test 19
Follow-up to a0f9480
Fixes #12657
Closes #12659
2024-01-08 16:51:13 +01:00
Daniel Stenberg
e556470c23
connect: remove margin from eyeballer alloc
...
Presumably leftovers from debugging
Closes #12647
2024-01-08 09:30:45 +01:00
Daniel Stenberg
1058483615
ftp: only consider entry path if it has a length
...
Follow-up from 8edcfedc1a
Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65631
Avoids a NULL pointer deref.
Closes #12648
2024-01-07 16:34:55 +01:00
Stefan Eissing
a0f94800d5
transfer: adjust_pollset improvements
...
- let `multi_getsock()` initialize the pollset in what the
transfer state requires in regards to SEND/RECV
- change connection filters `adjust_pollset()` implementation
to react on the presence of POLLIN/-OUT in the pollset and
no longer check CURL_WANT_SEND/CURL_WANT_RECV
- cf-socket will no longer add POLLIN on its own
- http2 and http/3 filters will only do adjustments if the
passed pollset wants to POLLIN/OUT for the transfer on
the socket. This is similar to the HTTP/2 proxy filter
and works in stacked filters.
Closes #12640
2024-01-07 14:36:25 +01:00
Daniel Stenberg
8edcfedc1a
ftp: use memdup0 to store the OS from a SYST 215 response
...
avoid malloc + direct buffer fiddle
Closes #12639
2024-01-06 11:26:31 +01:00
Daniel Stenberg
f4beef524a
ftp: use dynbuf to store entrypath
...
avoid direct malloc
Closes #12638
2024-01-06 11:25:37 +01:00
Lealem Amedie
afdb6c2d34
wolfssl: load certificate *chain* for PEM client certs
...
Closes #12634
2024-01-06 11:24:11 +01:00
Stefan Eissing
8e2d7b9fa4
http: adjust_pollset fix
...
do not add a socket for POLLIN when the transfer does not want to send
(for example is paused).
Follow-up to 47f5b1a
Reported-by: bubbleguuum on github
Fixes #12632
Closes #12633
2024-01-04 15:45:22 +01:00
Daniel Stenberg
07bcae89d5
tool: make parser reject blank arguments if not supported
...
Already in the getstr() function that clones the input argument.
Closes #12620
2024-01-03 23:21:29 +01:00
dependabot[bot]
f59223f500
build(deps): bump github/codeql-action from 2 to 3
...
Bumps [github/codeql-action](https://github.com/github/codeql-action ) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/github/codeql-action/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Closes #12625
2024-01-03 14:29:19 +01:00
dependabot[bot]
943ec10b6e
build(deps): bump actions/checkout from 3 to 4
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Closes #12624
2024-01-03 14:28:25 +01:00
dependabot[bot]
1f138afcc2
build(deps): bump actions/upload-artifact from 3 to 4
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Closes #12627
2024-01-03 14:27:06 +01:00
dependabot[bot]
03fcddba22
build(deps): bump actions/download-artifact from 3 to 4
...
Bumps [actions/download-artifact](https://github.com/actions/download-artifact ) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases )
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/download-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Closes #12626
2024-01-03 14:26:39 +01:00
Stefan Eissing
f712af2891
http3/quiche: fix result code on a stream reset
...
- fixes pytest failures in test 07_22
- aligns CURLcode values on stream reset with ngtcp2
Closes #12629
2024-01-03 13:10:21 +01:00
Daniel Stenberg
eeda18b1d2
setopt: clear mimepost when formp is freed
...
A precaution to avoid a possibly dangling pointer left behind.
Reported-by: Thomas Ferguson
Fixes #12608
Closes #12621
2024-01-02 23:32:43 +01:00
andy5995
bf7cd837a6
CI: Add dependabot.yml
...
This will cause dependabot to open a PR when various actions are
updated, provided that the action maintainer has issued a release.
Closes #12623
2024-01-02 23:31:49 +01:00
Gisle Vanem
8558647613
content_encoding: change return code to typedef'ed enum
...
... to work around a clang ubsan warning.
Fixes #12618
Closes #12622
2024-01-02 23:28:17 +01:00
Daniel Stenberg
941b56d790
tool: prepend output_dir in header callback
...
When Content-Disposition parsing is used and an output dir is prepended,
make sure to store that new file name correctly so that it can be used
for setting the file timestamp when --remote-time is used.
Extended test 3012 to verify.
Co-Authored-by: Jay Satiro
Reported-by: hgdagon on github
Fixes #12614
Closes #12617
2024-01-02 23:26:56 +01:00
Daniel Stenberg
1d8e8c9ad1
test1254: fix typo in name plus shorten it
2024-01-02 14:31:25 +01:00
Daniel Stenberg
7d103f0043
RELEASE-NOTES: synced
2024-01-02 09:05:19 +01:00
Viktor Szakats
aff26089e8
schannel: fix -Warith-conversion
gcc 13 warning
...
```
lib/vtls/schannel.c:1201:22: warning: conversion to 'unsigned int' from 'int' may change the sign of the result [-Warith-conversion]
1201 | *extension_len = *list_len +
| ^
```
Closes #12616
2024-01-02 07:50:47 +00:00
Viktor Szakats
f0ea11b50b
asyn-thread: silence -Wcast-align
warning for Windows
...
Seen with llvm/clang 17:
```
lib/asyn-thread.c:310:5: warning: cast from 'PCHAR' (aka 'char *') to 'struct thread_sync_data *' increases required alignment from 1 to 8 [-Wcast-align]
310 | CONTAINING_RECORD(overlapped, struct thread_sync_data, w8.overlapped);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../llvm-mingw/aarch64-w64-mingw32/include/winnt.h:717:48: note: expanded from macro 'CONTAINING_RECORD'
717 | #define CONTAINING_RECORD(address,type,field) ((type *)((PCHAR)(address) - (ULONG_PTR)(&((type *)0)->field)))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Follow-up to a6bbc87f9e
#12482
Ref: https://github.com/curl/curl/pull/12482#issuecomment-1873017261
Closes #12615
2024-01-02 07:50:46 +00:00
Daniel Stenberg
b23255af99
tool_listhelp: regenerate after recent .d updates
...
Makes it survive test 1478
Closes #12612
2024-01-02 08:44:12 +01:00
Daniel Stenberg
0f1bb61e86
test1478: verify src/tool_listhelp.c
...
Verify that the source file on disk is identical to the output of gen.pl
listhelp, as otherwise they are out of sync and need attention.
Closes #12612
2024-01-02 08:44:10 +01:00
Daniel Stenberg
12f832d950
testutil: make runtests support %include
...
Using this instruction, a test case can include the contents of a file
into the test during the preprocessing.
Closes #12612
2024-01-02 08:44:06 +01:00
Daniel Stenberg
8620b11c3a
runtests: for mode="text" on <stdout>, fix newlines on both parts
...
Closes #12612
2024-01-02 08:44:01 +01:00
Jay Satiro
b83729a339
quiche: return CURLE_HTTP3 on send to invalid stream
...
Prior to this change if a send failed on a stream in an invalid state
(according to quiche) and not marked as closed (according to libcurl)
then the send function would return CURLE_SEND_ERROR.
We already have similar code for ngtcp2 to return CURLE_HTTP3 in this
case.
Caught by test test_07_upload.py: test_07_22_upload_parallel_fail.
Fixes https://github.com/curl/curl/issues/12590
Closes https://github.com/curl/curl/pull/12597
2024-01-02 00:54:15 -05:00