Commit Graph

1645 Commits

Author SHA1 Message Date
Marc Hoersken 91c13d759a curl: output protocol headers using binary mode
Since protocol headers contain explicit line-endings there should
be no automatic conversion to ASCII text or CRLF line-endings.

This might break third party tools that already depend on this
behaviour. We might need to introduce an option to make this optional.
2014-02-14 20:12:28 +01:00
Steve Holme c8d1733d12 tool_cfgable: Moved easy handle cleanup to fix pingpong logout issues
Commmit c5f8e2f5f4 removed the easy handle clean-up from tool_operate,
letting the code that was already present in free_config_fields()
perform the task. Unfortunately, this wasn't the correct place to do
this as it broke protocols, that would perform a logout, as the main
clean-up in tool_main had already been called.
2014-02-10 22:23:52 +00:00
Fabian Frank 909a68c121 NPN/ALPN: allow disabling via command line
when using --http2 one can now selectively disable NPN or ALPN with
--no-alpn and --no-npn. for now honored with NSS only.

TODO: honor this option with GnuTLS and OpenSSL
2014-02-10 13:06:17 +01:00
Daniel Stenberg 1861a1de67 tool_metalink: fix compiler warning when built without metalink 2014-02-09 20:08:13 +01:00
Steve Holme 86a40f5d1a tool_operate: Move the trace and error file closure to tool_cfgable 2014-02-09 17:16:15 +00:00
Steve Holme 8cf63f88c2 tool_operate: Added support for performing URL specific operations 2014-02-09 11:03:57 +00:00
Steve Holme c5f8e2f5f4 tool_operate: Let curl handle cleanup take place in config_free() 2014-02-09 10:57:56 +00:00
Steve Holme 132f5edfbd tool_getparam: Added support for parsing of specific URL options 2014-02-08 11:18:25 +00:00
Steve Holme a3a6b03c30 tool_cfgable: For consistency renamed init_config() to config_init() 2014-02-07 21:27:12 +00:00
Steve Holme 3b929b6a65 tool_cfgable: Introduced config_free() function 2014-02-07 21:22:46 +00:00
Daniel Stenberg 67d14ab98f --help: add missing --tlsv1.x options 2014-02-07 20:29:13 +01:00
Steve Holme d10065c05a tool_operate: Removed unused argument parameters from operate_do() 2014-02-06 20:52:12 +00:00
Steve Holme 456169f9e5 tool_operate: Moved list SSL engines code into operate() 2014-02-06 19:50:32 +00:00
Steve Holme dd97828df7 tool_operate: Moved argument parsing into operate() 2014-02-06 19:40:41 +00:00
Steve Holme f8abd56450 tool_operate: Moved .curlrc parsing code into operate() 2014-02-05 20:49:57 +00:00
Steve Holme 61ba1daba0 tool_operate: Moved locale setup code into operate_init() 2014-02-05 20:38:57 +00:00
Dan Fandrich ff0547e70e tool_operate: shortened too-long source line 2014-02-04 21:49:40 +01:00
Steve Holme 7d242658ac tool_operate: Introduced operate_free() function 2014-02-04 20:15:50 +00:00
Steve Holme dde3081085 tool_operate: Introduced operate_init() function 2014-02-04 20:14:39 +00:00
Steve Holme 2dc7ad23fd tool_operate: Introduced new operate() function 2014-02-04 20:07:35 +00:00
Steve Holme 6127e54f40 tool_operate: Moved libcurl information gathering to tool_main 2014-02-03 22:56:58 +00:00
Steve Holme c35d05aa62 tool_operate: Moved command line argument parsing into separate function 2014-02-03 18:38:14 +00:00
Steve Holme 8034b08e0e tool_operate: Simplified parse .curlrc decision logic 2014-02-03 16:16:17 +00:00
Steve Holme b811200f64 tool_operate: Moved main initialisation and cleanup code into tool_main 2014-02-03 12:31:16 +00:00
Steve Holme c1daf6c0cd tool_main: Fixed compilation warning from commit 0104678c79
no previous prototype for function 'memory_tracking_init'
2014-02-03 12:16:22 +00:00
Steve Holme cf80b85b66 tool_main: Changed stack based config struct to be heap based 2014-02-03 10:54:40 +00:00
Steve Holme 0104678c79 tool_operate: Moved memory tracking initialisation into tool_main 2014-02-02 13:48:36 +00:00
Steve Holme 9ab0dc618f tool_operate: Moved initial config setup into new init_config() function 2014-02-02 10:18:21 +00:00
Steve Holme 83dbd06936 tool_main: Moved config struct initialisation into a separate function
In preparation for adding URL specific options moved the initialisation
of the Configurable structure into a separate function in tool_cfgable.
2014-02-01 13:44:00 +00:00
Daniel Stenberg 0952c9abcc http2: call it "HTTP 2" and not 2.0
The minor version will be dropped for HTTP 2 so it will make sense to
avoid using it in option names etc.
2014-01-30 16:59:35 +01:00
Maks Naumov 5a47062cad getpass: fix password parsing from console
Incorrect password if use backspace while entered the password.

Regression from f7bfdbabf2

The '?:' operator has lower priority than the '-' operator
2014-01-28 13:28:00 +01:00
Steve Holme 33b8960dc8 tool: Fixed incorrect return code if password prompting runs out of memory
Due to the changes in commit 3c929ff9f6 and lack of subsequent
updates, curl could return a CURLE_FTP_ACCEPT_FAILED error if
checkpasswd() ran out of memory in versions 7.33.0 and 7.34.0.

Updated the function declaration and return code to return
CURLE_OUT_OF_MEMORY and CURLE_OK where appropriate.
2014-01-19 16:26:19 +00:00
Steve Holme aba98991a5 tool: Fixed incorrect return code if command line parser runs out of memory
In the rare instance where getparameter() may return PARAM_NO_MEM whilst
parsing a URL, cURL would return this error code, which is equivalent to
CURLE_FTP_ACCEPT_FAILED in cURL error codes terms.

Instead, return CURLE_FAILED_INIT and output the failure reason as per
the other usage of getparameter().
2014-01-19 12:31:34 +00:00
Tobias Markus db1beab1d7 Subject: progress bar: increase update frequency to 10Hz
Increasing the update frequency of the progress bar to 10Hz greatly
improves the visual appearance of the progress bar (at least in my
impression).

Signed-off-by: Tobias Markus <tobias@markus-regensburg.de>
2014-01-18 22:46:32 +01:00
Tobias Markus 93ca1d2065 progress bar: always update when at 100%
Currently, the progress bar is updated at 5Hz. Because it is often not
updated to 100% when the download is finished and curl exits, the bar
is often "stuck" at 90-something, thus irritating the user.

This patch fixes this by always updating the progress bar (instead of
waiting for 200ms to have elapsed) while the download is finished but
curl has not yet exited. This should not greatly affect performance
because that moment is rather short.

Signed-off-by: Tobias Markus <tobias@markus-regensburg.de>
2014-01-18 22:46:32 +01:00
Daniel Stenberg 169fedbdce login options: remove the ;[options] support from CURLOPT_USERPWD
To avoid the regression when users pass in passwords containing semi-
colons, we now drop the ability to set the login options with the same
options. Support for login options in CURLOPT_USERPWD was added in
7.31.0.

Test case 83 was modified to verify that colons and semi-colons can be
used as part of the password when using -u (CURLOPT_USERPWD).

Bug: http://curl.haxx.se/bug/view.cgi?id=1311
Reported-by: Petr Bahula
Assisted-by: Steve Holme
Signed-off-by: Daniel Stenberg <daniel@haxx.se>
2013-12-14 22:40:37 +01:00
Daniel Stenberg 41d21e460f parseconfig: warn if unquoted white spaces are detected
Commit 0db811b6 made some existing config files pass on unexpected
values to libcurl that made it somewhat hard to track down what was
really going on.

This code detects unquoted white spaces in the parameter when parsing a
config file as that would be one symptom and it is generally a bad
syntax anyway.
2013-12-09 23:30:09 +01:00
Kamil Dudka ff9b66a8d4 tool_metalink: do not use HAVE_NSS_INITCONTEXT
... no longer provided by the configure script
2013-12-02 17:03:23 +01:00
Daniel Stenberg 0db811b69b parseconfig: dash options can't specified with colon or equals
Bug: http://curl.haxx.se/bug/view.cgi?id=1297
Reported-by: Michael Osipov
2013-11-29 15:17:08 +01:00
Daniel Stenberg 0dd6522036 globbing: curl glob counter mismatch with {} list use
The "fixed string" function wrongly bumped the "urlnum" counter which
made curl output the total number of URLs wrong when using
{one,two,three} lists in globs.

Reported-by: Michael-O
Bug: http://curl.haxx.se/bug/view.cgi?id=1305
2013-11-28 23:31:31 +01:00
Steve Holme 732d10ed6c tool_help: Updated --list-only description to include POP3 2013-11-03 13:55:22 +00:00
Daniel Stenberg bce03fe144 glob_range: pass the closing bracket for a-z ranges
Regression since commit 5ca96cb844 (release in 7.33.0)

Reported-by: Marcin Gryszkalis
2013-11-03 10:08:10 +01:00
Steve Holme 469b423350 tool_help: Added login options to --user description 2013-10-26 20:11:48 +01:00
Steve Holme 1f0e50f2b9 tool_help: Added clarity to the --oauth2-bearer option
...as XOAUTH2 is the extended (or non-standard) SASL identifier and
OAuth 2 is the protocol name (and version).
2013-10-26 13:01:33 +01:00
Daniel Stenberg 867b52a7ac glob: fix regression from commit 5ca96cb844
Plain strings after glob ranges/lists weren't treated correctly but
caused broken URLs to get used.

Reported-by: Javier Barroso
2013-10-22 00:01:17 +02:00
Dave Reisner d774802eec tool: use XFERFUNCTION to save some casts 2013-10-15 20:42:05 +02:00
Gergely Nagy ad34a2d5c8 SSL: protocol version can be specified more precisely
CURL_SSLVERSION_TLSv1_0, CURL_SSLVERSION_TLSv1_1,
CURL_SSLVERSION_TLSv1_2 enum values are added to force exact TLS version
(CURL_SSLVERSION_TLSv1 means TLS 1.x).

axTLS:
axTLS only supports TLS 1.0 and 1.1 but it cannot be set that only one
of these should be used, so we don't allow the new enum values.

darwinssl:
Added support for the new enum values.

SChannel:
Added support for the new enum values.

CyaSSL:
Added support for the new enum values.
Bug: The original CURL_SSLVERSION_TLSv1 value enables only TLS 1.0 (it
did the same before this commit), because CyaSSL cannot be configured to
use TLS 1.0-1.2.

GSKit:
GSKit doesn't seem to support TLS 1.1 and TLS 1.2, so we do not allow
those values.
Bugfix: There was a typo that caused wrong SSL versions to be passed to
GSKit.

NSS:
TLS minor version cannot be set, so we don't allow the new enum values.

QsoSSL:
TLS minor version cannot be set, so we don't allow the new enum values.

OpenSSL:
Added support for the new enum values.
Bugfix: The original CURL_SSLVERSION_TLSv1 value enabled only TLS 1.0,
now it enables 1.0-1.2.

Command-line tool:
Added command line options for the new values.
2013-10-15 20:26:47 +02:00
Daniel Stenberg 92cf6141ed curl: fix --oauth2-bearer in the --help output
After the option rename in 5df04bfafd
2013-10-13 23:21:12 +02:00
Daniel Stenberg 5df04bfafd curl: rename --bearer to --oauth2-bearer
The option '--bearer' might be slightly ambiguous in name. It doesn't
create any conflict that I am aware of at the moment, however, OAUTH v2
is not the only authentication mechanism which uses "bearer" tokens.

Reported-by: Kyle L. Huff
URL: http://curl.haxx.se/mail/lib-2013-10/0064.html
2013-10-12 23:26:38 +02:00
François Charlier 3d43a48781 xattr: add support for FreeBSD xattr API 2013-10-01 22:53:47 +02:00