summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* src/Makefile: make 'tidy' target work for metalink buildsDaniel Stenberg2019-01-141-2/+2
|
* tool_cb_prg: avoid integer overflowDaniel Stenberg2019-01-111-3/+16
| | | | | | | | When calculating the progress bar width. Reported-by: Peng Li Fixes #3456 Closes #3458
* xattr: strip credentials from any URL that is storedDaniel Stenberg2019-01-101-8/+55
| | | | | | | | | Both user and password are cleared uncondtitionally. Added unit test 1621 to verify. Fixes #3423 Closes #3433
* printf: fix format specifiersRikard Falkeborn2019-01-041-4/+3
| | | | Closes #3426
* tvnow: silence conversion warningsMarcel Raad2019-01-011-1/+1
| | | | | | MinGW-w64 defaults to targeting Windows 7 now, so GetTickCount64 is used and the milliseconds are represented as unsigned long long, leading to a compiler warning when implicitly converting them to long.
* http: added options for allowing HTTP/0.9 responsesDaniel Stenberg2018-12-215-0/+11
| | | | | | | | | | | | Added CURLOPT_HTTP09_ALLOWED and --http0.9 for this purpose. For now, both the tool and library allow HTTP/0.9 by default. docs/DEPRECATE.md lays out the plan for when to reverse that default: 6 months after the 7.64.0 release. The options are added already now so that applications/scripts can start using them already now. Fixes #2873 Closes #3383
* curl -J: do not append to the destination fileDaniel Stenberg2018-12-194-10/+9
| | | | | | Reported-by: Kamil Dudka Fixes #3380 Closes #3381
* docs: fix the --tls-max descriptionDaniel Stenberg2018-12-131-1/+1
| | | | | | | Reported-by: Tobias Lindgren Pointed out in #3367 Closes #3368
* (lib)curl.rc: fixup for minor bugsStefan Kanthak2018-12-101-5/+5
| | | | | | | | | | | | | | | All resources defined in lib/libcurl.rc and curl.rc are language neutral. winbuild/MakefileBuild.vc ALWAYS defines the macro DEBUGBUILD, so the ifdef's in line 33 of lib/libcurl.rc and src/curl.rc are wrong. Replace the hard-coded constants in both *.rc files with #define'd values. Thumbs-uped-by: Rod Widdowson, Johannes Schindelin URL: https://curl.haxx.se/mail/lib-2018-11/0000.html Closes #3348
* curl: fix memory leak reading --writeout from fileDaniel Stenberg2018-11-301-0/+1
| | | | | | | | | If another string had been set first, the writout function for reading the syntax from file would leak the previously allocated memory. Reported-by: Brian Carpenter Fixes #3322 Closes #3330
* tool_main: rename function to make it unique and betterDaniel Stenberg2018-11-301-2/+2
| | | | | ... there's already another function in the curl tool named free_config_fields!
* snprintf: renamed and we now only use msnprintf()Daniel Stenberg2018-11-239-42/+40
| | | | | | | | | | | The function does not return the same value as snprintf() normally does, so readers may be mislead into thinking the code works differently than it actually does. A different function name makes this easier to detect. Reported-by: Tomas Hoger Assisted-by: Daniel Gustafsson Fixes #3296 Closes #3297
* ssl: replace all internal uses of CURLE_SSL_CACERTHan Han2018-11-201-2/+2
| | | | Closes #3291
* tool_doswin: Fix uninitialized field warningDaniel Gustafsson2018-11-181-1/+3
| | | | | | | | | | | | | | | | | | The partial struct initialization in 397664a065abffb7c3445ca9 caused a warning on uninitialized MODULEENTRY32 struct members: /src/tool_doswin.c:681:3: warning: missing initializer for field 'th32ModuleID' of 'MODULEENTRY32 {aka struct tagMODULEENTRY32}' [-Wmissing-field-initializers] This is sort of a bogus warning as the remaining members will be set to zero by the compiler, as all omitted members are. Nevertheless, remove the warning by omitting all members and setting the dwSize members explicitly. Closes #3254 Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com> Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
* tool_cb_wrt: Silence function cast compiler warningDaniel Gustafsson2018-11-131-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Commit 5bfaa86ceb3c2a9ac474a928e748c4a86a703b33 introduced a new compiler warning on Windows cross compilation with GCC. See below for an example of the warning from the autobuild logs (whitespace edited to fit): /src/tool_cb_wrt.c:175:9: warning: cast from function call of type 'intptr_t {aka long long int}' to non-matching type 'void *' [-Wbad-function-cast] (HANDLE) _get_osfhandle(fileno(outs->stream)), ^ Store the return value from _get_osfhandle() in an intermediate variable and cast the variable in WriteConsoleW() rather than the function call directly to avoid a compiler warning. In passing, also add inspection of the MultiByteToWideChar() return value and return failure in case an error is reported. Closes #3263 Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com> Reviewed-by: Viktor Szakats <commit@vszakats.net>
* curl: --local-port range was not "including"Daniel Stenberg2018-11-091-1/+1
| | | | | | | | | The end port number in a given range was not included in the range used, as it is documented to be. Reported-by: infinnovation-dev on github Fixes #3251 Closes #3255
* curl: --local-port fix followupDaniel Stenberg2018-11-081-1/+1
| | | | | | | | Regression by 52db54869e6. Reported-by: infinnovation-dev on github Fixes #3248 Closes #3249
* curl: fix --local-port integer overflowDaniel Stenberg2018-11-073-14/+26
| | | | | | | | | | The tool's local port command line range parser didn't check for integer overflows and could pass "weird" data to libcurl for this option. libcurl however, has a strict range check for the values so it rejects anything outside of the accepted range. Reported-by: Brian Carpenter Closes #3242
* curl: correct the switch() logic in ourWriteOutDaniel Stenberg2018-11-071-1/+1
| | | | | | | Follow-up to e431daf013, as I did the wrong correction for a compiler warning. It should be a break and not a fall-through. Pointed-out-by: Frank Gevaerts
* curl: add %{stderr} and %{stdout} for --write-outFrank Gevaerts2018-11-071-1/+11
| | | | Closes #3115
* tool: add undocumented option --dump-module-paths for win32Jay Satiro2018-11-063-0/+70
| | | | | | | | | | | | | | | | - Add an undocumented diagnostic option for Windows to show the full paths of all loaded modules regardless of whether or not libcurl initialization succeeds. This is needed so that in the CI we can get a list of all DLL dependencies after initialization (when they're most likely to have finished loading) and then package them as artifacts so that a functioning build can be downloaded. Also I imagine it may have some use as a diagnostic for help requests. Ref: https://github.com/curl/curl/pull/3103 Closes https://github.com/curl/curl/pull/3208
* curl: fixed UTF-8 in current console code page (Windows)Yasuhiro Matsumoto2018-11-052-7/+31
| | | | | | Fixes #3211 Fixes #3175 Closes #3212
* tool_getparam: fix some commentsMichael Kaufmann2018-11-031-13/+5
|
* axtls: removedDaniel Stenberg2018-11-011-21/+1
| | | | | | | | | | As has been outlined in the DEPRECATE.md document, the axTLS code has been disabled for 6 months and is hereby removed. Use a better supported TLS library! Assisted-by: Daniel Gustafsson Closes #3194
* voutf: fix bad arethmetic when outputting warnings to stderrDaniel Stenberg2018-10-301-1/+1
| | | | | | CVE-2018-16842 Reported-by: Brian Carpenter Bug: https://curl.haxx.se/docs/CVE-2018-16842.html
* Makefile: add 'tidy' target that runs clang-tidyDaniel Stenberg2018-10-271-0/+8
| | | | | | Available in the root, src and lib dirs. Closes #3163
* tool_main: make TerminalSettings staticDaniel Stenberg2018-10-261-5/+5
| | | | | | Reported-by: Gisle Vanem Bug: https://github.com/curl/curl/commit/becfe1233ff2b6b0c3e1b6a10048b55b68c2539f#commitcomment-31008819 Closes #3161
* tool_cb_hdr: handle failure of rename()Kamil Dudka2018-10-171-2/+11
| | | | | | | Detected by Coverity. Closes #3140 Reviewed-by: Jay Satiro
* Windows: fixes for MinGW targeting Windows VistaMarcel Raad2018-10-091-1/+2
| | | | | | | Classic MinGW has neither InitializeCriticalSectionEx nor GetTickCount64, independent of the target Windows version. Closes https://github.com/curl/curl/pull/3113
* spelling fixes [ci skip]Viktor Szakats2018-10-081-1/+1
| | | | | | | as detected by codespell 1.14.0 Closes https://github.com/curl/curl/pull/3114 Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com>
* FILE: fix CURLOPT_NOBODY and CURLOPT_HEADER outputDaniel Stenberg2018-10-081-2/+3
| | | | | | | | | | | | | | | Now FILE transfers send headers to the header callback like HTTP and other protocols. Also made curl_easy_getinfo(...CURLINFO_PROTOCOL...) work for FILE in the callbacks. Makes "curl -i file://.." and "curl -I file://.." work like before again. Applied the bold header logic to them too. Regression from c1c2762 (7.61.0) Reported-by: Shaun Jackman Fixes #3083 Closes #3101
* CMake: Improve config installationRuslan Baratov2018-10-011-7/+1
| | | | | | | | | | | | | | | | | | | | | | Use 'GNUInstallDirs' standard module to set destinations of installed files. Use uppercase "CURL" names instead of lowercase "curl" to match standard 'FindCURL.cmake' CMake module: * https://cmake.org/cmake/help/latest/module/FindCURL.html Meaning: * Install 'CURLConfig.cmake' instead of 'curl-config.cmake' * User should call 'find_package(CURL)' instead of 'find_package(curl)' Use 'configure_package_config_file' function to generate 'CURLConfig.cmake' file. This will make 'curl-config.cmake.in' template file smaller and handle components better. E.g. current configuration report no error if user specified unknown components (note: new configuration expects no components, report error if user will try to specify any). Closes https://github.com/curl/curl/pull/2849
* curl: enabled Windows VT Support and UTF-8 outputRich Turner2018-09-291-0/+56
| | | | | | | Enabled Console VT support (if running OS supports VT) in tool_main.c. Fixes #3008 Closes #3011
* whitespace fixesViktor Szakats2018-09-2350-317/+269
| | | | | | | | | | | - replace tabs with spaces where possible - remove line ending spaces - remove double/triple newlines at EOF - fix a non-UTF-8 character - cleanup a few indentations/line continuations in manual examples Closes https://github.com/curl/curl/pull/3037
* URL and mailmap updates, remove an obsolete directory [ci skip]Viktor Szakats2018-09-221-1/+1
| | | | Closes https://github.com/curl/curl/pull/3031
* curl: update --tlsv* descriptions in --help outputSi2018-09-161-4/+4
| | | | Closes #2994
* urlglob: improve error messageDaniel Stenberg2018-09-131-5/+6
| | | | | | | | | to help user understand what the problem is Reported-by: Daniel Shahaf Fixes #2763 Closes #2977
* misc: fix typos in commentsDaniel Gustafsson2018-09-101-1/+1
| | | | Closes #2963
* curl: --doh-url addedDaniel Stenberg2018-09-065-0/+11
|
* tool_operate: Add http code 408 to transient list for --retryJay Satiro2018-09-031-0/+1
| | | | | | | - Treat 408 request timeout as transient so that curl will retry the request if --retry was used. Closes #2925
* tool_operate: Fix setting proxy TLS 1.3 ciphersJay Satiro2018-08-311-1/+1
|
* curl: fix time-of-check, time-of-use race in dir creationDaniel Stenberg2018-08-251-6/+4
| | | | | | | Patch-by: Jay Satiro Detected by Coverity Fixes #2739 Closes #2912
* curl-compilers: enable -Wimplicit-fallthrough=4 for GCCMarcel Raad2018-08-212-3/+3
| | | | | | | | This enables level 4 instead of the default level 3, which of the currently used comments only allows /* FALLTHROUGH */ to silence the warning. Closes https://github.com/curl/curl/pull/2747
* curl-compilers: enable -Wbad-function-cast on GCCMarcel Raad2018-08-211-1/+3
| | | | | | | This warning used to be enabled only for clang as it's a bit stricter on GCC. Silence the remaining occurrences and enable it on GCC too. Closes https://github.com/curl/curl/pull/2747
* Remove unused definitionsMarcel Raad2018-08-211-2/+0
| | | | Closes https://github.com/curl/curl/pull/2747
* curl: warn the user if a given file name looks like an optionDaniel Stenberg2018-08-151-23/+31
| | | | | | | | | | ... simply because this is usually a sign of the user having omitted the file name and the next option is instead "eaten" by the parser as a file name. Add test1268 to verify Closes #2885
* GCC: silence -Wcast-function-type uniformlyMarcel Raad2018-08-111-14/+9
| | | | | Pointed-out-by: Rikard Falkeborn Closes https://github.com/curl/curl/pull/2860
* ssl: set engine implicitly when a PKCS#11 URI is providedAnderson Toshiyuki Sasaki2018-08-082-1/+54
| | | | | | | | | | | This allows the use of PKCS#11 URI for certificates and keys without setting the corresponding type as "ENG" and the engine as "pkcs11" explicitly. If a PKCS#11 URI is provided for certificate, key, proxy_certificate or proxy_key, the corresponding type is set as "ENG" if not provided and the engine is set to "pkcs11" if not provided. Acked-by: Nikos Mavrogiannopoulos Closes #2333
* curl: use Content-Disposition before the "URL end" for -OJDaniel Stenberg2018-07-311-3/+2
| | | | | | | | Regression introduced in 7.61.0 Reported-by: Thomas Klausner Fixes #2783 Closes #2813
* curl: Fix segfault when -H @headerfile is emptyTobias Blomberg2018-07-281-1/+1
| | | | | | | The curl binary would crash if the -H command line option was given a filename to read using the @filename syntax but that file was empty. Closes #2797