summaryrefslogtreecommitdiff
path: root/src/tool_writeout.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* cppcheck: fix warningsMarian Klymov2018-06-111-2/+2
| | | | | | | | | | | | | - Get rid of variable that was generating false positive warning (unitialized) - Fix issues in tests - Reduce scope of several variables all over etc Closes #2631
* curl: check for end of input in writeout backslash handlingDaniel Stenberg2017-03-251-2/+2
| | | | | | Reported-by: Brian Carpenter Added test 1442 to verify
* 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
* checksrc: warn for assignments within if() expressionsDaniel Stenberg2016-12-141-1/+6
| | | | | ... 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-131-1/+1
| | | | In order to make the code style more uniform everywhere
* 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
* proxy: Support HTTPS proxy and SOCKS+HTTP(s)Alex Rousskov2016-11-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* curl -w: added more decimal digits to timing countersMauro Rappa2016-11-051-7/+7
| | | | | | Now showing microsecond resolution. Closes #1106
* curl_strequal: part of public API/ABI, needs to be keptDaniel Stenberg2016-10-311-1/+1
| | | | | | These two public functions have been mentioned as deprecated since a very long time but since they are still part of the API and ABI we need to keep them around.
* strcasecompare: is the new name for strequal()Daniel Stenberg2016-10-311-1/+1
| | | | | | | ... to make it less likely that we forget that the function actually does case insentive compares. Also replaced several invokes of the function with a plain strcmp when case sensitivity is not an issue (like comparing with "-").
* http: add CURLINFO_HTTP_VERSION and %{http_version}Frank Gevaerts2016-05-301-1/+23
| | | | | | | Adds access to the effectively used http version to both libcurl and curl. Closes #799
* URLs: change all http:// URLs to https://Daniel Stenberg2016-02-031-1/+1
|
* tool: use ENABLE_CURLX_PRINTF instead of _MPRINTF_REPLACEDaniel Stenberg2015-03-031-5/+4
|
* tool_writeout.c: initialize string pointer variableMarc Hoersken2014-04-191-1/+1
|
* Revert changes relative to lib/*.[ch] recent renamingYang Tse2013-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts renaming and usage of lib/*.h header files done 28-12-2012, reverting 2 commits: f871de0... build: make use of 76 lib/*.h renamed files ffd8e12... build: rename 76 lib/*.h files This also reverts removal of redundant include guard (redundant thanks to changes in above commits) done 2-12-2013, reverting 1 commit: c087374... curl_setup.h: remove redundant include guard This also reverts renaming and usage of lib/*.c source files done 3-12-2013, reverting 3 commits: 13606bb... build: make use of 93 lib/*.c renamed files 5b6e792... build: rename 93 lib/*.c files 7d83dff... build: commit 13606bbfde follow-up 1 Start of related discussion thread: http://curl.haxx.se/mail/lib-2013-01/0012.html Asking for confirmation on pushing this revertion commit: http://curl.haxx.se/mail/lib-2013-01/0048.html Confirmation summary: http://curl.haxx.se/mail/lib-2013-01/0079.html NOTICE: The list of 2 files that have been modified by other intermixed commits, while renamed, and also by at least one of the 6 commits this one reverts follows below. These 2 files will exhibit a hole in history unless git's '--follow' option is used when viewing logs. lib/curl_imap.h lib/curl_smtp.h
* writeout: -w now supports remote_ip/port and local_ip/portDaniel Stenberg2013-01-031-0/+32
| | | | | | Added mention to the curl.1 man page. Test case 1223 verifies remote_ip/port.
* build: make use of 76 lib/*.h renamed filesYang Tse2012-12-281-1/+1
| | | | | | 76 private header files renamed to use our standard naming scheme. This change affects 322 files in libcurl's source tree.
* curl tool: make curl.h first header included in tool_setup.hYang Tse2012-04-081-2/+0
|
* curl tool: use configuration files from lib directoryYang Tse2012-04-061-2/+2
| | | | | | | | | | | Configuration files such as curl_config.h and all config-*.h no longer exist nor are generated/copied into 'src' directory, now these only exist in 'lib' directory from where curl tool sources uses them. Additionally old src/setup.h has been refactored into src/tool_setup.h which now pulls lib/setup.h The possibility of a makefile needing an include path adjustment exists.
* curl tool: add filename_effective token for --write-outDave Reisner2012-04-011-1/+8
| | | | | | | By modifying the parameter list for ourWriteOut() and passing the OutStruct that collects data in tool_operate, we get access to the remote name that we're writing to. Shell scripters should find this useful when used in conjuntion with the --remote-header-name option.
* curl tool: reviewed code moved to tool_*.[ch] filesYang Tse2011-10-061-0/+290