summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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
* tool_help.h: update copyright year rangeDaniel Stenberg2020-09-161-1/+1
| | | | Follow-up from aa8777f63febca
* tool_writeout: protect fputs() from NULLDaniel Stenberg2020-09-151-9/+6
| | | | | | | | | 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
* tool_writeout: add new writeout variable, %{num_headers}anio2020-09-157-19/+46
| | | | | | This variable gives the number of headers. Closes #5947
* tool_urlglob: fix compiler warning "unreachable code"Daniel Stenberg2020-09-151-2/+2
| | | | | | (On Windows builds.) Follow-up to 70a3b003d9
* curl: make checkpasswd use dynbufDaniel Stenberg2020-09-141-15/+8
| | | | Closes #5952
* curl: make glob_match_url use dynbufDaniel Stenberg2020-09-141-31/+15
| | | | Closes #5952
* curl: make file2memory use dynbufDaniel Stenberg2020-09-141-38/+14
| | | | Closes #5952
* curl: make file2string use dynbufDaniel Stenberg2020-09-141-32/+9
| | | | Closes #5952
* curl: use curlx_dynbuf for realloc when loading config filesDaniel Stenberg2020-09-142-38/+35
| | | | | | | | | ... fixes an integer overflow at the same time. Reported-by: ihsinme on github Assisted-by: Jay Satiro Closes #5946
* curl: retry delays in parallel mode no longer sleeps blockingDaniel Stenberg2020-09-062-12/+39
| | | | | | | | | 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
* curl:parallel_transfers: make sure retry readds the transferDaniel Stenberg2020-09-051-3/+4
| | | | | | Reported-by: htasta on github Fixes #5905 Closes #5917
* build: drop support for building with WatcomDaniel Stenberg2020-09-052-236/+2
| | | | | | | These files are not maintained, they seem to have no users, Watcom compilers look like not having users nor releases anymore. Closes #5918
* curl: in retry output don't call all problems "transient"Daniel Stenberg2020-09-051-5/+5
| | | | | | | ... because when --retry-all-errors is used, the error isn't necessarily transient at all. Closes #5916
* tool: update --help with categoriesEmil Engler2020-09-045-246/+602
| | | | | | This commit is a part of "--help me if you can" Closes #5680
* tls: add CURLOPT_SSL_EC_CURVES and --curvesMichael Baentsch2020-08-304-0/+11
| | | | Closes #5892
* CMake: add option to enable Unicode on WindowsMarcel Raad2020-08-291-0/+6
| | | | | | As already existing for winbuild. Closes https://github.com/curl/curl/pull/5843
* curl: add --output-dirDaniel Stenberg2020-08-246-10/+40
| | | | | | | | Works with --create-dirs and with -J Add test 3008, 3009, 3011, 3012 and 3013 to verify. Closes #5637
* curl: support XDG_CONFIG_HOME to find .curlrcDaniel Stenberg2020-08-244-5/+48
| | | | | | | | | Added test433 to verify. Updated documentation. Reviewed-by: Jay Satiro Suggested-by: Eli Schwartz Fixes #5829 Closes #5837
* etag: save and use the full received contentsDaniel Stenberg2020-08-242-42/+16
| | | | | | | | | ... which makes it support weak tags and non-standard etags too! Added test case 347 to verify blank incoming ETag: Fixes #5610 Closes #5833
* Makefile.m32: add ability to override zstd libs [ci skip]Viktor Szakats2020-08-221-1/+6
| | | | | | | | | | 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: https://github.com/curl/curl-for-win/commit/d9b266afd2e5d3f5604483010ef62340b5918c89 Closes https://github.com/curl/curl/pull/5840
* copyright: update/correct the year range on a few filesDaniel Stenberg2020-08-141-1/+1
|
* tool_doswin: Simplify Windows version detectionCameron Cawley2020-08-021-14/+3
| | | | Closes https://github.com/curl/curl/pull/5754
* win32: Add Curl_verify_windows_version() to curlxCameron Cawley2020-08-021-2/+4
| | | | Closes https://github.com/curl/curl/pull/5754
* tool_cb_wrt: fix outfile mode flags for WindowsJay Satiro2020-07-291-3/+6
| | | | | | | | | | | | | | | | - 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
* checksrc: ban gmtime/localtimeDaniel Stenberg2020-07-281-1/+2
| | | | | | | | | 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
* curl: improve the existing file check with -JDaniel Stenberg2020-07-281-9/+22
| | | | | | | | | | 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
* WIN32: stop forcing narrow-character APIMarcel Raad2020-07-274-11/+23
| | | | | | | | | | 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
* util: silence conversion warningsMarcel Raad2020-07-191-1/+1
| | | | | | | | | | 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
* strdup: remove the odd strlen checkDaniel Stenberg2020-07-181-9/+4
| | | | | | | 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
* file2memory: use a define instead of -1 unsigned valueDaniel Stenberg2020-07-161-2/+2
| | | | | | | | | ... 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
* curl: add %{method} to the -w variablesDaniel Stenberg2020-07-142-0/+10
| | | | | | Gets the CURLINFO_EFFECTIVE_METHOD from libcurl. Added test 1197 to verify.
* windows: add unicode to feature listViktor Szakats2020-07-141-0/+1
| | | | | | | Reviewed-by: Marcel Raad Reviewed-by: Marc Hörsken Closes #5491
* content_encoding: add zstd decoding supportGilles Vollant2020-07-123-2/+16
| | | | | | | | | 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
* tool_getparam: make --krb option work againKamil Dudka2020-07-031-1/+1
| | | | | | | It was disabled by mistake in commit curl-7_37_1-23-ge38ba4301. Bug: https://bugzilla.redhat.com/1833193 Closes #5640
* terminology: call them null-terminated stringsDaniel Stenberg2020-06-284-8/+8
| | | | | | | | | | | 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
* tool_cb_hdr: Fix etag warning output and return codeJay Satiro2020-06-261-4/+4
| | | | | | | | | | - 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
* tool_operate: Don't use Windows CA store as a fallbackJay Satiro2020-06-221-8/+0
| | | | | | | | | | | | | | | | | | | | | | | 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
* tool_getparam: -i is not OK if -J is usedDaniel Stenberg2020-06-222-18/+9
| | | | | Reported-by: sn on hackerone Bug: https://curl.haxx.se/docs/CVE-2020-8177.html
* urlglob: treat literal IPv6 addresses with zone IDs as a host nameDaniel Stenberg2020-06-181-20/+27
| | | | | | | | | | ... 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
* tool_getparam: repair the error message for unknown flagDaniel Stenberg2020-06-181-1/+2
| | | | | | | Follow-up to 9e5669f3880674 Detected by Coverity CID 1464582 ("Logically dead code") Closes #5577
* tool_getparam: fix memory leak in parse_argsJay Satiro2020-06-091-0/+2
| | | | | | | | | 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
* tool_cfgable: free login_options at exitDaniel Stenberg2020-06-081-0/+1
| | | | | | | Memory leak Reported-by: Geeknik Labs Fixes #5535 Closes #5536
* all: fix codespell errorsViktor Szakats2020-05-251-1/+1
| | | | | | Reviewed-by: Jay Satiro Reviewed-by: Daniel Stenberg Closes https://github.com/curl/curl/pull/5452
* copyright: updated year ranges out of syncDaniel Stenberg2020-05-241-1/+1
| | | | ... and whitelisted a few more files in the the copyright.pl script.
* curl: remove -J "informational" written on stdoutDaniel Stenberg2020-05-231-4/+0
| | | | | | | | | | | 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
* tool_paramhlp: fixup C89 mistakeDaniel Stenberg2020-05-191-2/+1
| | | | Follow-up to c5f0a9db22.
* tool_paramhlp: fixed potentially uninitialized strtol() variableSiva Sivaraman2020-05-191-0/+1
| | | | | | | Seems highly unlikely to actually be possible, but better safe than sorry. Closes #5417
* tool_operate: fixed potentially uninitialized variablesSiva Sivaraman2020-05-191-5/+5
| | | | | | | ... in curl_easy_getinfo() calls. They're harmless but clearing the variables makes the code safer and comforts the reader. Closes #5416