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