summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* httpauth: add support for Bearer tokensLinus Lewandowski2018-05-241-0/+1
| | | | Closes #2102
* cmake: set -d postfix for debug builds if not specifiedSergei Nikulov2018-05-241-4/+0
| | | | | | using -DCMAKE_DEBUG_POSTFIX explicitly fixes #2121, obsoletes #2384
* checksrc: make sure sizeof() is used *with* parenthesesDaniel Stenberg2018-05-212-6/+6
| | | | | | ... and unify the source code to adhere. Closes #2563
* curl: added --styled-outputDaniel Stenberg2018-05-215-4/+11
| | | | | | | It is enabled by default, so --no-styled-output will switch off the detection/use of bold headers. Closes #2538
* curl: show headers in boldDaniel Stenberg2018-05-217-38/+75
| | | | | | | | | | | | | | | | | | The feature is only enabled if the output is believed to be a tty. -J: There's some minor differences and improvements in -J handling, as now J should work with -i and it actually creates a file first using the initial name and then *renames* that to the one found in Content-Disposition (if any). -i: only shows headers for HTTP transfers now (as documented). Previously it would also show for pieces of the transfer that were HTTP (for example when doing FTP over a HTTP proxy). -i: now shows trailers as well. Previously they were not shown at all. --libcurl: the CURLOPT_HEADER is no longer set, as the header output is now done in the header callback.
* checksrc: fix too long lineDaniel Stenberg2018-05-181-1/+1
| | | | follow-up to e05ad5d
* docs: mention HAproxy protocol "version 1"Aleks2018-05-182-2/+2
| | | | | | ...as there's also a version 2. Closes #2579
* gcc: disable picky gcc-8 function pointer warnings in two placesDaniel Stenberg2018-05-141-1/+6
| | | | | | Reported-by: Rikard Falkeborn Bug: #2560 Closes #2569
* tool: Fix format specifiersRikard Falkeborn2018-05-142-3/+3
|
* checksrc: force indentation of lines after an elseDaniel Gustafsson2018-04-271-4/+2
| | | | | | | | This extends the INDENTATION case to also handle 'else' statements and require proper indentation on the following line. Also fixes the offending cases found in the codebase. Closes #2532
* tool_help: clarify --max-time unit of time is secondsJay Satiro2018-04-211-1/+1
| | | | | | | | Before: -m, --max-time <time> Maximum time allowed for the transfer After: -m, --max-time <seconds> Maximum time allowed for the transfer
* schannel: add support for CURLOPT_CAINFODan McNulty2018-04-183-28/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move verify_certificate functionality in schannel.c into a new file called schannel_verify.c. Additionally, some structure defintions from schannel.c have been moved to schannel.h to allow them to be used in schannel_verify.c. - Make verify_certificate functionality for Schannel available on all versions of Windows instead of just Windows CE. verify_certificate will be invoked on Windows CE or when the user specifies CURLOPT_CAINFO and CURLOPT_SSL_VERIFYPEER. - In verify_certificate, create a custom certificate chain engine that exclusively trusts the certificate store backed by the CURLOPT_CAINFO file. - doc updates of --cacert/CAINFO support for schannel - Use CERT_NAME_SEARCH_ALL_NAMES_FLAG when invoking CertGetNameString when available. This implements a TODO in schannel.c to improve handling of multiple SANs in a certificate. In particular, all SANs will now be searched instead of just the first name. - Update tool_operate.c to not search for the curl-ca-bundle.crt file when using Schannel to maintain backward compatibility. Previously, any curl-ca-bundle.crt file found in that search would have been ignored by Schannel. But, with CAINFO support, the file found by that search would have been used as the certificate store and could cause issues for any users that have curl-ca-bundle.crt in the search path. - Update url.c to not set the build time CURL_CA_BUNDLE if the selected SSL backend is Schannel. We allow setting CA location for schannel only when explicitly specified by the user via CURLOPT_CAINFO / --cacert. - Add new test cases 3000 and 3001. These test cases check that the first and last SAN, respectively, matches the connection hostname. New test certificates have been added for these cases. For 3000, the certificate prefix is Server-localhost-firstSAN and for 3001, the certificate prefix is Server-localhost-secondSAN. - Remove TODO 15.2 (Add support for custom server certificate validation), this commit addresses it. Closes https://github.com/curl/curl/pull/1325
* all: Refactor malloc+memset to use callocDaniel Gustafsson2018-04-151-2/+1
| | | | | | | | | | When a zeroed out allocation is required, use calloc() rather than malloc() followed by an explicit memset(). The result will be the same, but using calloc() everywhere increases consistency in the codebase and avoids the risk of subtle bugs when code is injected between malloc and memset by accident. Closes https://github.com/curl/curl/pull/2497
* tool_operate: Fix retry on FTP 4xx to ignore other protocolsStefan Agner2018-04-071-1/+5
| | | | | | | | | | | | | | | Only treat response code as FTP response codes in case the protocol type is FTP. This fixes an issue where an HTTP download was treated as FTP in case libcurl returned with 33. This happens when the download has already finished and the server responses 416: HTTP/1.1 416 Requested Range Not Satisfiable This should not be treated as an FTP error. Fixes #2464 Closes #2465
* CURLOPT_HAPROXYPROTOCOL: support the HAProxy PROXY protocolLawrence Matthews2018-03-174-0/+11
| | | | | | Add --haproxy-protocol for the command line tool Closes #2162
* cleanup: misc typos in strings and commentsluz.paz2018-03-162-2/+2
| | | | | | Found via `codespell` Closes #2389
* curl tool: accept --compressed also if Brotli is enabled and zlib is not.Patrick Monnerat2018-03-081-2/+3
|
* spelling fixesViktor Szakats2018-02-231-3/+3
| | | | | | | | Detected using the `codespell` tool. Also contains one URL protocol upgrade. Closes https://github.com/curl/curl/pull/2334
* lib: CURLOPT_HAPPY_EYEBALLS_TIMEOUT => CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MSJay Satiro2018-02-211-1/+1
| | | | | | | | | | | | | | | | - In keeping with the naming of our other connect timeout options rename CURLOPT_HAPPY_EYEBALLS_TIMEOUT to CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS. This change adds the _MS suffix since the option expects milliseconds. This is more intuitive for our users since other connect timeout options that expect milliseconds use _MS such as CURLOPT_TIMEOUT_MS, CURLOPT_CONNECTTIMEOUT_MS, CURLOPT_ACCEPTTIMEOUT_MS. The tool option already uses an -ms suffix, --happy-eyeballs-timeout-ms. Follow-up to 2427d94 which added the lib and tool option yesterday. Ref: https://github.com/curl/curl/pull/2260
* url: Add option CURLOPT_HAPPY_EYEBALLS_TIMEOUTAnders Bakken2018-02-205-0/+17
| | | | | | | | | | | | | | - Add new option CURLOPT_HAPPY_EYEBALLS_TIMEOUT to set libcurl's happy eyeball timeout value. - Add new optval macro CURL_HET_DEFAULT to represent the default happy eyeballs timeout value (currently 200 ms). - Add new tool option --happy-eyeballs-timeout-ms to expose CURLOPT_HAPPY_EYEBALLS_TIMEOUT. The -ms suffix is used because the other -timeout options in the tool expect seconds not milliseconds. Closes https://github.com/curl/curl/pull/2260
* curl --version: show PSL if the run-time lib has it enabledDaniel Stenberg2018-02-181-4/+2
| | | | ... not of the #define was set at build-time!
* time-cond: fix reading the file modification time on WindowsMichael Kaufmann2018-02-056-98/+210
| | | | | | | | On Windows, stat() may adjust the unix file time by a daylight saving time offset. Avoid this by calling GetFileTime() instead. Fixes #2164 Closes #2204
* build: fix termios issue on android cross-compileBen Greear2018-02-011-0/+6
| | | | | Bug: https://curl.haxx.se/mail/lib-2018-01/0122.html Signed-off-by: Ben Greear <greearb@candelatech.com>
* curl: add --proxy-pinnedpubkeyDaniel Stenberg2018-01-304-3/+12
| | | | | | | To verify a proxy's public key. For when using HTTPS proxies. Fixes #2192 Closes #2268
* curl_ctype: private is*() type macros and functionsDaniel Stenberg2018-01-291-2/+4
| | | | | | | | ... since the libc provided one are locale dependent in a way we don't want. Also, the "native" isalnum() (for example) works differently on different platforms which caused test 1307 failures on macos only. Closes #2269
* progress-bar: don't use stderr explicitly, use bar->outDaniel Stenberg2018-01-241-1/+1
| | | | | Reported-By: Gisle Vanem Bug: https://github.com/curl/curl/commit/993dd5651a6c853bfe3870f6a69c7b329fa4e8ce#commitcomment-27070080
* Fixes for MSDOS etc.Gisle Vanem2018-01-241-4/+4
| | | | | | | | djgpp do have 'mkdir(dir, mode)'. Other DOS-compilers does not But djgpp seems the only choice for MSDOS anyway. PellesC do have a 'F_OK' defined in it's <unistd.h>. Update year in Copyright.
* progress-bar: get screen width on windowsGisle Vanem2018-01-231-0/+15
|
* curl: progress bar refresh, get width using ioctl()Daniel Stenberg2018-01-222-20/+93
| | | | | | | | | | | | | Get screen width from the environment variable COLUMNS first, if set. If not, use ioctl(). If nether works, assume 79. Closes #2242 The "refresh" is for the -# output when no total transfer size is known. It will now only use a single updated line even for this case: The "-=O=-" ship moves when data is transferred. The four flying "hashes" move (on a sine wave) on each refresh, independent of data.
* mail-rcpt.d: fix short-text descriptionJay Satiro2018-01-071-1/+1
|
* tool_getparam: Support size modifiers for --max-filesizeGisle Vanem2017-12-261-35/+64
| | | | | | | | | | | | | - Move the size modifier detection code from limit-rate to its own function so that it can also be used with max-filesize. Size modifiers are the suffixes such as G (gigabyte), M (megabyte) etc. For example --max-filesize 1G Ref: https://curl.haxx.se/mail/archive-2017-12/0000.html Closes https://github.com/curl/curl/pull/2179
* curl: support >256 bytes warning messsagesDaniel Stenberg2017-12-121-2/+6
| | | | Bug: #2174
* Revert "curl: don't set CURLOPT_INTERLEAVEDATA"Daniel Stenberg2017-12-111-1/+1
| | | | | | | | | This reverts commit 9ffad8eb1329bb35c8988115ac7ed85cf91ef955. It was actually added rather recently in 8e8afa82cbb629 due to a crash that would otherwise happen in the RTSP code. As I don't think we've fixed that behavior yet, we better keep this work-around until we have fixed it better.
* curl: remove __EMX__ #ifdefsDaniel Stenberg2017-12-081-20/+0
| | | | | | | | These are OS/2-specific things added to the code in the year 2000. They were always ugly. If there's any user left, they still don't need it done this way. Closes #2166
* curl: don't set CURLOPT_INTERLEAVEDATADaniel Stenberg2017-12-081-1/+1
| | | | | | | | | That data is only ever used by the CURLOPT_INTERLEAVEFUNCTION callback and that option isn't set or used by the curl tool! Updates the 9 tests that verify --libcurl Closes #2167
* curl: limit -# update frequency for unknown total sizeDaniel Stenberg2017-12-071-8/+25
| | | | | | | | | | Make it use a max 10Hz update frequency for this case as well. Return early if the "point" hasn't moved since last invoke. Reported-by: Elliot Saba Fixes #2158 Closes #2163
* metalink: fix memory-leak and NULL pointer dereferenceDaniel Stenberg2017-11-241-3/+24
| | | | | | Reported by scan-build Closes #2109
* cmake: Correctly include curl.rc in Windows builds (#2064)John Starks2017-11-101-1/+1
| | | Update CMakeLists.txt to add curl.rc to the correct list.
* src/Makefile.m32: fix typo in brotli lib customizationViktor Szakats2017-11-061-1/+1
| | | | Ref cc1f4436099decb9d1a7034b2bb773a9f8379d31
* Makefile.m32: allow to customize brotli libsViktor Szakats2017-11-051-1/+6
| | | | | | It adds the ability to link against static brotli libs. Also fix brotli include path.
* Makefile.m32: add brotli supportViktor Szakats2017-11-051-1/+14
|
* HTTP: implement Brotli content encodingPatrick Monnerat2017-11-051-0/+1
| | | | | | | | | | | | This uses the brotli external library (https://github.com/google/brotli). Brotli becomes a feature: additional curl_version_info() bit and structure fields are provided for it and CURLVERSION_NOW bumped. Tests 314 and 315 check Brotli content unencoding with correct and erroneous data. Some tests are updated to accomodate with the now configuration dependent parameters of the Accept-Encoding header.
* curl: speed up handling of many URLsDaniel Stenberg2017-11-042-10/+11
| | | | | | | | | | | | | | By properly keeping track of the last entry in the list of URLs/uploads to handle, curl now avoids many meaningless traverses of the list which speeds up many-URL handling *MASSIVELY* (several magnitudes on 100K URLs). Added test 1291, to verify that it doesn't take ages - but we don't have any detection of "too slow" command in the test suite. Reported-by: arainchik on github Fixes #1959 Closes #2052
* curl: pass through [] in URLs instead of calling globbing errorDaniel Stenberg2017-11-041-3/+5
| | | | | | | Assisted-by: Per Lundberg Fixes #2044 Closes #2046 Closes #2048
* mkhelp.pl: support reproducible buildJuro Bystricky2017-10-301-2/+0
| | | | | | | | | | | | | Do not generate line with the current date, such as: * Generation time: Tue Oct-24 18:01:41 2017 This will improve reproducibility. The generated string is only part of a comment, so there should be no adverse consequences. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> closes #2026
* cli tool: improve ";type=" handling in -F option argumentsPatrick Monnerat2017-10-291-20/+16
|
* cli tool: in -F option arg, comma is a delimiter for files onlyPatrick Monnerat2017-10-291-17/+18
| | | | | | | | Also upgrade test 1133 to cover this case and clarify man page about form data quoting. Bug: https://github.com/curl/curl/issues/2022 Reported-By: omau on github
* cmake: Export libcurl and curl targets to use by other cmake projectsJakub Zakrzewski2017-10-281-1/+12
| | | | | | | | | The config files define curl and libcurl targets as imported targets CURL::curl and CURL::libcurl. For backward compatibility with CMake- provided find-module the CURL_INCLUDE_DIRS and CURL_LIBRARIES are also set. Closes #1879
* makefile.m32: allow to override gcc, ar and ranlibViktor Szakats2017-10-151-3/+10
| | | | | | | | | | | | | Allow to ovverride certain build tools, making it possible to use LLVM/Clang to build curl. The default behavior is unchanged. To build with clang (as offered by MSYS2), these settings can be used: CURL_CC=clang CURL_AR=llvm-ar CURL_RANLIB=llvm-ranlib Closes https://github.com/curl/curl/pull/1993
* cli tool: use file2memory() to buffer stdin in -F option.Patrick Monnerat2017-10-121-38/+15
| | | | Closes PR https://github.com/curl/curl/pull/1985