| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
... to avoid the use of 'void *' for the protocol specific structs done
per transfer.
Closes #6238
|
|
|
|
| |
Closes #6172
|
|
|
|
|
|
| |
Reuses the buffer and thereby reduces number of mallocs over a transfer.
Closes #6010
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... 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
|
|
|
|
|
|
|
| |
Makes get_protocol_family() faster and it moves the knowledge about the
"families" to each protocol handler, where it belongs.
Closes #5986
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... 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
|
|
|
|
|
|
| |
... or all "control codes" or nothing.
Assisted-by: Nicolas Sterchele
|
|
|
|
|
|
| |
And remove a few unused booleans!
Closes #5461
|
|
|
|
|
| |
Fixes warning detected by PVS-Studio
Fixes #4374
|
|
|
|
|
|
|
|
|
| |
It was used (intended) to pass in the size of the 'socks' array that is
also passed to these functions, but was rarely actually checked/used and
the array is defined to a fixed size of MAX_SOCKSPEREASYHANDLE entries
that should be used instead.
Closes #4169
|
|
|
|
|
|
| |
Reduce variable scopes and remove redundant variable stores.
Closes https://github.com/curl/curl/pull/3975
|
|
|
|
|
|
|
|
|
| |
They serve very little purpose and mostly just add noise. Most of them
have been around for a very long time. I read them all before removing
or rephrasing them.
Ref: #3876
Closes #3883
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- no need to have them protocol specific
- no need to set pointers to them with the Curl_setup_transfer() call
- make Curl_setup_transfer() operate on a transfer pointer, not
connection
- switch some counters from long to the more proper curl_off_t type
Closes #3627
|
|
|
|
|
|
|
|
|
|
| |
There is no real gain in performing memcmp() comparisons on single
characters, so change these to array subscript inspections which
saves a call and makes the code clearer.
Closes #3486
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The timeout set with CURLOPT_TIMEOUT is no longer used when
disconnecting from one of the pingpong protocols (FTP, IMAP, SMTP,
POP3).
Reported-by: jasal82 on github
Fixes #3264
Closes #3374
|
|
|
|
|
|
|
|
|
|
|
| |
The function does not return the same value as snprintf() normally does,
so readers may be mislead into thinking the code works differently than
it actually does. A different function name makes this easier to detect.
Reported-by: Tomas Hoger
Assisted-by: Daniel Gustafsson
Fixes #3296
Closes #3297
|
|
|
|
|
|
| |
... to make it a truly unified URL parser.
Closes #3017
|
|
|
|
|
|
|
| |
See header file and man pages for API. All documented API details work
and are tested in the 1560 test case.
Closes #2842
|
|
|
|
|
|
|
|
|
|
|
|
| |
... and add "MAILINDEX".
As described in #2789, this is a suggested solution. Changing UID=xx to
actually get mail with UID xx and add "MAILINDEX" to get a mail with a
special index in the mail box (old behavior). So MAILINDEX=1 gives the
first non deleted mail in the mail box.
Fixes #2789
Closes #2815
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Get rid of variable that was generating false positive warning
(unitialized)
- Fix issues in tests
- Reduce scope of several variables all over
etc
Closes #2631
|
|
|
|
| |
Closes #2623
|
|
|
|
|
|
|
|
| |
Follow-up commit to 615edc1f73 which was incomplete.
Assisted-by: Max Dymond
Detected by OSS-fuzz
Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5206
|
|
|
|
|
|
|
|
|
|
| |
For pop3/imap/smtp, added test 891 to somewhat verify the pop3
case.
For this, I enhanced the pingpong test server to be able to send back
responses with LF-only instead of always using CRLF.
Closes #2150
|
|
|
|
|
|
|
| |
As documented in RFC 3501 section 9:
https://tools.ietf.org/html/rfc3501#section-9
Closes #2061
|
|
|
|
|
|
|
| |
CVE-2017-1000257
Reported-by: Brian Carpenter and 0xd34db347
Also detected by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3586
|
|
|
|
|
|
|
| |
Updates test 800 to verify
Fixes #1902
Closes #1903
|
|
|
|
|
|
|
| |
Available in HTTP, SMTP and IMAP.
Deprecates the FORM API.
See CURLOPT_MIMEPOST.
Lib code and associated documentation.
|
|
|
|
|
|
|
| |
When working on this code I found the previous setup a bit weird while
using proper defines increases readability.
Closes #1824
|
|
|
|
|
|
|
|
|
|
|
| |
It is a defined possible greeting at server startup that means the
connection is already authenticated. See
https://tools.ietf.org/html/rfc3501#section-7.1.4
Test 846 added to verify.
Fixes #1818
Closes #1820
|
|
|
|
|
|
|
| |
... make sure we bail out on overflows.
Reported-by: Brian Carpenter
Closes #1758
|
|
|
|
|
|
| |
Add a new type of callback to Curl_handler which performs checks on
the connection. Alter RTSP so that it uses this callback to do its
own check on connection health.
|
|
|
|
|
|
|
|
|
|
| |
... all other non-HTTP protocol schemes are now defaulting to "tunnel
trough" mode if a HTTP proxy is specified. In reality there are no HTTP
proxies out there that allow those other schemes.
Assisted-by: Ray Satiro, Michael Kaufmann
Closes #1505
|
|
|
|
| |
Closes #1356
|
|
|
|
| |
Fixes #1252
|
|
|
|
|
|
|
| |
Both IMAP and POP3 response characters are used internally, but when
appended to the STARTTLS denial message likely could confuse the user.
Closes https://github.com/curl/curl/pull/1203
|
| |
|
| |
|
|
|
|
|
| |
We had some confusions on when each function was used. We should not act
differently on different locales anyway.
|
|
|
|
|
|
|
| |
... to make it less likely that we forget that the function actually
does case insentive compares. Also replaced several invokes of the
function with a plain strcmp when case sensitivity is not an issue (like
comparing with "-").
|
|
|
|
|
|
|
|
| |
Since we're using CURLE_FTP_WEIRD_SERVER_REPLY in imap, pop3 and smtp as
more of a generic "failed to parse" introduce an alias without FTP in
the name.
Closes https://github.com/curl/curl/pull/975
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
curl_printf.h defines printf to curl_mprintf, etc. This can cause
problems with external headers which may use
__attribute__((format(printf, ...))) markers etc.
To avoid that they cause problems with system includes, we include
curl_printf.h after any system headers. That makes the three last
headers to always be, and we keep them in this order:
curl_printf.h
curl_memory.h
memdebug.h
None of them include system headers, they all do funny #defines.
Reported-by: David Benjamin
Fixes #743
|
| |
|
|
|
|
|
|
| |
may be null in the CURLOPT_CONNECT_ONLY case
Fixes #747
|
|
|
|
|
|
|
| |
The list and search response functions were identical! Merged into one
now. Detected by PVS Studio.
Reported-by: Alexis La Goutte
|
|
|
|
| |
... as it now is used by multi.c only.
|
|
|
|
| |
warning C4706: assignment within conditional expression
|
|
|
|
|
|
|
|
|
| |
warning C4701: potentially uninitialized local variable 'size' used
Technically this can't happen, as the usage of 'size' is protected by
'if(parsed)' and 'parsed' is only set after 'size' has been parsed.
Anyway, lets keep the compiler happy.
|