| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
... so that malloc/free overrides from curl_global_init are used for
wcsdup correctly.
Closes #7540
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During the protocol-specific parts of connection upkeep, some code
assumes that the data->conn pointer already is set correctly. However,
there's currently no guarantee of that in the code.
This fix temporarily attaches each connection to the Curl_easy object
before performing the protocol-specific connection check on it, in a
similar manner to the connection checking in extract_if_dead().
Fixes #7386
Closes #7387
Reported-by: Josie Huddleston
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- the data needs to be "line-based" anyway since it's also passed to the
debug callback/application
- it makes infof() work like failf() and consistency is good
- there's an assert that triggers on newlines in the format string
- Also removes a few instances of "..."
- Removes the code that would append "..." to the end of the data *iff*
it was truncated in infof()
Closes #7357
|
|
|
|
| |
Closes #7067
|
|
|
|
| |
Closes #6965
|
|
|
|
|
|
| |
... remove '== NULL' and '!= 0'
Closes #6912
|
|
|
|
|
|
| |
No longer considered experimental.
Closes #6700
|
|
|
|
|
|
|
|
| |
Both were used for the same purposes and there was no logical separation
between them. Combined, this also saves 16 bytes in less holes in my
test build.
Closes #6798
|
|
|
|
|
|
|
|
|
|
| |
While working on documenting the states it dawned on me that step one is
to use more descriptive names on the states. This also changes prefix on
the states to make them shorter in the source.
State names NOT ending with *ing are transitional ones.
Closes #6612
|
|
|
|
|
|
|
|
| |
The Curl_easy pointer struct entry in connectdata is now gone. Just
before commit 215db086e0 landed on January 8, 2021 there were 919
references to conn->data.
Closes #6608
|
|
|
|
|
|
|
| |
This also moves the 'async' struct from the connectdata struct into the
Curl_easy struct, which seems like a better home for it.
Closes #6497
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... in most cases instead of 'struct connectdata *' but in some cases in
addition to.
- We mostly operate on transfers and not connections.
- We need the transfer handle to log, store data and more. Everything in
libcurl is driven by a transfer (the CURL * in the public API).
- This work clarifies and separates the transfers from the connections
better.
- We should avoid "conn->data". Since individual connections can be used
by many transfers when multiplexing, making sure that conn->data
points to the current and correct transfer at all times is difficult
and has been notoriously error-prone over the years. The goal is to
ultimately remove the conn->data pointer for this reason.
Closes #6425
|
|
|
|
|
|
|
|
|
|
| |
... to make build tools/valgrind warn if no curl_global_cleanup is
called.
This is conditionally only done for debug builds with the env variable
CURL_GLOBAL_INIT set.
Closes #6410
|
|
|
|
|
|
|
|
|
|
|
| |
Paused transfers should not be stopped due to slow speed even when
CURLOPT_LOW_SPEED_LIMIT is set. Additionally, the slow speed timer is
now reset when the transfer is unpaused - as otherwise it would easily
just trigger immediately after unpausing.
Reported-by: Harry Sintonen
Fixes #6358
Closes #6359
|
|
|
|
| |
Closes #6172
|
|
|
|
|
|
|
|
| |
- read/write callback options
- man pages for the 4 new setopts
- test 1915 verifies the callbacks
Closes #5896
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- enable in the build (configure)
- header parsing
- host name lookup
- unit tests for the above
- CI build
- CURL_VERSION_HSTS bit
- curl_version_info support
- curl -V output
- curl-config --features
- CURLOPT_HSTS_CTRL
- man page for CURLOPT_HSTS_CTRL
- curl --hsts (sets CURLOPT_HSTS_CTRL and works with --libcurl)
- man page for --hsts
- save cache to disk
- load cache from disk
- CURLOPT_HSTS
- man page for CURLOPT_HSTS
- added docs/HSTS.md
- fixed --version docs
- adjusted curl_easy_duphandle
Closes #5896
|
|
|
|
|
|
|
|
|
|
|
|
| |
As an unpause might itself get paused again and then triggering another
reread doesn't help.
Follow-up from e040146f22608fd9 (shipped since 7.69.1)
Bug: https://curl.haxx.se/mail/lib-2020-09/0081.html
Patch-by: Kunal Chandarana
Fixes #5988
Closes #6013
|
|
|
|
|
|
|
|
|
| |
The OS is deprecated. I see no traces of anyone having actually built
curl for Symbian after 2012.
The public headers are unmodified.
Closes #5989
|
|
|
|
|
| |
Closes #5975
Fixes #5974
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cache content is not duplicated, like other caches, but the setting
and specified file name are.
Test 1908 is extended to verify this somewhat. Since the duplicated
handle gets the same file name, the test unfortunately overwrites the
same file twice (with different contents) which makes it hard to check
automatically.
Closes #5923
|
|
|
|
|
|
|
|
|
| |
CVE-2020-8231
Bug: https://curl.haxx.se/docs/CVE-2020-8231.html
Reported-by: Marc Aldorasi
Closes #5824
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that all functions in select.[ch] take timediff_t instead
of the limited int or long, we can remove type conversions
and related preprocessor checks to silence compiler warnings.
Avoiding conversions from time_t was already done in 842f73de.
Based upon #5262
Supersedes #5214, #5220 and #5221
Follow up to #5343 and #5479
Closes #5490
|
|
|
|
|
|
|
|
|
|
|
| |
... and free it as soon as the transfer is done. It removes the extra
alloc when a new size is set with setopt() and reduces memory for unused
easy handles.
In addition: the closure_handle now doesn't use an allocated buffer at
all but the smallest supported size as a stack based one.
Closes #5472
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change introduces a generic way to provide binary data in setopt
options, called BLOBs.
This change introduces these new setopts:
CURLOPT_ISSUERCERT_BLOB, CURLOPT_PROXY_SSLCERT_BLOB,
CURLOPT_PROXY_SSLKEY_BLOB, CURLOPT_SSLCERT_BLOB and CURLOPT_SSLKEY_BLOB.
Reviewed-by: Daniel Stenberg
Closes #5357
|
|
|
|
| |
Closes https://github.com/curl/curl/pull/5363
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A common set of functions instead of many separate implementations for
creating buffers that can grow when appending data to them. Existing
functionality has been ported over.
In my early basic testing, the total number of allocations seem at
roughly the same amount as before, possibly a few less.
See docs/DYNBUF.md for a description of the API.
Closes #5300
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Ignore CURLE_NOT_BUILT_IN errors returned by c-ares functions in
curl_easy_duphandle.
Prior to this change if c-ares was used as the resolver backend and
either it was too old or libcurl was built without IPv6 support then
some of our resolver functions could return CURLE_NOT_BUILT_IN to
curl_easy_duphandle causing it to fail.
Caused by c8f086b which shipped in 7.69.1.
Reported-by: Karl Chen
Fixes https://github.com/curl/curl/issues/5097
Closes https://github.com/curl/curl/pull/5100
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In case a read callback returns a status (pause, abort, eof,
error) instead of a byte count, drain the bytes read so far but
remember this status for further processing.
Takes care of not losing data when pausing, and properly resume a
paused mime structure when requested.
New tests 670-673 check unpausing cases, with easy or multi
interface and mime or form api.
Fixes #4813
Reported-by: MrdUkk on github
|
|
|
|
|
|
|
|
|
|
|
| |
With c-ares the dns parameters lives in ares_channel. Store them in the
curl handle and set them again in easy_duphandle.
Regression introduced in #3228 (6765e6d), shipped in curl 7.63.0.
Fixes #4893
Closes #5020
Signed-off-by: Ernst Sjöstrand <ernst.sjostrand@verisure.com>
|
|
|
|
| |
Closes #5010
|
|
|
|
|
|
|
|
|
| |
There might be data available that was already read off the socket, for
example in the TLS layer.
Reported-by: Anders Berg
Fixes #4966
Closes #5049
|
|
|
|
|
|
|
| |
A NULL easy handle or an easy handle without an associated connection
cannot be paused or unpaused.
Closes #5050
|
|
|
|
|
|
| |
Reviewed-by: Patrick Monnerat
Ref: #4833
Closes #5026
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit fa0216b294af4c7113a9040ca65eefc7fc18ac1c (from #5000)
Clearly that didn't solve the problem correctly.
Reported-by: Christopher Reid
Reopens #4966
Fixes #5044
|
|
|
|
|
|
|
|
| |
This reverts commit 87869e38d7afdec3ef1bb4965711458b088e254f.
Fixes #5014
Closes #5015
Reopens #4833
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In case a read callback returns a status (pause, abort, eof,
error) instead of a byte count, drain the bytes read so far but
remember this status for further processing.
Takes care of not losing data when pausing, and properly resume a
paused mime structure when requested.
New tests 670-673 check unpausing cases, with easy or multi
interface and mime or form api.
Fixes #4813
Reported-by: MrdUkk on github
Closes #4833
|
|
|
|
|
|
|
|
|
| |
... since the socket might not actually be readable anymore when for
example the data is already buffered in the TLS layer.
Fixes #4966
Reported-by: Anders Berg
Closes #5000
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reduces the HTTP/2 window size to 32 MB since libcurl might have to
buffer up to this amount of data in memory and yet we don't want it set
lower to potentially impact tranfer performance on high speed networks.
Requires nghttp2 commit b3f85e2daa629
(https://github.com/nghttp2/nghttp2/pull/1444) to work properly, to end
up in the next release after 1.40.0.
Fixes #4939
Closes #4940
|
|
|
|
|
|
| |
multi is already assigned to data->multi by curl_multi_add_handle.
Closes https://github.com/curl/curl/pull/4900
|
|
|
|
|
|
|
|
|
| |
Previously it was stored in a global state which contributed to
curl_global_init's thread unsafety. This boolean is now instead figured
out in curl_multi_init() and stored in the multi handle. Less effective,
but thread safe.
Closes #4851
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Removed from global_init since it isn't thread-safe. The symbol will
still remain to not break compiles, it just won't have any effect going
forward.
- make the internals NOT loop on EINTR (the opposite from previously).
It only risks returning from the select/poll/wait functions early, and that
should be risk-free.
Closes #4840
|
|
|
|
| |
Closes #4846
|
|
|
|
|
|
| |
Adds support for SFTP (not SCP) using WolfSSH.
Closes #4231
|
|
|
|
|
|
|
|
|
| |
... so that failures in the global init function don't count as a
working init and it can then be called again.
Reported-by: Paul Groke
Fixes #4636
Closes #4653
|
|
|
|
|
|
| |
Follow-up to 5b2d703 which moved ssh source files to vssh.
Closes https://github.com/curl/curl/pull/4609
|
|
|
|
|
|
|
|
| |
... avoids unnecesary recursive risk when the transfer is already done.
Reported-by: Richard Bowker
Fixes #4563
Closes #4574
|
|
|
|
|
|
|
| |
This is the common pattern used in the code and by a unified approach we
avoid mistakes.
Closes #4534
|
|
|
|
|
| |
Fixes warning detected by PVS-Studio
Fixes #4374
|
|
|
|
| |
Closes #4289
|