summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* tool_operate: fix MinGW compiler warningMarcel Raad2017-04-051-23/+27
| | | | | | | | | | | MinGW complains: tool_operate.c:197:15: error: comparison is always true due to limited range of data type [-Werror=type-limits] Fix this by only doing the comparison if 'long' is large enough to hold the constant it is compared with. Closes https://github.com/curl/curl/pull/1378
* tool_operate: move filetime code to its own functionMarcel Raad2017-04-051-49/+60
| | | | Ref: https://github.com/curl/curl/pull/1378
* tool: fix Windows Unicode buildMarcel Raad2017-04-042-3/+3
| | | | | ... by explicitly calling the ANSI versions of Windows API functions where required.
* curl: fix callback functions to match prototypeHanno Böck2017-03-302-3/+4
| | | | | | | The function tool_debug_cb doesn't match curl_debug_callback in curl.h (unsigned vs. signed char* for 3rd param). Bug: https://curl.haxx.se/mail/lib-2017-03/0120.html
* gcc7: fix ‘*’ in boolean context, suggest ‘&&’ instead ↵Alexis La Goutte2017-03-302-2/+2
| | | | | | [-Wint-in-bool-context] Closes #1371
* curl: fix callback argument inconsistencyHanno Böck2017-03-294-4/+4
| | | | | | | As you can see the callback definition uses a char* for the first argument, while the function uses a void*. URL: https://curl.haxx.se/mail/lib-2017-03/0116.html
* make: use the variable MAKE for recursive callsMaksim Stsepanenka2017-03-291-1/+1
| | | | Closes #1366
* spelling fixesklemens2017-03-261-2/+2
| | | | Closes #1356
* curl: check for end of input in writeout backslash handlingDaniel Stenberg2017-03-251-2/+2
| | | | | | Reported-by: Brian Carpenter Added test 1442 to verify
* mkhelp: disable compression if the perl gzip module is unavailableDan Fandrich2017-03-231-2/+13
| | | | | This is nowadays included with the base perl distribution, but wasn't prior to about perl 5.14
* cmake: build manual pages (including curl.1)Peter Wu2017-03-211-6/+6
| | | | | | | | | | | Also make Perl mandatory to allow building the docs. While CMakeLists.txt could probably read the list of manual pages from Makefile.am, actually putting those in CMakeLists.txt is cleaner so that is what is done here. Fixes #1230 Ref: https://github.com/curl/curl/pull/1288
* tool_operate: Fix showing HTTPS-Proxy options on CURLE_SSL_CACERTJay Satiro2017-03-161-3/+2
| | | | | | | | | | | | - Show the HTTPS-proxy options on CURLE_SSL_CACERT if libcurl was built with HTTPS-proxy support. Prior to this change those options were shown only if an HTTPS-proxy was specified by --proxy, but that did not take into account environment variables such as http_proxy, https_proxy, etc. Follow-up to e1187c4. Bug: https://github.com/curl/curl/issues/1331 Reported-by: Nehal J Wani
* build: removed redundant DEPENDENCIES from makefilesDan Fandrich2017-03-141-1/+0
|
* Improve code readbilitySylvestre Ledru2017-03-134-37/+30
| | | | | | ... by removing the else branch after a return, break or continue. Closes #1310
* tool_writeout: fixed a buffer read overrun on --write-outDan Fandrich2017-03-121-1/+1
| | | | | | | | | If a % ended the statement, the string's trailing NUL would be skipped and memory past the end of the buffer would be accessed and potentially displayed as part of the --write-out output. Added tests 1440 and 1441 to check for this kind of condition. Reported-by: Brian Carpenter
* url: add option CURLOPT_SUPPRESS_CONNECT_HEADERSDesmond O. Chang2017-03-124-1/+11
| | | | | | | | | | | | | | - Add new option CURLOPT_SUPPRESS_CONNECT_HEADERS to allow suppressing proxy CONNECT response headers from the user callback functions CURLOPT_HEADERFUNCTION and CURLOPT_WRITEFUNCTION. - Add new tool option --suppress-connect-headers to expose CURLOPT_SUPPRESS_CONNECT_HEADERS and allow suppressing proxy CONNECT response headers from --dump-header and --include. Assisted-by: Jay Satiro Assisted-by: CarloCannas@users.noreply.github.com Closes https://github.com/curl/curl/pull/783
* build: fixed making man page in out-of-tree tarball buildsDan Fandrich2017-03-091-6/+8
| | | | | | The man page taken from the release package is found in a different location than if it's built from source. It must be referenced as $< in the rule to get its correct location in the VPATH.
* mkhelp: simplified the gzip codeDan Fandrich2017-03-091-43/+16
| | | | | | This eliminates the need for an external gzip program, which wasn't working with Busybox's gzip, anyway. It now compresses using perl's IO::Compress::Gzip
* vtls: add options to specify range of enabled TLS versionsJozef Kralik2017-03-086-1/+45
| | | | | | | This commit introduces the CURL_SSLVERSION_MAX_* constants as well as the --tls-max option of the curl tool. Closes https://github.com/curl/curl/pull/1166
* build: fix gcc7 implicit fallthrough warningsAlexis La Goutte2017-03-031-0/+1
| | | | | | | Mark intended fallthroughs with /* FALLTHROUGH */ so that gcc will know it's expected and won't warn on [-Wimplicit-fallthrough=]. Closes https://github.com/curl/curl/pull/1297
* url: Improve CURLOPT_PROXY_CAPATH error handlingJay Satiro2017-02-211-4/+17
| | | | | | | | | | | | | | | - Change CURLOPT_PROXY_CAPATH to return CURLE_NOT_BUILT_IN if the option is not supported, which is the same as what we already do for CURLOPT_CAPATH. - Change the curl tool to handle CURLOPT_PROXY_CAPATH error CURLE_NOT_BUILT_IN as a warning instead of as an error, which is the same as what we already do for CURLOPT_CAPATH. - Fix CAPATH docs to show that CURLE_NOT_BUILT_IN is returned when the respective CAPATH option is not supported by the SSL library. Ref: https://github.com/curl/curl/pull/1257
* string formatting: fix 4 printf-style format stringsMichael Kaufmann2017-02-192-2/+2
|
* tool_urlglob: Allow a glob range with the same start and stopJay Satiro2017-02-151-18/+17
| | | | | | | | | For example allow ranges like [1-1] and [a-a] etc. Regression since 5ca96cb. Bug: https://github.com/curl/curl/issues/1238 Reported-by: R. Dennis Steed
* curl: fix typo in time condition warning messageNick Draffen2017-02-141-1/+1
| | | | | | | The warning message had a typo. The argument long form is --time-cond not --timecond Closes #1263
* tool_operate: Show HTTPS-Proxy options on CURLE_SSL_CACERTJay Satiro2017-02-111-2/+7
| | | | | | | | | | When CURLE_SSL_CACERT occurs the tool shows a lengthy error message to the user explaining possible solutions such as --cacert and --insecure. This change appends to that message similar options --proxy-cacert and --proxy-insecure when there's a specified HTTPS proxy. Closes https://github.com/curl/curl/issues/1258
* cmdline-opts: Fixed build and test in out of source tree buildsDan Fandrich2017-02-061-1/+1
|
* OS400: Fix symbolsJay Satiro2017-02-011-1/+0
| | | | | | | | | | | | - s/CURLOPT_SOCKS_PROXY/CURLOPT_PRE_PROXY Follow-up to 7907a2b and 845522c. - Fix incorrect id for CURLOPT_PROXY_PINNEDPUBLICKEY. - Add id for CURLOPT_ABSTRACT_UNIX_SOCKET. Bug: https://github.com/curl/curl/issues/1237 Reported-by: jonrumsey@users.noreply.github.com
* VC: remove the makefile.vc6 build infraDaniel Stenberg2017-01-233-552/+1
| | | | | | The winbuild/ build files is now the single MSVC makefile build choice. Closes #1215
* docs/curl.1: generate from the cmdline-opts scriptDaniel Stenberg2017-01-231-1/+4
|
* *.rc: escape non-ASCII/non-UTF-8 character for clarityViktor Szakats2017-01-191-2/+2
| | | | Closes https://github.com/curl/curl/pull/1217
* unix_socket: add support for abstract unix domain socketIsaac Boukris2017-01-134-6/+20
| | | | | | | | | | | | | | | | | | | | | In addition to unix domain sockets, Linux also supports an abstract namespace which is independent of the filesystem. In order to support it, add new CURLOPT_ABSTRACT_UNIX_SOCKET option which uses the same storage as CURLOPT_UNIX_SOCKET_PATH internally, along with a flag to specify abstract socket. On non-supporting platforms, the abstract address will be interpreted as an empty string and fail gracefully. Also add new --abstract-unix-socket tool parameter. Signed-off-by: Isaac Boukris <iboukris@gmail.com> Reported-by: Chungtsun Li (typeless) Reviewed-by: Daniel Stenberg Reviewed-by: Peter Wu Closes #1197 Fixes #1061
* curl: reset the easy handle at --nextIsaac Boukris2017-01-131-1/+4
| | | | | So that only "global" options (verbose mostly) survive into the next transfer, and the others have to be set again unless default is fine.
* tool_operate: Fix --remote-time incorrect times on WindowsJay Satiro2016-12-281-3/+48
| | | | | | | | | | | | - Use Windows API SetFileTime to set the file time instead of utime. Avoid utime on Windows if possible because it may apply a daylight saving time offset to our UTC file time. Bug: https://curl.haxx.se/mail/archive-2016-11/0033.html Reported-by: Tim Closes https://github.com/curl/curl/pull/1121
* curl: remove superfluous include fileDaniel Stenberg2016-12-271-4/+0
| | | | | | | | | The <netinet/tcp.h> is a leftover from the past when TCP socket options were set in this file. This include causes build issues on AIX 4.3. Reported-by: Kim Minjoong Closes #1178
* tests: checksrc complianceJay Satiro2016-12-191-1/+1
|
* tool_getparam.c: make comments use the up-to-date option namesDaniel Stenberg2016-12-171-2/+2
|
* preproxy: renamed what was added as SOCKS_PROXYDaniel Stenberg2016-12-165-9/+16
| | | | | | | CURLOPT_SOCKS_PROXY -> CURLOPT_PRE_PROXY Added the corresponding --preroxy command line option. Sets a SOCKS proxy to connect to _before_ connecting to a HTTP(S) proxy.
* curl: normal socks proxies still use CURLOPT_PROXYDaniel Stenberg2016-12-163-15/+14
| | | | | | | ... the newly introduced CURLOPT_SOCKS_PROXY is special and should be asked for specially. (Needs new code.) Unified proxy type to a single variable in the config struct.
* CURLOPT_SOCKS_PROXYTYPE: removedDaniel Stenberg2016-12-161-3/+1
| | | | | | This was added as part of the SOCKS+HTTPS proxy merge but there's no need to support this as we prefer to have the protocol specified as a prefix instead.
* checksrc: warn for assignments within if() expressionsDaniel Stenberg2016-12-143-9/+27
| | | | | ... they're already frowned upon in our source code style guide, this now enforces the rule harder.
* checksrc: stricter no-space-before-paren enforcementDaniel Stenberg2016-12-139-11/+11
| | | | In order to make the code style more uniform everywhere
* curl: support zero-length argument strings in config filesDaniel Stenberg2016-12-021-9/+5
| | | | | | ... like 'user-agent = ""' Adjusted test 71 to verify.
* curl: remove --proxy-ssl* optionsDaniel Stenberg2016-11-282-14/+0
| | | | | There's mostly likely no need to allow setting SSLv2/3 version for HTTPS proxy. Those protocols are insecure by design and deprecated.
* curl_version_info: add CURL_VERSION_HTTPS_PROXYOkhin Vasilij2016-11-261-0/+1
| | | | Closes #1142
* tool_urlglob: Improve sanity check in glob_rangeJay Satiro2016-11-241-1/+1
| | | | | | | | Prior to this change we depended on errno if strtol could not perform a conversion. POSIX says EINVAL *may* be set. Some implementations like Microsoft's will not set it if there's no conversion. Ref: https://github.com/curl/curl/commit/ee4f7660#commitcomment-19658189
* tool_help: Change description for --retry-connrefusedJay Satiro2016-11-241-2/+1
| | | | Ref: https://github.com/curl/curl/pull/1064#issuecomment-260052409
* add CURLINFO_SCHEME, CURLINFO_PROTOCOL, and %{scheme}Frank Gevaerts2016-11-251-0/+8
| | | | | | | | | | | | | | Adds access to the effectively used protocol/scheme to both libcurl and curl, both in string and numeric (CURLPROTO_*) form. Note that the string form will be uppercase, as it is just the internal string. As these strings are declared internally as const, and all other strings returned by curl_easy_getinfo() are de-facto const as well, string handling in getinfo.c got const-ified. Closes #1137
* checksrc: white space edits to comply to stricter checksrcDaniel Stenberg2016-11-244-9/+9
|
* checksrc: code style: use 'char *name' styleDaniel Stenberg2016-11-244-10/+10
|
* proxy: Support HTTPS proxy and SOCKS+HTTP(s)Alex Rousskov2016-11-248-12/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * HTTPS proxies: An HTTPS proxy receives all transactions over an SSL/TLS connection. Once a secure connection with the proxy is established, the user agent uses the proxy as usual, including sending CONNECT requests to instruct the proxy to establish a [usually secure] TCP tunnel with an origin server. HTTPS proxies protect nearly all aspects of user-proxy communications as opposed to HTTP proxies that receive all requests (including CONNECT requests) in vulnerable clear text. With HTTPS proxies, it is possible to have two concurrent _nested_ SSL/TLS sessions: the "outer" one between the user agent and the proxy and the "inner" one between the user agent and the origin server (through the proxy). This change adds supports for such nested sessions as well. A secure connection with a proxy requires its own set of the usual SSL options (their actual descriptions differ and need polishing, see TODO): --proxy-cacert FILE CA certificate to verify peer against --proxy-capath DIR CA directory to verify peer against --proxy-cert CERT[:PASSWD] Client certificate file and password --proxy-cert-type TYPE Certificate file type (DER/PEM/ENG) --proxy-ciphers LIST SSL ciphers to use --proxy-crlfile FILE Get a CRL list in PEM format from the file --proxy-insecure Allow connections to proxies with bad certs --proxy-key KEY Private key file name --proxy-key-type TYPE Private key file type (DER/PEM/ENG) --proxy-pass PASS Pass phrase for the private key --proxy-ssl-allow-beast Allow security flaw to improve interop --proxy-sslv2 Use SSLv2 --proxy-sslv3 Use SSLv3 --proxy-tlsv1 Use TLSv1 --proxy-tlsuser USER TLS username --proxy-tlspassword STRING TLS password --proxy-tlsauthtype STRING TLS authentication type (default SRP) All --proxy-foo options are independent from their --foo counterparts, except --proxy-crlfile which defaults to --crlfile and --proxy-capath which defaults to --capath. Curl now also supports %{proxy_ssl_verify_result} --write-out variable, similar to the existing %{ssl_verify_result} variable. Supported backends: OpenSSL, GnuTLS, and NSS. * A SOCKS proxy + HTTP/HTTPS proxy combination: If both --socks* and --proxy options are given, Curl first connects to the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy. TODO: Update documentation for the new APIs and --proxy-* options. Look for "Added in 7.XXX" marks.