Commit Graph

2449 Commits

Author SHA1 Message Date
Cherish98 6a5e020d4d
curl: fix handling of -q option
The match of the "-q" option (short for "--disable") should:
a) allow concatenation with other single-letters; and
b) be case-sensitive, lest confusing with "-Q" ("--quote")

Closes #6364
2020-12-23 16:20:39 +01:00
Daniel Stenberg 7a90ddf88f
curl: add variables to --write-out
In particular, these ones can help a user to create its own error
message when one or transfers fail.

writeout: add 'onerror', 'url', 'urlnum', 'exitcode', 'errormsg'

onerror - lets a user only show the rest on non-zero exit codes

url - the input URL used for this transfer

urlnum - the numerical URL counter (0 indexed) for this transfer

exitcode - the numerical exit code for the transfer

errormsg - obvious

Reported-by: Earnestly on github
Fixes #6199
Closes #6207
2020-12-21 16:38:48 +01:00
Matthias Gatto 6b27df8269
tool: add AWS HTTP v4 Signature support
Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
2020-12-21 16:28:03 +01:00
Daniel Stenberg a7696c7343
curl: add --create-file-mode [mode]
This option sets the (octal) mode to use for the remote file when one is
created, using the SFTP, SCP or FILE protocols. When not set, the
default is 0644.

Closes #6244
2020-12-21 10:52:41 +01:00
Daniel Stenberg cd7bc174ce
tool_setopt: provide helper output in debug builds
... for when setopt() returns error.
2020-12-18 09:58:04 +01:00
Daniel Stenberg bc7ecc71c0
tooĺ_writeout: fix the -w time output units
Fix regression from commit fc813f80e1 (#6248) that changed the unit
to microseconds instead of seconds with fractions

Reported-by: 不确定
Fixes #6321
Closes #6322
2020-12-15 08:09:29 +01:00
Daniel Stenberg ec9cc725d5
ftp: CURLOPT_FTP_SKIP_PASV_IP by default
The command line tool also independently sets --ftp-skip-pasv-ip by
default.

Ten test cases updated to adapt the modified --libcurl output.

Bug: https://curl.se/docs/CVE-2020-8284.html
CVE-2020-8284

Reported-by: Varnavas Papaioannou
2020-12-07 08:38:05 +01:00
Daniel Stenberg fc813f80e1
tool_writeout: use off_t getinfo-types instead of doubles
Commit 3b80d3ca46 (June 2017) introduced getinfo replacement
variables that use curl_off_t instead of doubles. Switch the --write-out
function over to use them.

Closes #6248
2020-11-26 08:13:51 +01:00
Rikard Falkeborn 920f49a20b
infof/failf calls: fix format specifiers
Update a few format specifiers to match what is being printed.

Closes #6241
2020-11-24 13:18:41 +01:00
Viktor Szakats 3e092adf67
Makefile.m32: add support for UNICODE builds
It requires the linker to support the `-municode` option.
This is available in more recent mingw-w64 releases.

Ref: https://gcc.gnu.org/onlinedocs/gcc/x86-Windows-Options.html
Ref: https://stackoverflow.com/questions/3571250/wwinmain-unicode-and-mingw/11706847#11706847

Reviewed-by: Jay Satiro
Reviewed-by: Marcel Raad

Closes #6228
2020-11-23 16:56:27 +00:00
Oliver Urbann 0d16a49c16
curl: add compatibility for Amiga and GCC 6.5
Changes are mainly reordering and adding of includes required
to compile with a more recent version of GCC.

Closes #6220
2020-11-20 23:36:51 +01:00
Daniel Stenberg 0362944a2e
curl: only warn not fail, if not finding the home dir
... as there's no good reason to error out completely.

Reported-by: Andreas Fischer
Fixes #6200
Closes #6201
2020-11-13 11:32:46 +01:00
Daniel Stenberg f7e72f4d5c
tool_operate: set HSTS with CURLOPT_HSTS to pass on filename
Closes #6175
2020-11-06 08:22:28 +01:00
Daniel Stenberg ac0a88fd25
copyright: fix year ranges
Follow-up from 4d2f800677
2020-11-05 08:22:10 +01:00
Daniel Stenberg 4d2f800677
curl.se: new home
Closes #6172
2020-11-04 23:59:47 +01:00
Daniel Stenberg 7385610d0c
hsts: add support for Strict-Transport-Security
- 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
2020-11-03 16:08:42 +01:00
Daniel Stenberg 9386e2a37a
tool_debug_cb: do not assume zero-terminated data
Follow-up to d70a5b5a0f
2020-11-03 08:14:46 +01:00
Daniel Stenberg 6da7a7e5ce
tool_operate: --retry for HTTP 408 responses too
This was inadvertently dropped from the code when the parallel support
was added.

Regression since b88940850 (7.66.0)

Reviewed-by: Jay Satiro
Closes #6155
2020-11-02 08:14:22 +01:00
Daniel Stenberg ce8ac2db2b
tool_operate: bail out proper on errors for parallel setup
... otherwise for example trying to upload a missing file just causes a
loop.

Reported-by: BrumBrum on hackerone
Closes #6141
2020-10-29 17:26:31 +01:00
Emil Engler 499b3b6ff6
tool_help: make "output" description less confusing
Currently the description of "output" is misleading when comparing it
"verbose".

Closes #6118
2020-10-24 23:46:02 +02:00
Viktor Szakats 769c9a4eec
Makefile.m32: add support for HTTP/3 via ngtcp2+nghttp3
Approved-by: Daniel Stenberg
Closes #6092
2020-10-16 07:15:19 +00:00
Daniel Stenberg c5ff3fb2cd
tool_operate: fix compiler warning when --libcurl is disabled
Closes #6095
2020-10-16 08:13:42 +02:00
Daniel Stenberg 7c88fe375b
src/tool_filetime: disable -Wformat on mingw for this file
With gcc 10 on mingw we otherwise get this warning:

 error: ISO C does not support the 'I' printf flag [-Werror=format=]

Fixes #6079
Closes #6082
2020-10-15 11:00:43 +02:00
Viktor Szakats c8ca705474
src/Makefile.m32: fix undefined curlx_dyn_* errors
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.

Closes #6060
2020-10-11 23:42:18 +02:00
Daniel Stenberg ec1cb755bf
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!

Fixes #6042
Closes #6043
2020-10-05 10:06:58 +02:00
Emil Engler 639c6bfcfa
--help: move two options from the misc category
The cmdline opts delegation and suppress-connect-headers
fit better into auth and proxy rather than misc.

Follow-up to aa8777f63f
Closes #6038
2020-10-03 22:59:50 +02:00
Daniel Stenberg 26a7d51c21
checksrc: warn on space after exclamation mark
Closes #6034
2020-10-02 16:35:53 +02:00
Daniel Stenberg 01327600e3
tool_setopt: escape binary data to hex, not octal 2020-10-02 09:35:37 +02:00
Daniel Stenberg 3997b3e2a4
curl: make --libcurl show binary posts correctly
Reported-by: Stephan Mühlstrasser
Fixes #6031
Closes #6032
2020-10-02 09:35:37 +02:00
Daniel Gustafsson 2aac895fb6 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>
2020-09-30 21:10:14 +02:00
Daniel Stenberg 3d64031fa7
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
2020-09-22 15:14:12 +02:00
Daniel Stenberg 5bd63e0619
--help: strdup the category
... since it is converted and the original pointer is freed on Windows
unicode handling.

Follow-up to aa8777f63f
Fixes #5977
Closes #5978
Reported-by: xwxbug on github
2020-09-18 14:47:23 +02:00
Daniel Stenberg ec6363be18
tool_help.h: update copyright year range
Follow-up from aa8777f63f
2020-09-16 23:08:20 +02:00
Daniel Stenberg 0b4c4145aa
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 0c1e767e83

Closes #5963
2020-09-15 22:52:51 +02:00
anio 0c1e767e83
tool_writeout: add new writeout variable, %{num_headers}
This variable gives the number of headers.

Closes #5947
2020-09-15 00:37:08 +02:00
Daniel Stenberg 4e66207c58
tool_urlglob: fix compiler warning "unreachable code"
(On Windows builds.)

Follow-up to 70a3b003d9
2020-09-15 00:31:18 +02:00
Daniel Stenberg a167949848
curl: make checkpasswd use dynbuf
Closes #5952
2020-09-14 12:33:53 +02:00
Daniel Stenberg 70a3b003d9
curl: make glob_match_url use dynbuf
Closes #5952
2020-09-14 12:33:52 +02:00
Daniel Stenberg 893bbd7458
curl: make file2memory use dynbuf
Closes #5952
2020-09-14 12:33:51 +02:00
Daniel Stenberg 0938f828bf
curl: make file2string use dynbuf
Closes #5952
2020-09-14 12:33:48 +02:00
Daniel Stenberg 47dd957daf
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
2020-09-14 08:32:45 +02:00
Daniel Stenberg 363a88ac9d
curl: retry delays in parallel mode no longer sleeps blocking
The previous sleep for retries would block all other concurrent
transfers. Starting now, the retry will instead be properly marked to
not get restarted until after the delay time but other transfers can
still continue in the mean time.

Closes #5917
2020-09-06 00:00:10 +02:00
Daniel Stenberg e4e725f835
curl:parallel_transfers: make sure retry readds the transfer
Reported-by: htasta on github
Fixes #5905
Closes #5917
2020-09-05 23:59:48 +02:00
Daniel Stenberg bbf8cae44d
build: drop support for building with Watcom
These files are not maintained, they seem to have no users, Watcom
compilers look like not having users nor releases anymore.

Closes #5918
2020-09-05 21:51:37 +02:00
Daniel Stenberg 6ecb63e493
curl: in retry output don't call all problems "transient"
... because when --retry-all-errors is used, the error isn't necessarily
transient at all.

Closes #5916
2020-09-05 18:14:48 +02:00
Emil Engler aa8777f63f
tool: update --help with categories
This commit is a part of "--help me if you can"

Closes #5680
2020-09-04 15:38:20 +02:00
Michael Baentsch ede125b7b7
tls: add CURLOPT_SSL_EC_CURVES and --curves
Closes #5892
2020-08-30 17:24:04 +02:00
Marcel Raad 95aea798db CMake: add option to enable Unicode on Windows
As already existing for winbuild.

Closes https://github.com/curl/curl/pull/5843
2020-08-29 10:01:10 +02:00
Daniel Stenberg 5620d2cc78
curl: add --output-dir
Works with --create-dirs and with -J

Add test 3008, 3009, 3011, 3012 and 3013 to verify.

Closes #5637
2020-08-24 22:41:37 +02:00
Daniel Stenberg 4be1f8dc01
curl: support XDG_CONFIG_HOME to find .curlrc
Added test433 to verify. Updated documentation.

Reviewed-by: Jay Satiro
Suggested-by: Eli Schwartz
Fixes #5829
Closes #5837
2020-08-24 16:37:09 +02:00
Daniel Stenberg 98c94596f5
etag: save and use the full received contents
... which makes it support weak tags and non-standard etags too!

Added test case 347 to verify blank incoming ETag:

Fixes #5610
Closes #5833
2020-08-24 10:02:41 +02:00
Viktor Szakats 38039da764
Makefile.m32: add ability to override zstd libs [ci skip]
Similarly to brotli, where this was already possible.
E.g. it allows to link zstd statically to libcurl.dll.

Ref: https://github.com/curl/curl-for-win/issues/12
Ref: d9b266afd2

Closes https://github.com/curl/curl/pull/5840
2020-08-22 21:08:28 +00:00
Daniel Stenberg 010fb9830b
copyright: update/correct the year range on a few files 2020-08-14 10:20:27 +02:00
Cameron Cawley 2646be0dc0
tool_doswin: Simplify Windows version detection
Closes https://github.com/curl/curl/pull/5754
2020-08-02 17:59:52 +02:00
Cameron Cawley 790137b0f7
win32: Add Curl_verify_windows_version() to curlx
Closes https://github.com/curl/curl/pull/5754
2020-08-02 17:58:44 +02:00
Jay Satiro 5f79891658 tool_cb_wrt: fix outfile mode flags for Windows
- Use S_IREAD and S_IWRITE mode permission flags to create the file
  on Windows instead of S_IRUSR, S_IWUSR, etc.

Windows only accepts a combination of S_IREAD and S_IWRITE. It does not
acknowledge other combinations, for which it may generate an assertion.

This is a follow-up to 81b4e99 from yesterday, which improved the
existing file check with -J.

Ref: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/open-wopen#remarks
Ref: https://github.com/curl/curl/pull/5731

Closes https://github.com/curl/curl/pull/5742
2020-07-29 11:36:14 -04:00
Daniel Stenberg 2f72ad44fc
checksrc: ban gmtime/localtime
They're not thread-safe so they should not be used in libcurl code.

Explictly enabled when deemed necessary and in examples and tests

Reviewed-by: Nicolas Sterchele
Closes #5732
2020-07-28 23:51:17 +02:00
Daniel Stenberg 81b4e99b1e
curl: improve the existing file check with -J
Previously a file that isn't user-readable but is user-writable would
not be properly avoided and would get overwritten.

Reported-by: BrumBrum on hackerone
Assisted-by: Jay Satiro
Bug: https://hackerone.com/reports/926638
Closes #5731
2020-07-28 23:28:40 +02:00
Marcel Raad 0c6112a139
WIN32: stop forcing narrow-character API
Except where the results are only used for character output.
getenv is not touched because it's part of the public API, and having
it return UTF-8 instead of ANSI would be a breaking change.

Fixes https://github.com/curl/curl/issues/5658
Fixes https://github.com/curl/curl/issues/5712
Closes https://github.com/curl/curl/pull/5718
2020-07-27 10:42:38 +02:00
Marcel Raad c90e48c005
util: silence conversion warnings
timeval::tv_usec might be a 32-bit integer and timespec::tv_nsec might
be a 64-bit integer. This is the case when building for recent macOS
versions, for example. Just treat tv_usec as an int, which should
hopefully always be sufficient on systems with
`HAVE_CLOCK_GETTIME_MONOTONIC`.

Closes https://github.com/curl/curl/pull/5695
2020-07-19 10:34:58 +02:00
Daniel Stenberg 3c4c4ec2ee
strdup: remove the odd strlen check
It confuses code analyzers with its use of -1 for unsigned value. Also,
a check that's not normally used in strdup() code - and not necessary.

Closes #5697
2020-07-18 12:37:25 +02:00
Daniel Stenberg b331a5fa09
file2memory: use a define instead of -1 unsigned value
... to use the maximum value for 'size_t' when detecting integer overflow.
Changed the limit to max/4 as already that seems unreasonably large.

Codacy didn't like the previous approach.

Closes #5683
2020-07-16 00:34:05 +02:00
Daniel Stenberg f5e6907d52
curl: add %{method} to the -w variables
Gets the CURLINFO_EFFECTIVE_METHOD from libcurl.

Added test 1197 to verify.
2020-07-14 17:53:45 +02:00
Viktor Szakats 8fa3f7809a
windows: add unicode to feature list
Reviewed-by: Marcel Raad
Reviewed-by: Marc Hörsken

Closes #5491
2020-07-14 08:30:17 +00:00
Gilles Vollant e13357b14b
content_encoding: add zstd decoding support
include zstd curl patch for Makefile.m32 from vszakats
and include Add CMake support for zstd from Peter Wu

Helped-by: Viktor Szakats
Helped-by: Peter Wu
Closes #5453
2020-07-12 18:11:37 +02:00
Kamil Dudka d2fd845c35 tool_getparam: make --krb option work again
It was disabled by mistake in commit curl-7_37_1-23-ge38ba4301.

Bug: https://bugzilla.redhat.com/1833193
Closes #5640
2020-07-03 00:04:47 +02:00
Daniel Stenberg 032e838b73
terminology: call them null-terminated strings
Updated terminology in docs, comments and phrases to refer to C strings
as "null-terminated". Done to unify with how most other C oriented docs
refer of them and what users in general seem to prefer (based on a
single highly unscientific poll on twitter).

Reported-by: coinhubs on github
Fixes #5598
Closes #5608
2020-06-28 00:31:24 +02:00
Jay Satiro cb85275377 tool_cb_hdr: Fix etag warning output and return code
- Return 'failure' on failure, to follow the existing style.

- Put Warning: and the warning message on the same line.

Ref: https://github.com/curl/curl/issues/5610

Closes https://github.com/curl/curl/pull/5612
2020-06-26 09:48:58 -04:00
Jay Satiro bc052cc878 tool_operate: Don't use Windows CA store as a fallback
Background:

148534d added CURLSSLOPT_NATIVE_CA to use the Windows OS certificate
store in libcurl w/ OpenSSL on Windows. CURLSSLOPT_NATIVE_CA overrides
CURLOPT_CAINFO if both are set. The curl tool will fall back to
CURLSSLOPT_NATIVE_CA if it could not find a certificate bundle to set
via CURLOPT_CAINFO.

Problem:

libcurl may be built with hardcoded paths to a certificate bundle or
directory, and if CURLSSLOPT_NATIVE_CA is used then those paths are
ignored.

Solution:

A solution is still being discussed but since there's an impending
release this commit removes using CURLSSLOPT_NATIVE_CA in the curl tool.

Ref: https://github.com/curl/curl/issues/5585
2020-06-22 15:26:07 -04:00
Daniel Stenberg 8236aba585
tool_getparam: -i is not OK if -J is used
Reported-by: sn on hackerone
Bug: https://curl.haxx.se/docs/CVE-2020-8177.html
2020-06-22 00:49:58 +02:00
Daniel Stenberg fa4fbc533f
urlglob: treat literal IPv6 addresses with zone IDs as a host name
... and not as a "glob". Now done by passing the supposed host to the
URL parser which supposedly will do a better job at identifying "real"
numerical IPv6 addresses.

Reported-by: puckipedia on github
Fixes #5576
Closes #5579
2020-06-18 16:43:06 +02:00
Daniel Stenberg ada7bd1191
tool_getparam: repair the error message for unknown flag
Follow-up to 9e5669f388
Detected by Coverity CID 1464582 ("Logically dead code")

Closes #5577
2020-06-18 13:59:42 +02:00
Jay Satiro f54b6c4bc2 tool_getparam: fix memory leak in parse_args
Prior to this change in Windows Unicode builds most parsed options would
not be freed.

Found using _CrtDumpMemoryLeaks().

Ref: https://github.com/curl/curl/issues/5545
2020-06-09 11:49:44 -04:00
Daniel Stenberg a3e972313b
tool_cfgable: free login_options at exit
Memory leak
Reported-by: Geeknik Labs
Fixes #5535
Closes #5536
2020-06-08 08:41:11 +02:00
Viktor Szakats 308c243db5
all: fix codespell errors
Reviewed-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Closes https://github.com/curl/curl/pull/5452
2020-05-25 19:44:04 +00:00
Daniel Stenberg d75e6ce85a
copyright: updated year ranges out of sync
... and whitelisted a few more files in the the copyright.pl script.
2020-05-24 00:02:33 +02:00
Daniel Stenberg 006d2991bd
curl: remove -J "informational" written on stdout
curl would previously show "curl: Saved to filename 'name from header'"
if -J was used and a name was picked from the Content-Disposition
header. That output could interfer with other stdout output, such as -w.

This commit removes that output line.
Bug: https://curl.haxx.se/mail/archive-2020-05/0044.html
Reported-by: Коваленко Анатолий Викторович
Closes #5435
2020-05-23 23:12:53 +02:00
Daniel Stenberg 33d60d09f3
tool_paramhlp: fixup C89 mistake
Follow-up to c5f0a9db22.
2020-05-19 08:58:33 +02:00
Siva Sivaraman c5f0a9db22
tool_paramhlp: fixed potentially uninitialized strtol() variable
Seems highly unlikely to actually be possible, but better safe than
sorry.

Closes #5417
2020-05-19 08:55:27 +02:00
Siva Sivaraman c4df1f75ad
tool_operate: fixed potentially uninitialized variables
... in curl_easy_getinfo() calls. They're harmless but clearing the
variables makes the code safer and comforts the reader.

Closes #5416
2020-05-19 08:53:41 +02:00
Gilles Vollant cac5374298
setopt: support certificate options in memory with struct curl_blob
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
2020-05-15 13:03:59 +02:00
Daniel Stenberg 8df455479f
source cleanup: remove all custom typedef structs
- Stick to a single unified way to use structs
 - Make checksrc complain on 'typedef struct {'
 - Allow them in tests, public headers and examples

 - Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually
   typedef different types/structs depending on build conditions.

Closes #5338
2020-05-15 08:54:42 +02:00
Marcel Raad 9e5669f388
tool: support UTF-16 command line on Windows
- use `wmain` instead of `main` when `_UNICODE` is defined [0]
- define `argv_item_t` as `wchar_t *` in this case
- use the curl_multibyte gear to convert the command-line arguments to
  UTF-8

This makes it possible to pass parameters with characters outside of
the current locale on Windows, which is required for some tests, e.g.
the IDN tests. Out of the box, this currently only works with the
Visual Studio project files, which default to Unicode, and winbuild
with the `ENABLE_UNICODE` option.

[0] https://devblogs.microsoft.com/oldnewthing/?p=40643

Ref: https://github.com/curl/curl/issues/3747
Closes https://github.com/curl/curl/pull/3784
2020-05-14 18:13:36 +02:00
Marcel Raad a55c835e6b
curl_multibyte: add to curlx
This will also be needed in the tool and tests.

Ref: https://github.com/curl/curl/pull/3758#issuecomment-482197512
Closes https://github.com/curl/curl/pull/3784
2020-05-14 18:13:27 +02:00
Daniel Stenberg 66b0775763
checksrc: enhance the ASTERISKSPACE and update code accordingly
Fine: "struct hello *world"

Not fine: "struct hello* world" (and variations)

Closes #5386
2020-05-14 00:02:05 +02:00
Daniel Stenberg cd35371163
tool: shorten 3 --help descriptions
--happy-eyeballs-timeout-ms, --resolve and --ssl-revoke-best-effort

gen.pl already warned about these lines but we didn't listen

Closes #5379
2020-05-13 16:37:22 +02:00
Jay Satiro 79d60a9282 retry-all-errors.d: Shorten the summary line
Follow-up to b995bb5 from a few moments ago.

Reported-by: Daniel Stenberg

Ref: https://github.com/curl/curl/commit/b995bb5#r39108929
2020-05-12 03:12:55 -04:00
Jay Satiro b995bb58cb tool: Add option --retry-all-errors to retry on any error
The "sledgehammer" of retrying.

Closes https://github.com/curl/curl/pull/5185
2020-05-12 03:00:15 -04:00
Daniel Stenberg 6f63ab41b2
tool_operate: only set CURLOPT_SSL_OPTIONS if SSL support is present
Reported-by: Marcel Raad
Follow-up to 148534db5
Fixes #5367
Closes #5369
2020-05-10 15:33:51 +02:00
Gilles Vollant 148534db57
CURLOPT_SSL_OPTIONS: add *_NATIVE_CA to use Windows CA store (with openssl)
Closes #4346
2020-05-08 15:55:04 +02:00
Daniel Stenberg 878214df44
tool: do not declare functions with Curl_ prefix
To avoid collision risks with private libcurl symbols when linked with
static versions (or just versions not hiding internal symbols).

Reported-by: hydra3333 on github
Fixes #5219
Closes #5234
2020-04-14 08:12:27 +02:00
Nathaniel R. Lewis 7fa1578471
cmake: add aliases so exported target names are available in tree
Reviewed-by: Brad King
Closes #5206
2020-04-13 23:27:35 +02:00
Kwon-Young Choi a448a4ce26
curl: allow both --etag-compare and --etag-save with same file name
This change inverse the order of processing for the --etag-compare and
--etag-save option to process first --etag-compare. This in turn allows
to use the same file name to compare and save an etag.

The original behavior of not failing if the etag file does not exists is
conserved.

Fixes #5179
Closes #5180
2020-04-05 01:07:52 +02:00
Daniel Stenberg d1369fe216
misc: copyright year updates
Follow-up to 7a71965e9
2020-03-31 11:02:18 +02:00
Harry Sintonen 7a71965e97
build: fixed build for systems with select() in unistd.h
Closes #5169
2020-03-31 10:59:06 +02:00
Daniel Stenberg 0e607542dc
cleanup: insert newline after if() conditions
Our code style mandates we put the conditional block on a separate
line. These mistakes are now detected by the updated checksrc.
2020-03-30 16:05:30 +02:00
Daniel Stenberg 93fafb93db
curl.h: remnove CURL_VERSION_ESNI. Never supported nor documented
Considered experimental and therefore we can do this.

Closes #5157
2020-03-29 23:28:49 +02:00
Michael Kaufmann 884de1a763 writeout_json: Fix data type issues
Load long values correctly (e.g. for http_code).

Use curl_off_t (not long) for:
- size_download (CURLINFO_SIZE_DOWNLOAD_T)
- size_upload (CURLINFO_SIZE_UPLOAD_T)

The unit for these values is bytes/second, not microseconds:
- speed_download (CURLINFO_SPEED_DOWNLOAD_T)
- speed_upload (CURLINFO_SPEED_UPLOAD_T)

Fixes #5131
Closes #5152
2020-03-27 23:32:25 +01:00
Daniel Stenberg 361d4f3fdc
docs/make: generate curl.1 from listed files only
Previously it rendered the page from files matching "*.d" in the correct
directory, which worked fine in git builds when the files were added but
made it easy to forget adding the files to the dist.

Now, only man page sections listed in DPAGES in Makefile.inc will be
used, thus "forcing" us to update this to get the man page right and get
it included in the dist at the same time.

Ref: #5146
Closes #5149
2020-03-26 13:25:59 +01:00
Daniel Stenberg 9a8b3b3e13
copyright: fix out-of-date copyright ranges and missing headers
Reported by the new script 'scripts/copyright.pl'. The script has a
regex whitelist for the files that don't need copyright headers.

Removed three (mostly usesless) README files from docs/

Closes #5141
2020-03-24 15:05:59 +01:00