| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Reuses the buffer and thereby reduces number of mallocs over a transfer.
Closes #6010
|
|
|
|
|
|
|
| |
... will probably trigger some false DEAD CODE positives on non-windows
code analyzers for the conditional code.
Closes #6011
|
|
|
|
|
|
|
|
|
|
| |
When using HTTPS proxy, SSL is used but not in the view of the FTP
protocol handler itself so separate the connection's use of SSL from the
FTP control connection's sue.
Reported-by: Mingtao Yang
Fixes #5523
Closes #6006
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... reuses the same dynamic buffer instead of doing repeated malloc/free
cycles.
Test case 100 (FTP dir list PASV) does 7 fewer memory allocation calls
after this change in my test setup (132 => 125), curl 7.72.0 needed 140
calls for this.
Test case 103 makes 9 less allocations now (130). Down from 149 in
7.72.0.
Closes #6004
|
|
|
|
| |
Closes #6004
|
|
|
|
|
|
|
|
|
|
|
|
| |
... by introducing a printf() function that appends directly into a
dynbuf: Curl_dyn_vprintf(). This avoids the mandatory extra malloc so if
the buffer is already big enough it can just printf directly into it.
Since this less-malloc version requires tthe use of a library internal
printf function, we only provide this version when building libcurl and
not for the dynbuf code that is used when building the curl tool.
Closes #5998
|
|
|
|
|
|
| |
This typically makes 7-9 fewer mallocs per FTP transfer.
Closes #5997
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Follow-up from f4873ebd0be32cf
Turns out some older openssl installations go bananas otherwise.
Reported-by: Tom van der Woerdt
Fixes #5995
Closes #5996
|
|
|
|
|
|
|
|
|
|
| |
... as that counter is subsequently used to detect if nothing was
returned from the peer. This made curl return CURLE_OK when it should
have returned CURLE_GOT_NOTHING.
Fixes #5992
Reported-by: Tom van der Woerdt
Closes #5994
|
|
|
|
|
|
|
| |
Fixed two return code mixups. CURLE_UNKNOWN_OPTION is saved for when the
option is, yeah, not known. Clarified this in the setopt man page too.
Closes #5993
|
|
|
|
|
|
|
|
|
|
|
| |
These two files were always tightly connected and it was hard to
understand what went into which. This also allows us to make the
ftpsend() function static (moved from ftp.c).
Removed security.c
Renamed curl_sec.h to krb5.h
Closes #5987
|
|
|
|
|
|
|
| |
Makes get_protocol_family() faster and it moves the knowledge about the
"families" to each protocol handler, where it belongs.
Closes #5986
|
|
|
|
|
|
|
|
|
| |
By avoiding an unnecessary error check and the temp use of the tm
struct, the time2epoch conversion function gets a little bit faster.
When repeating test 517, the updated version is perhaps 1% faster (on
one particular build on one particular architecture).
Closes #5985
|
|
|
|
|
|
|
|
|
| |
If the received PASV response doesn't match the expected pattern, we
could end up reading uninitialized integers for IP address and port
number.
Issue pointed out by muse.dev
Closes #5972
|
|
|
|
|
| |
Closes #5975
Fixes #5974
|
|
|
|
|
|
|
| |
The use of such a macro hides some of what's actually going on to the
reader and is generally disapproved of in the project.
Closes #5971
|
|
|
|
| |
Closes #5968
|
|
|
|
|
|
|
|
|
|
| |
Also skip pre-checking sockets to set timeout_ms to 0
after the first socket has been detected to be ready.
Reviewed-by: rcombs on github
Reviewed-by: Daniel Stenberg
Follow up to #5886
|
|
|
|
|
|
|
|
|
|
|
| |
Since the struct is quite large (1 long and 10 ints) we
declare it once at the beginning of the function instead
of multiple times inside loops to avoid stack movements.
Reviewed-by: Viktor Szakats
Reviewed-by: Daniel Stenberg
Closes #5886
|
|
|
|
| |
Closes #5629
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is primarily interesting for cases where CURLOPT_NOBODY is set as
previously curl would not return an error for this case.
MDTM getting 550 now also returns this error (it returned
CURLE_FTP_COULDNT_RETR_FILE before) in order to unify return codes for
missing files across protocols and specific FTP commands.
libcurl already returns error on a 550 as a MDTM response (when
CURLOPT_FILETIME is set). If CURLOPT_NOBODY is not set, an error would
happen subsequently anyway since the RETR command would fail.
Add test 1913 and 1914 to verify. Updated several tests accordingly due
to the updated SIZE behavior.
Reported-by: Tomas Berger
Fixes #5953
Closes #5957
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... when continuing a transfer from a FETCH response.
When the size of the file was small enough that the entirety of the
transfer happens in a single go and schannel buffers holds the entire
data. However, it wasn't completely read in Curl_pp_readresp since a
line break was found before that could happen. So, by the time we are in
imap_state_fetch_resp - there's data in buffers that needs to be read
via Curl_read but nothing to read from the socket. After we setup a
transfer (Curl_setup_transfer), curl just waits on the socket state to
change - which doesn't happen since no new data ever comes.
Closes #5961
|
|
|
|
| |
Closes #5946
|
|
|
|
| |
Closes #5959
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously there were several locations that called
nghttp2_session_mem_recv and handled responses slightly differently.
Those have been converted to call the existing
h2_process_pending_input() function.
Moved the end-of-session check to h2_process_pending_input() since the
only place the end-of-session state can change is after nghttp2
processes additional input frames.
This will likely fix the fuzzing error. While I don't have a root cause
the out-of-bounds read seems like a use after free, so moving the
nghttp2_session_check_request_allowed() call to a location with a
guaranteed nghttp2 session seems reasonable.
Also updated a few nghttp2 callsites to include error messages and added
a few additional error checks.
Closes #5648
|
|
|
|
|
|
|
|
| |
Follow-up to the fix in 20417a13fb8f83
Reported-by: Michael Olbrich
Fixes #5937
Closes #5948
|
|
|
|
|
|
|
|
| |
The oauth2 support is used with SMTP and it uses base64 functions.
Reported-by: Michael Olbrich
Fixes #5937
Closes #5938
|
|
|
|
|
|
|
|
|
|
| |
configure --enable-debug now enables -Wassign-enum with clang,
identifying several enum "abuses" also fixed.
Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/879007f8118771f4896334731aaca5850a154675#commitcomment-42087553
Closes #5929
|
|
|
|
|
|
|
| |
Fixes proxy regression brought in commit ad829b21ae (7.71.0)
Fixed #5911
Closes #5914
|
|
|
|
|
|
|
|
|
|
|
| |
If the error reason from the lib is
SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED, libcurl will return
CURLE_PEER_FAILED_VERIFICATION and not CURLE_SSL_CONNECT_ERROR.
This unifies the libcurl return code and makes libressl run test 313
(CRL testing) fine.
Closes #5934
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
These files are not maintained, they seem to have no users, Watcom
compilers look like not having users nor releases anymore.
Closes #5918
|
|
|
|
|
|
|
|
|
| |
"integer constant not in range of enumerated type 'CURLoption'"
Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/6ebe63fac23f38df911edc348e8ccc72280f9434#commitcomment-42042843
Closes #5915
|
|
|
|
| |
Closes #5912
|
|
|
|
| |
Closes #5909
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... in case NO_PROXY takes an effect
Without this patch, the following command crashes:
$ GIT_CURL_VERBOSE=1 NO_PROXY=github.com HTTPS_PROXY=https://example.com \
git clone https://github.com/curl/curl.git
Minimal libcurl-based reproducer:
#include <curl/curl.h>
int main() {
CURL *curl = curl_easy_init();
if(curl) {
CURLcode ret;
curl_easy_setopt(curl, CURLOPT_URL, "https://github.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "example.com");
/* set the proxy type */
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTPS);
curl_easy_setopt(curl, CURLOPT_NOPROXY, "github.com");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
return ret;
}
return -1;
}
Assisted-by: Kamil Dudka
Bug: https://bugzilla.redhat.com/1873327
Closes #5902
|
|
|
|
|
|
|
|
| |
The code section that is OpenSSL 3+ specific now uses the same logic as
is used in the version < 3 section. It caused a compiler error without
it.
Closes #5907
|
|
|
|
| |
Closes #5906
|
|
|
|
| |
Closes #5906
|
|
|
|
| |
Closes #5906
|
|
|
|
|
|
| |
Use uppercase C for internal symbols.
Closes #5906
|
|
|
|
|
|
| |
Internal names should not be prefixed "curl_"
Closes #5906
|
|
|
|
|
|
| |
As internal global names should use captical C.
Closes #5906
|
|
|
|
|
|
| |
As internal global names should use captical C.
Closes #5906
|
|
|
|
|
|
| |
As internal global names should use captical C.
Closes #5906
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop dynamic loading of ws2_32.dll and instead rely on the
imported version which is now required to be at least 2.2.
Reviewed-by: Marcel Raad
Reviewed-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Reviewed-by: Viktor Szakats
Closes #5854
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IPv6, telnet and now also the multi API require WinSock
version 2 which is available starting with Windows 95.
Therefore we think it is time to drop support for version 1.
Reviewed-by: Marcel Raad
Reviewed-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Reviewed-by: Viktor Szakats
Follow up to #5634
Closes #5854
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The poll emulation via select already consumes POLLRDNORM,
POLLWRNORM and POLLRDBAND as input events. Therefore it
should also return them as output events if signaled.
Also fix indentation in input event handling block.
Assisted-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Replaces #5852
Closes #5883
|
|
|
|
|
|
|
| |
... we're generally bad at this, but we are adding new functions for
this release.
Closes #5899
|