Jay Satiro [Thu, 15 Oct 2020 06:47:49 +0000 (02:47 -0400)]
connect: repair build without ipv6 availability
Assisted-by: Daniel Stenberg Reported-by: Tom G. Christensen
Fixes https://github.com/curl/curl/issues/6069
Closes https://github.com/curl/curl/pull/6071
Sergei Nikulov [Mon, 12 Oct 2020 19:44:37 +0000 (22:44 +0300)]
CI/tests: fix invocation of tests for CMake builds
Update appveyor.yml to set env variable TFLAGS and run tests
Remove curly braces due to CMake error (${TFLAGS} -> $TFLAGS)
Move testdeps build to build step (per review comments)
Reviewed-by: Marc Hörsken
Closes #6066
Fixes #6052
Jay Satiro [Tue, 13 Oct 2020 07:22:55 +0000 (03:22 -0400)]
strerror: Revert to local codepage for Windows error string
- Change get_winapi_error() to return the error string in the local
codepage instead of UTF-8 encoding.
Two weeks ago bed5f84 fixed get_winapi_error() to work on xbox, but it
also changed the error string's encoding from local codepage to UTF-8.
We return the local codepage version of the error string because if it
is output to the user's terminal it will likely be with functions which
expect the local codepage (eg fprintf, failf, infof).
This is essentially a partial revert of bed5f84. The support for xbox
remains but the error string is reverted back to local codepage.
by linking `lib/dynbuf.c` when building a static curl binary.
Previously this source file was only included when building
a dynamic curl binary. This was likely possibly because no
functions from the `src/Makefile.inc` / `CURLX_CFILES` sources
were actually required for a curl tool build. This has
recently changed with the introduction of `curlx_dyn_*()`
memory functions and their use by the tool sources.
Daniel Stenberg [Sun, 4 Oct 2020 21:05:21 +0000 (23:05 +0200)]
curl: make sure setopt CURLOPT_IPRESOLVE passes on a long
Previously, it would pass on a define (int) which could make libcurl
read junk as a value - which prevented the CURLOPT_IPRESOLVE option to
"take". This could then make test 2100 do two DoH requests instead of
one!
MANUAL: update examples to resolve without redirects
www.netscape.com is redirecting to a cookie consent form on Aol, and
cool.haxx.se isn't responding to FTP anymore. Replace with examples
that resolves in case users try out the commands when reading the
manual.
Closes #6024 Reviewed-by: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Emil Engler <me@emilengler.com>
Emil Engler [Thu, 17 Sep 2020 15:13:11 +0000 (17:13 +0200)]
memdebug: remove 9 year old unused debug function
There used to be a way to have memdebug fill allocated memory. 9 years
later this has no value there (valgrind and ASAN etc are way better). If
people need to know about it they can have a look at VCS logs.
Daniel Stenberg [Mon, 28 Sep 2020 15:03:20 +0000 (17:03 +0200)]
ROADMAP: updates and cleanups
Fix the HSTS PR
Remove DoT, thread-safe init and hard-coded localhost. I feel very
little interest for these with users so I downgrade them to plain "TODO"
entries again.
Daniel Stenberg [Mon, 21 Sep 2020 07:15:51 +0000 (09:15 +0200)]
ftp: separate FTPS from FTP over "HTTPS proxy"
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
Daniel Stenberg [Wed, 23 Sep 2020 07:22:02 +0000 (09:22 +0200)]
pingpong: use a dynbuf for the *_pp_sendf() function
... 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.
Daniel Stenberg [Tue, 22 Sep 2020 15:28:34 +0000 (17:28 +0200)]
dynbuf: make *addf() not require extra mallocs
... 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.
Daniel Stenberg [Tue, 22 Sep 2020 06:49:48 +0000 (08:49 +0200)]
http_proxy: do not count proxy headers in the header bytecount
... 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
Daniel Stenberg [Mon, 21 Sep 2020 11:59:33 +0000 (13:59 +0200)]
krb5: merged security.c and krb specific FTP functions in here
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).
Daniel Stenberg [Mon, 21 Sep 2020 10:55:38 +0000 (12:55 +0200)]
parsedate: tune the date to epoch conversion
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).
Daniel Stenberg [Fri, 18 Sep 2020 12:42:50 +0000 (14:42 +0200)]
docs/RESOURCES: remove
This document is not maintained and rather than trying to refresh it,
let's kill it. A more up-to-date document with relevant RFCs is this
page on the curl website: https://curl.haxx.se/rfc/
Marc Hoersken [Sat, 12 Sep 2020 19:59:26 +0000 (21:59 +0200)]
multi: reuse WinSock events variable in Curl_multi_wait
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