summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* copyright: fix year ranges in need of updatesDaniel Stenberg2021-02-032-2/+2
|
* http: improve AWS HTTP v4 Signature authDmitry Wagin2021-01-305-6/+7
| | | | | | | | | | | | | | | | | | - Add support services without region and service prefixes in the URL endpoint (ex. Min.IO, GCP, Yandex Cloud, Mail.Ru Cloud Solutions, etc) by providing region and service parameters via aws-sigv4 option. - Add [:region[:service]] suffix to aws-sigv4 option; - Fix memory allocation errors. - Refactor memory management. - Use Curl_http_method instead() STRING_CUSTOMREQUEST. - Refactor canonical headers generating. - Remove repeated sha256_to_hex() usage. - Add some docs fixes. - Add some codestyle fixes. - Add overloaded strndup() for debug - curl_dbg_strndup(). - Update tests. Closes #6524
* copyright: fix missing year (range) updatesDaniel Stenberg2021-01-293-3/+3
|
* tool_writeout: make %{errormsg} blank for no errorsDaniel Stenberg2021-01-281-3/+4
| | | | Closes #6539
* build: fix djgpp buildsGisle Vanem2021-01-271-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update build instructions in packages/DOS/README - Extend 'VPATH' with 'vquic' and 'vssh'. - Allow 'Makefile.dist' to build both 'lib' and 'src'. - Allow using the Windows hosted djgpp cross compiler to build for MSDOS under Windows. - 'USE_SSL' -> 'USE_OPENSSL' - Added a 'link_EXE' macro. Etc, etc. - Linking 'curl.exe' needs '$(CURLX_CFILES)' too. - Do not pick-up '../lib/djgpp/*.o' files. Recompile locally. - Generate a gzipped 'tool_hugehelp.c' if 'USE_ZLIB=1'. - Remove 'djgpp-clean' - Adapt to new C-ares directory structure - Use conditional variable assignments Clarify the 'conditional variable assignment' in 'common.dj'. Closes https://github.com/curl/curl/pull/6382
* curl: include the file name in --xattr/--remote-time error msgsDaniel Stenberg2021-01-272-4/+4
|
* curl: s/config->global/global/ in single_transfer()Daniel Stenberg2021-01-271-11/+11
|
* curl: move fprintf outputs to warnfDaniel Stenberg2021-01-274-47/+41
| | | | | | | | | For setting and getting time of the download. To make the outputs respect --silent etc. Reported-by: Viktor Szakats Fixes #6533 Closes #6535
* tool_operate: spellfix a commentDaniel Stenberg2021-01-141-1/+1
|
* tool_doswin: Restore original console settings on CTRL signalJay Satiro2021-01-122-53/+66
| | | | | | | | | | | | | | | | | | - Move Windows terminal init code from tool_main to tool_doswin. - Restore the original console settings on CTRL+C and CTRL+BREAK. Background: On Windows the curl tool changes the console settings to enable virtual terminal processing (eg color output) if supported (ie Win 10). The original settings are restored on exit but prior to this change were not restored in the case of the CTRL signals. Windows VT behavior varies depending on console/powershell/terminal; refer to the discussion in #6226. Assisted-by: Rich Turner Closes https://github.com/curl/curl/pull/6226
* help: update to current codebaseEmil Engler2021-01-121-5/+6
| | | | | | This commit bumps the help to the current state of the project. Closes #6437
* curl.h: add CURLPROTO_GOPHERS as own protocol identifierDaniel Stenberg2021-01-061-1/+4
| | | | | | | Follow-up to a1f06f32b860, to make sure it can be handled separately from plain gopher. Closes #6418
* tool_operate: fix the suppression logic of some error messagesJay Satiro2021-01-041-6/+8
| | | | | | | | | | | | | | | | | | | | | | - Fix the failed truncation and failed writing body error messages to not be shown unless error messages are shown. (ie the user has specified -sS, or has not specified -s). - Also prefix same error messages with "curl: ", for example: curl: (23) Failed to truncate, exiting Prior to this change the failed truncation error messages would be shown if not -s, but did not account for -sS which should show. Prior to this change the failed writing body error messages would be shown always. Ref: https://curl.se/docs/manpage.html#-S Bug: https://curl.se/mail/archive-2020-12/0017.html Reported-by: Hongyi Zhao Closes https://github.com/curl/curl/pull/6402
* language: s/behaviour/behavior/gEmil Engler2021-01-022-4/+4
| | | | | | | | We currently use both spellings the british "behaviour" and the american "behavior". However "behavior" is more used in the project so I think it's worth dropping the british name. Closes #6395
* docs/examples: adjust prototypes for CURLOPT_READFUNCTIONOlaf Hering2020-12-302-2/+2
| | | | | | | The type of the buffer in curl_read_callback is 'char *', not 'void *'. Signed-off-by: Olaf Hering <olaf@aepfle.de> Closes #6392
* tool_operate: avoid NULL dereference of first_argDaniel Stenberg2020-12-261-1/+1
| | | | | | | Follow-up to 6a5e020d4d2b04a Identified by OSS-Fuzz Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28999 Closes #6377
* misc: fix "warning: empty expression statement has no effect"Daniel Stenberg2020-12-263-18/+18
| | | | | | | | | | Turned several macros into do-while(0) style to allow their use to work find with semicolon. Bug: https://github.com/curl/curl/commit/08e8455dddc5e48e58a12ade3815c01ae3da3b64#commitcomment-45433279 Follow-up to 08e8455dddc5e4 Reported-by: Gisle Vanem Closes #6376
* writeout: fix NULL dereference for "this url"Daniel Stenberg2020-12-261-1/+2
| | | | | | | | Detected by torture test 1029 Follow-up to 7a90ddf88f5a Closes #6374
* curl: fix handling of -q optionCherish982020-12-231-1/+1
| | | | | | | | 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
* curl: add variables to --write-outDaniel Stenberg2020-12-216-104/+112
| | | | | | | | | | | | | | | | | | | | | 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
* tool: add AWS HTTP v4 Signature supportMatthias Gatto2020-12-215-0/+12
| | | | Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
* curl: add --create-file-mode [mode]Daniel Stenberg2020-12-215-4/+33
| | | | | | | | 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
* tool_setopt: provide helper output in debug buildsDaniel Stenberg2020-12-181-1/+6
| | | | ... for when setopt() returns error.
* tooĺ_writeout: fix the -w time output unitsDaniel Stenberg2020-12-151-7/+15
| | | | | | | | | Fix regression from commit fc813f80e1bcac (#6248) that changed the unit to microseconds instead of seconds with fractions Reported-by: 不确定 Fixes #6321 Closes #6322
* ftp: CURLOPT_FTP_SKIP_PASV_IP by defaultDaniel Stenberg2020-12-071-0/+1
| | | | | | | | | | | | 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
* tool_writeout: use off_t getinfo-types instead of doublesDaniel Stenberg2020-11-261-30/+29
| | | | | | | | Commit 3b80d3ca46b12e52342 (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
* infof/failf calls: fix format specifiersRikard Falkeborn2020-11-241-2/+2
| | | | | | Update a few format specifiers to match what is being printed. Closes #6241
* Makefile.m32: add support for UNICODE buildsViktor Szakats2020-11-231-0/+7
| | | | | | | | | | | | | 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
* curl: add compatibility for Amiga and GCC 6.5Oliver Urbann2020-11-201-0/+1
| | | | | | | Changes are mainly reordering and adding of includes required to compile with a more recent version of GCC. Closes #6220
* curl: only warn not fail, if not finding the home dirDaniel Stenberg2020-11-131-20/+15
| | | | | | | | ... as there's no good reason to error out completely. Reported-by: Andreas Fischer Fixes #6200 Closes #6201
* tool_operate: set HSTS with CURLOPT_HSTS to pass on filenameDaniel Stenberg2020-11-061-1/+1
| | | | Closes #6175
* copyright: fix year rangesDaniel Stenberg2020-11-0540-40/+40
| | | | Follow-up from 4d2f8006777
* curl.se: new homeDaniel Stenberg2020-11-0494-99/+99
| | | | Closes #6172
* hsts: add support for Strict-Transport-SecurityDaniel Stenberg2020-11-037-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | - 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
* tool_debug_cb: do not assume zero-terminated dataDaniel Stenberg2020-11-031-1/+1
| | | | Follow-up to d70a5b5a0f5e3
* tool_operate: --retry for HTTP 408 responses tooDaniel Stenberg2020-11-021-0/+1
| | | | | | | | | | 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
* tool_operate: bail out proper on errors for parallel setupDaniel Stenberg2020-10-291-1/+1
| | | | | | | | ... otherwise for example trying to upload a missing file just causes a loop. Reported-by: BrumBrum on hackerone Closes #6141
* tool_help: make "output" description less confusingEmil Engler2020-10-241-1/+1
| | | | | | | Currently the description of "output" is misleading when comparing it "verbose". Closes #6118
* Makefile.m32: add support for HTTP/3 via ngtcp2+nghttp3Viktor Szakats2020-10-161-0/+23
| | | | | Approved-by: Daniel Stenberg Closes #6092
* tool_operate: fix compiler warning when --libcurl is disabledDaniel Stenberg2020-10-161-0/+3
| | | | Closes #6095
* src/tool_filetime: disable -Wformat on mingw for this fileDaniel Stenberg2020-10-151-0/+5
| | | | | | | | | 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
* src/Makefile.m32: fix undefined curlx_dyn_* errorsViktor Szakats2020-10-111-2/+0
| | | | | | | | | | | | 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
* curl: make sure setopt CURLOPT_IPRESOLVE passes on a longDaniel Stenberg2020-10-052-8/+3
| | | | | | | | | | 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
* --help: move two options from the misc categoryEmil Engler2020-10-031-2/+2
| | | | | | | | The cmdline opts delegation and suppress-connect-headers fit better into auth and proxy rather than misc. Follow-up to aa8777f63febc Closes #6038
* checksrc: warn on space after exclamation markDaniel Stenberg2020-10-022-4/+4
| | | | Closes #6034
* tool_setopt: escape binary data to hex, not octalDaniel Stenberg2020-10-021-1/+1
|
* curl: make --libcurl show binary posts correctlyDaniel Stenberg2020-10-023-24/+41
| | | | | | Reported-by: Stephan Mühlstrasser Fixes #6031 Closes #6032
* src: Consistently spell whitespace without whitespaceDaniel Gustafsson2020-09-301-1/+1
| | | | | | | | | 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>
* symbian: drop supportDaniel Stenberg2020-09-225-29/+8
| | | | | | | | | 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
* --help: strdup the categoryDaniel Stenberg2020-09-183-14/+14
| | | | | | | | | | ... 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