]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
5 years agoruntests: provide curl's version string as %VERSION for tests
Daniel Stenberg [Fri, 2 Oct 2020 11:45:24 +0000 (13:45 +0200)] 
runtests: provide curl's version string as %VERSION for tests

... so that we can check HTTP requests for User-Agent: curl/%VERSION

Update 600+ test cases accordingly.

Closes #6037

5 years agochecksrc: warn on space after exclamation mark
Daniel Stenberg [Fri, 2 Oct 2020 08:58:52 +0000 (10:58 +0200)] 
checksrc: warn on space after exclamation mark

Closes #6034

5 years agotest1465: verify --libcurl with binary POST data
Daniel Stenberg [Thu, 1 Oct 2020 22:12:41 +0000 (00:12 +0200)] 
test1465: verify --libcurl with binary POST data

5 years agoruntests: allow generating a binary sequence from hex
Daniel Stenberg [Thu, 1 Oct 2020 22:11:13 +0000 (00:11 +0200)] 
runtests: allow generating a binary sequence from hex

5 years agotool_setopt: escape binary data to hex, not octal
Daniel Stenberg [Thu, 1 Oct 2020 22:07:41 +0000 (00:07 +0200)] 
tool_setopt: escape binary data to hex, not octal

5 years agocurl: make --libcurl show binary posts correctly
Daniel Stenberg [Thu, 1 Oct 2020 20:59:30 +0000 (22:59 +0200)] 
curl: make --libcurl show binary posts correctly

Reported-by: Stephan Mühlstrasser
Fixes #6031
Closes #6032

5 years agostrerror: fix null deref on winapi out-of-memory
Jay Satiro [Thu, 1 Oct 2020 17:34:59 +0000 (13:34 -0400)] 
strerror: fix null deref on winapi out-of-memory

Follow-up to bed5f84 from several days ago.

Ref: https://github.com/curl/curl/pull/6005

5 years agovtls: deduplicate some DISABLE_PROXY ifdefs
Kamil Dudka [Mon, 27 Jul 2020 13:44:01 +0000 (15:44 +0200)] 
vtls: deduplicate some DISABLE_PROXY ifdefs

... in the code of gtls, nss, and openssl

Closes #5735

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 1 Oct 2020 07:19:11 +0000 (09:19 +0200)] 
RELEASE-NOTES: synced

5 years agoTODO: Add OpenBSD libtool notice
Emil Engler [Wed, 30 Sep 2020 17:31:07 +0000 (19:31 +0200)] 
TODO: Add OpenBSD libtool notice

See #5862
Closes #6030

5 years agotests/unit/README: convert to markdown
Daniel Stenberg [Wed, 30 Sep 2020 13:12:06 +0000 (15:12 +0200)] 
tests/unit/README: convert to markdown

... and add to dist!

Closes #6028

5 years agotests/README: convert to markdown
Daniel Stenberg [Wed, 30 Sep 2020 13:07:59 +0000 (15:07 +0200)] 
tests/README: convert to markdown

Closes #6028

5 years agoinclude/README: convert to markdown
Daniel Stenberg [Wed, 30 Sep 2020 12:57:38 +0000 (14:57 +0200)] 
include/README: convert to markdown

Closes #6028

5 years agoexamples/README: convert to markdown
Daniel Stenberg [Wed, 30 Sep 2020 12:56:08 +0000 (14:56 +0200)] 
examples/README: convert to markdown

Closes #6028

5 years agoconfigure: don't say HTTPS-proxy is enabled when disabled!
Daniel Stenberg [Wed, 30 Sep 2020 13:31:01 +0000 (15:31 +0200)] 
configure: don't say HTTPS-proxy is enabled when disabled!

Reported-by: Kamil Dudka
Reviewed-by: Kamil Dudka
Bug: https://github.com/curl/curl/pull/5735#issuecomment-701376388
Closes #6029

5 years agosrc: Consistently spell whitespace without whitespace
Daniel Gustafsson [Wed, 30 Sep 2020 19:10:14 +0000 (21:10 +0200)] 
src: Consistently spell whitespace without whitespace

Whitespace is spelled without a space between white and space, so
make sure to consistently spell it that way across the codebase.

Closes #6023
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
Reviewed-by: Emil Engler <me@emilengler.com>
5 years agoMANUAL: update examples to resolve without redirects
Daniel Gustafsson [Wed, 30 Sep 2020 19:05:14 +0000 (21:05 +0200)] 
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>
5 years agoHISTORY: add some 2020 events
Daniel Stenberg [Wed, 30 Sep 2020 11:44:32 +0000 (13:44 +0200)] 
HISTORY: add some 2020 events

5 years agosectransp: make it build with --disable-proxy
Daniel Stenberg [Wed, 30 Sep 2020 07:12:49 +0000 (09:12 +0200)] 
sectransp: make it build with --disable-proxy

Follow-up from #5466 and f3d501dc678d80
Reported-by: Javier Navarro
Fixes #6025
Closes #6026

5 years agoECH: renamed from ESNI in docs and configure
Daniel Stenberg [Tue, 29 Sep 2020 08:13:18 +0000 (10:13 +0200)] 
ECH: renamed from ESNI in docs and configure

Encrypted Client Hello (ECH) is the current name.

Closes #6022

5 years agoconfigure: use "no" instead of "disabled" for the end summary
Daniel Stenberg [Tue, 29 Sep 2020 09:01:45 +0000 (11:01 +0200)] 
configure: use "no" instead of "disabled" for the end summary

... for consistency but also to make them more distinctly stand out next
to the "enabled" lines.

5 years agoTODO: SSH over HTTPS proxy with more backends
Daniel Stenberg [Mon, 28 Sep 2020 20:47:50 +0000 (22:47 +0200)] 
TODO: SSH over HTTPS proxy with more backends

... as right now only the libssh2 backend supports it.

5 years agolibssh2: handle the SSH protocols done over HTTPS proxy
Daniel Stenberg [Mon, 28 Sep 2020 12:02:27 +0000 (14:02 +0200)] 
libssh2: handle the SSH protocols done over HTTPS proxy

Reported-by: Robin Douine
Fixes #4295
Closes #6021

5 years agomemdebug: remove 9 year old unused debug function
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.

Closes #5973

5 years agosendf: move Curl_sendf to dict.c and make it static
Daniel Stenberg [Mon, 28 Sep 2020 12:14:25 +0000 (14:14 +0200)] 
sendf: move Curl_sendf to dict.c and make it static

... as the only remaining user of that function. Also fix gopher.c to
instead use Curl_write()

Closes #6020

5 years agoROADMAP: updates and cleanups
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.

5 years agoschannel: return CURLE_PEER_FAILED_VERIFICATION for untrusted root
Daniel Stenberg [Mon, 28 Sep 2020 06:30:25 +0000 (08:30 +0200)] 
schannel: return CURLE_PEER_FAILED_VERIFICATION for untrusted root

This matches what is returned in other TLS backends in the same
situation.

Reviewed-by: Jay Satiro
Reviewed-by: Emil Engler
Follow-up to 5a3efb1
Reported-by: iammrtau on github
Fixes #6003
Closes #6018

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 26 Sep 2020 11:39:37 +0000 (13:39 +0200)] 
RELEASE-NOTES: synced

5 years agoftp: make a 552 response return CURLE_REMOTE_DISK_FULL
Daniel Stenberg [Fri, 25 Sep 2020 15:13:42 +0000 (17:13 +0200)] 
ftp: make a 552 response return CURLE_REMOTE_DISK_FULL

Added test 348 to verify. Added a 'STOR' command to the test FTP
server to enable test 348. Documented the command in FILEFORMAT.md

Reported-by: Duncan Wilcox
Fixes #6016
Closes #6017

5 years agopause: only trigger a reread if the unpause sticks
Daniel Stenberg [Fri, 25 Sep 2020 07:45:35 +0000 (09:45 +0200)] 
pause: only trigger a reread if the unpause sticks

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

5 years agotest163[12]: require http to be built-in to run
Daniel Stenberg [Fri, 25 Sep 2020 11:01:46 +0000 (13:01 +0200)] 
test163[12]: require http to be built-in to run

... as speaking over an HTTPS proxy implies http!

Closes #6014

5 years agongtcp2: adapt to new NGTCP2_PROTO_VER_MAX define
Daniel Stenberg [Fri, 25 Sep 2020 06:17:49 +0000 (08:17 +0200)] 
ngtcp2: adapt to new NGTCP2_PROTO_VER_MAX define

Closes #6012

5 years agostrerror: honor Unicode API choice on Windows
Javier Blazquez [Thu, 24 Sep 2020 00:33:21 +0000 (17:33 -0700)] 
strerror: honor Unicode API choice on Windows

Closes #6005

5 years agoimap: make imap_send use dynbuf for the send buffer management
Daniel Stenberg [Thu, 24 Sep 2020 21:04:15 +0000 (23:04 +0200)] 
imap: make imap_send use dynbuf for the send buffer management

Reuses the buffer and thereby reduces number of mallocs over a transfer.

Closes #6010

5 years agoCurl_send: return error when pre_receive_plain can't malloc
Daniel Stenberg [Thu, 24 Sep 2020 22:12:10 +0000 (00:12 +0200)] 
Curl_send: return error when pre_receive_plain can't malloc

... will probably trigger some false DEAD CODE positives on non-windows
code analyzers for the conditional code.

Closes #6011

5 years agoftp: separate FTPS from FTP over "HTTPS proxy"
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

5 years agotests/data: Fix some mismatched XML tags in test cases
Dan Fandrich [Wed, 23 Sep 2020 21:53:08 +0000 (14:53 -0700)] 
tests/data: Fix some mismatched XML tags in test cases

This allows these test files to pass xmllint.

5 years agopingpong: use a dynbuf for the *_pp_sendf() function
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.

Closes #6004

5 years agodynbuf: add Curl_dyn_vaddf
Daniel Stenberg [Wed, 23 Sep 2020 07:21:36 +0000 (09:21 +0200)] 
dynbuf: add Curl_dyn_vaddf

Closes #6004

5 years agodynbuf: make *addf() not require extra mallocs
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.

Closes #5998

5 years agoKNOWN_BUGS: Unable to use PKCS12 certificate with Secure Transport
Daniel Stenberg [Wed, 23 Sep 2020 06:50:52 +0000 (08:50 +0200)] 
KNOWN_BUGS: Unable to use PKCS12 certificate with Secure Transport

Closes #5403

5 years agopingpong: remove a malloc per Curl_pp_vsendf call
Daniel Stenberg [Tue, 22 Sep 2020 14:26:50 +0000 (16:26 +0200)] 
pingpong: remove a malloc per Curl_pp_vsendf call

This typically makes 7-9 fewer mallocs per FTP transfer.

Closes #5997

5 years agosymbian: drop support
Daniel Stenberg [Mon, 21 Sep 2020 12:28:40 +0000 (14:28 +0200)] 
symbian: drop support

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

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 22 Sep 2020 11:55:11 +0000 (13:55 +0200)] 
RELEASE-NOTES: synced

5 years agocurl_krb5.h: rename from krb5.h
Daniel Stenberg [Tue, 22 Sep 2020 09:22:34 +0000 (11:22 +0200)] 
curl_krb5.h: rename from krb5.h

Follow-up from f4873ebd0be32cf

Turns out some older openssl installations go bananas otherwise.
Reported-by: Tom van der Woerdt
Fixes #5995
Closes #5996

5 years agotest1297: verify GOT_NOTHING with http proxy tunnel
Daniel Stenberg [Tue, 22 Sep 2020 06:55:11 +0000 (08:55 +0200)] 
test1297: verify GOT_NOTHING with http proxy tunnel

5 years agohttp_proxy: do not count proxy headers in the header bytecount
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

5 years agosetopt: return CURLE_BAD_FUNCTION_ARGUMENT on bad argument
Daniel Stenberg [Mon, 21 Sep 2020 21:27:21 +0000 (23:27 +0200)] 
setopt: return CURLE_BAD_FUNCTION_ARGUMENT on bad argument

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

5 years agokrb5: merged security.c and krb specific FTP functions in here
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).

Removed security.c
Renamed curl_sec.h to krb5.h

Closes #5987

5 years agoCurl_handler: add 'family' to each protocol
Daniel Stenberg [Mon, 21 Sep 2020 11:45:24 +0000 (13:45 +0200)] 
Curl_handler: add 'family' to each protocol

Makes get_protocol_family() faster and it moves the knowledge about the
"families" to each protocol handler, where it belongs.

Closes #5986

5 years agoparsedate: tune the date to epoch conversion
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).

Closes #5985

5 years agocmake: remove scary warning
Daniel Stenberg [Sun, 20 Sep 2020 16:25:10 +0000 (18:25 +0200)] 
cmake: remove scary warning

Remove the text saying

"the curl cmake build system is poorly maintained. Be aware"

... not because anything changed just now, but to encourage users to use
it and subsequently improve it.

Closes #5984

5 years agodocs/MQTT: remove outdated paaragraphs
Daniel Stenberg [Mon, 21 Sep 2020 09:02:32 +0000 (11:02 +0200)] 
docs/MQTT: remove outdated paaragraphs

5 years agodocs/MQTT: not experimental anymore
Daniel Stenberg [Mon, 21 Sep 2020 08:59:26 +0000 (10:59 +0200)] 
docs/MQTT: not experimental anymore

Follow-up to e37e4468688d8f

5 years agodocs/RESOURCES: remove
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/

Closes #5980

5 years agodocs/TheArtOfHttpScripting: convert to markdown
Daniel Stenberg [Fri, 18 Sep 2020 13:09:12 +0000 (15:09 +0200)] 
docs/TheArtOfHttpScripting: convert to markdown

Makes it easier to browse on github etc. Offers (better) links.

It should be noted that this document is already mostly outdated and
"Everything curl" at https://ec.haxx.se/ is a better resource and
tutorial.

Closes #5981

5 years agoBUGS: convert document to markdown
Daniel Stenberg [Fri, 18 Sep 2020 11:44:57 +0000 (13:44 +0200)] 
BUGS: convert document to markdown

Closes #5979

5 years ago--help: strdup the category
Daniel Stenberg [Fri, 18 Sep 2020 06:09:09 +0000 (08:09 +0200)] 
--help: strdup the category

... since it is converted and the original pointer is freed on Windows
unicode handling.

Follow-up to aa8777f63febc
Fixes #5977
Closes #5978
Reported-by: xwxbug on github
5 years agoCHECKSRC: document two missing warnings
Daniel Stenberg [Fri, 18 Sep 2020 11:54:27 +0000 (13:54 +0200)] 
CHECKSRC: document two missing warnings

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 18 Sep 2020 06:34:46 +0000 (08:34 +0200)] 
RELEASE-NOTES: synced

5 years agoftp: avoid risk of reading uninitialized integers
Daniel Stenberg [Thu, 17 Sep 2020 14:16:38 +0000 (16:16 +0200)] 
ftp: avoid risk of reading uninitialized integers

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

5 years agoeasy_reset: clear retry counter
Quentin Balland [Thu, 17 Sep 2020 15:31:23 +0000 (17:31 +0200)] 
easy_reset: clear retry counter

Closes #5975
Fixes #5974

5 years agoftp: get rid of the PPSENDF macro
Daniel Stenberg [Thu, 17 Sep 2020 13:15:08 +0000 (15:15 +0200)] 
ftp: get rid of the PPSENDF macro

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

5 years agoman pages: switch to https://example.com URLs
Daniel Stenberg [Wed, 16 Sep 2020 21:04:07 +0000 (23:04 +0200)] 
man pages: switch to https://example.com URLs

Since HTTPS is "the new normal", this update changes a lot of man page
examples to use https://example.com instead of the previous "http://..."

Closes #5969

5 years agogithub: remove the duplicate "Security vulnerability" entry
Daniel Stenberg [Thu, 17 Sep 2020 12:03:33 +0000 (14:03 +0200)] 
github: remove the duplicate "Security vulnerability" entry

... since github adds an entry automatically by itself.

Closes #5970

5 years agogithub: use new issue template feature
Emil Engler [Tue, 8 Sep 2020 06:50:16 +0000 (08:50 +0200)] 
github: use new issue template feature

This helps us to avoid getting feature requests as well as security
bugs reported into the issue tracker.

Closes #5936

5 years agourlapi: use more Curl_safefree
Emil Engler [Wed, 16 Sep 2020 19:33:27 +0000 (21:33 +0200)] 
urlapi: use more Curl_safefree

Closes #5968

5 years agomulti: align WinSock mask variables in Curl_multi_wait
Marc Hoersken [Sat, 12 Sep 2020 20:02:25 +0000 (22:02 +0200)] 
multi: align WinSock mask variables in Curl_multi_wait

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

5 years agomulti: reuse WinSock events variable in Curl_multi_wait
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

5 years agoTODO: dynamically decide to use socketpair
Daniel Stenberg [Wed, 16 Sep 2020 21:35:39 +0000 (23:35 +0200)] 
TODO: dynamically decide to use socketpair

Suggested-by: Anders Bakken
Closes #4829

5 years agoTODO: add PR reference for native IDN support on macOS
Daniel Stenberg [Wed, 16 Sep 2020 21:27:07 +0000 (23:27 +0200)] 
TODO: add PR reference for native IDN support on macOS

As there was work started on this that never got completed.

Closes #5371

5 years agotool_help.h: update copyright year range
Daniel Stenberg [Wed, 16 Sep 2020 21:08:20 +0000 (23:08 +0200)] 
tool_help.h: update copyright year range

Follow-up from aa8777f63febca

5 years agoCI/azure: disable test 571 in the msys2 builds
Daniel Stenberg [Tue, 15 Sep 2020 11:06:39 +0000 (13:06 +0200)] 
CI/azure: disable test 571 in the msys2 builds

It's just too flaky there

Reviewed-by: Marc Hoersken
Closes #5954

5 years agotool_writeout: protect fputs() from NULL
Daniel Stenberg [Tue, 15 Sep 2020 13:53:13 +0000 (15:53 +0200)] 
tool_writeout: protect fputs() from NULL

When the code was changed to do fputs() instead of fprintf() it got
sensitive for NULL pointers; add checks for that.

Follow-up from 0c1e767e83ec66

Closes #5963

5 years agotest3015: verify stdout "as text"
Daniel Stenberg [Tue, 15 Sep 2020 12:35:22 +0000 (14:35 +0200)] 
test3015: verify stdout "as text"

Follow-up from 0c1e767e83e to please win32 tests

Closes #5962

5 years agotravis: use libressl v3.1.4 instead of master
Daniel Stenberg [Tue, 15 Sep 2020 16:56:14 +0000 (18:56 +0200)] 
travis: use libressl v3.1.4 instead of master

... as their git master seems too fragile to use (and 3.2.1 which is the
latest has a build failure).

Closes #5964

5 years agotests/FILEFORMAT: document type=shell for <command>
Daniel Stenberg [Tue, 15 Sep 2020 13:42:56 +0000 (15:42 +0200)] 
tests/FILEFORMAT: document type=shell for <command>

5 years agotests/FILEFORMAT: document nonewline support for <file>
Daniel Stenberg [Tue, 15 Sep 2020 12:45:08 +0000 (14:45 +0200)] 
tests/FILEFORMAT: document nonewline support for <file>

The one in <client>, that creates files.

Follow-up from b83947c8df7

5 years agotool_writeout: add new writeout variable, %{num_headers}
anio [Wed, 9 Sep 2020 15:05:49 +0000 (15:05 +0000)] 
tool_writeout: add new writeout variable, %{num_headers}

This variable gives the number of headers.

Closes #5947

5 years agotool_urlglob: fix compiler warning "unreachable code"
Daniel Stenberg [Mon, 14 Sep 2020 22:31:18 +0000 (00:31 +0200)] 
tool_urlglob: fix compiler warning "unreachable code"

(On Windows builds.)

Follow-up to 70a3b003d9

5 years agovtls: deduplicate client certificates in ssl_config_data
Gergely Nagy [Mon, 29 Jun 2020 18:07:37 +0000 (20:07 +0200)] 
vtls: deduplicate client certificates in ssl_config_data

Closes #5629

5 years agoftp: a 550 response to SIZE returns CURLE_REMOTE_FILE_NOT_FOUND
Daniel Stenberg [Sat, 12 Sep 2020 16:27:08 +0000 (18:27 +0200)] 
ftp: a 550 response to SIZE returns CURLE_REMOTE_FILE_NOT_FOUND

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

5 years agocurl: make checkpasswd use dynbuf
Daniel Stenberg [Fri, 11 Sep 2020 09:20:07 +0000 (11:20 +0200)] 
curl: make checkpasswd use dynbuf

Closes #5952

5 years agocurl: make glob_match_url use dynbuf
Daniel Stenberg [Fri, 11 Sep 2020 09:01:24 +0000 (11:01 +0200)] 
curl: make glob_match_url use dynbuf

Closes #5952

5 years agocurl: make file2memory use dynbuf
Daniel Stenberg [Fri, 11 Sep 2020 08:54:35 +0000 (10:54 +0200)] 
curl: make file2memory use dynbuf

Closes #5952

5 years agocurl: make file2string use dynbuf
Daniel Stenberg [Fri, 11 Sep 2020 08:49:24 +0000 (10:49 +0200)] 
curl: make file2string use dynbuf

Closes #5952

5 years agoimap: set cselect_bits to CURL_CSELECT_IN initially
Antarpreet Singh [Thu, 7 May 2020 19:20:26 +0000 (00:50 +0530)] 
imap: set cselect_bits to CURL_CSELECT_IN initially

... 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

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 14 Sep 2020 07:47:20 +0000 (09:47 +0200)] 
RELEASE-NOTES: synced

5 years agotest434: test -K use in a single line without newline
Daniel Stenberg [Sun, 13 Sep 2020 21:24:13 +0000 (23:24 +0200)] 
test434: test -K use in a single line without newline

Closes #5946

5 years agoruntests: allow creating files without newlines
Daniel Stenberg [Sun, 13 Sep 2020 21:23:44 +0000 (23:23 +0200)] 
runtests: allow creating files without newlines

Closes #5946

5 years agocurl: use curlx_dynbuf for realloc when loading config files
Daniel Stenberg [Wed, 9 Sep 2020 13:41:25 +0000 (15:41 +0200)] 
curl: use curlx_dynbuf for realloc when loading config files

... fixes an integer overflow at the same time.

Reported-by: ihsinme on github
Assisted-by: Jay Satiro
Closes #5946

5 years agodynbuf: provide curlx_ names for reuse by the curl tool
Daniel Stenberg [Wed, 9 Sep 2020 13:41:05 +0000 (15:41 +0200)] 
dynbuf: provide curlx_ names for reuse by the curl tool

Closes #5946

5 years agodynbuf: make sure Curl_dyn_tail() zero terminates
Daniel Stenberg [Sun, 13 Sep 2020 21:08:45 +0000 (23:08 +0200)] 
dynbuf: make sure Curl_dyn_tail() zero terminates

Closes #5959

5 years agotests: add test1912 to the dist
Daniel Stenberg [Sat, 12 Sep 2020 16:09:49 +0000 (18:09 +0200)] 
tests: add test1912 to the dist

Follow-up to 70984ce1be4cab6c

5 years agodocs/LICENSE-MIXING: remove
Daniel Stenberg [Fri, 11 Sep 2020 15:17:54 +0000 (17:17 +0200)] 
docs/LICENSE-MIXING: remove

This document is not maintained and I feel that it doesn't provide much
value to users anymore (if it ever did).

Closes #5955

5 years agohttp: consolidate nghttp2_session_mem_recv() call paths
Laramie Leavitt [Fri, 3 Jul 2020 20:10:27 +0000 (13:10 -0700)] 
http: consolidate nghttp2_session_mem_recv() call paths

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

5 years agoHISTORY: mention alt-svc added in 2019
Daniel Stenberg [Thu, 10 Sep 2020 15:39:15 +0000 (17:39 +0200)] 
HISTORY: mention alt-svc added in 2019

... and make 1996 the first year subtitle

5 years agobase64: also build for pop3 and imap
Daniel Stenberg [Wed, 9 Sep 2020 20:32:17 +0000 (22:32 +0200)] 
base64: also build for pop3 and imap

Follow-up to the fix in 20417a13fb8f83

Reported-by: Michael Olbrich
Fixes #5937
Closes #5948

5 years agobase64: enable in build with SMTP
Daniel Stenberg [Tue, 8 Sep 2020 07:23:09 +0000 (09:23 +0200)] 
base64: enable in build with SMTP

The oauth2 support is used with SMTP and it uses base64 functions.

Reported-by: Michael Olbrich
Fixes #5937
Closes #5938

5 years agocurl_mime_headers.3: fix the example's use of curl_slist_append
Daniel Stenberg [Tue, 8 Sep 2020 15:25:27 +0000 (17:25 +0200)] 
curl_mime_headers.3: fix the example's use of curl_slist_append

Reported-by: sofaboss on github
Fixes #5942
Closes #5943