summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* http2: call it "HTTP 2" and not 2.0Daniel Stenberg2014-01-302-4/+4
| | | | | The minor version will be dropped for HTTP 2 so it will make sense to avoid using it in option names etc.
* getpass: fix password parsing from consoleMaks Naumov2014-01-281-1/+1
| | | | | | | | Incorrect password if use backspace while entered the password. Regression from f7bfdbabf2d5398f4c266eabb0992a04af661f22 The '?:' operator has lower priority than the '-' operator
* tool: Fixed incorrect return code if password prompting runs out of memorySteve Holme2014-01-192-8/+9
| | | | | | | | | Due to the changes in commit 3c929ff9f6ea 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.
* tool: Fixed incorrect return code if command line parser runs out of memorySteve Holme2014-01-191-17/+15
| | | | | | | | | 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().
* Subject: progress bar: increase update frequency to 10HzTobias Markus2014-01-181-2/+2
| | | | | | | | 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>
* progress bar: always update when at 100%Tobias Markus2014-01-181-5/+6
| | | | | | | | | | | | | 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>
* login options: remove the ;[options] support from CURLOPT_USERPWDDaniel Stenberg2013-12-143-2/+11
| | | | | | | | | | | | | | | 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>
* parseconfig: warn if unquoted white spaces are detectedDaniel Stenberg2013-12-091-0/+18
| | | | | | | | | | 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.
* tool_metalink: do not use HAVE_NSS_INITCONTEXTKamil Dudka2013-12-021-6/+2
| | | | ... no longer provided by the configure script
* parseconfig: dash options can't specified with colon or equalsDaniel Stenberg2013-11-291-3/+11
| | | | | Bug: http://curl.haxx.se/bug/view.cgi?id=1297 Reported-by: Michael Osipov
* globbing: curl glob counter mismatch with {} list useDaniel Stenberg2013-11-281-8/+4
| | | | | | | | | 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
* tool_help: Updated --list-only description to include POP3Steve Holme2013-11-031-1/+1
|
* glob_range: pass the closing bracket for a-z rangesDaniel Stenberg2013-11-031-1/+1
| | | | | | Regression since commit 5ca96cb844102 (release in 7.33.0) Reported-by: Marcin Gryszkalis
* tool_help: Added login options to --user descriptionSteve Holme2013-10-261-1/+2
|
* tool_help: Added clarity to the --oauth2-bearer optionSteve Holme2013-10-261-1/+1
| | | | | ...as XOAUTH2 is the extended (or non-standard) SASL identifier and OAuth 2 is the protocol name (and version).
* glob: fix regression from commit 5ca96cb844Daniel Stenberg2013-10-221-4/+8
| | | | | | | Plain strings after glob ranges/lists weren't treated correctly but caused broken URLs to get used. Reported-by: Javier Barroso
* tool: use XFERFUNCTION to save some castsDave Reisner2013-10-153-9/+9
|
* SSL: protocol version can be specified more preciselyGergely Nagy2013-10-152-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* curl: fix --oauth2-bearer in the --help outputDaniel Stenberg2013-10-131-1/+1
| | | | After the option rename in 5df04bfafd1
* curl: rename --bearer to --oauth2-bearerDaniel Stenberg2013-10-121-1/+1
| | | | | | | | | 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
* xattr: add support for FreeBSD xattr APIFrançois Charlier2013-10-011-2/+13
|
* pop3: Added basic SASL XOAUTH2 supportSteve Holme2013-09-201-1/+1
| | | | | | | | | | | Added the ability to use an XOAUTH2 bearer token [RFC6750] with POP3 for authentication using RFC6749 "OAuth 2.0 Authorization Framework". The bearer token is expected to be valid for the user specified in conn->user. If CURLOPT_XOAUTH2_BEARER is defined and the connection has an advertised auth mechanism of "XOAUTH2", the user and access token are formatted as a base64 encoded string and sent to the server as "AUTH XOAUTH2 <bearer token>".
* curl: Added clarification to the --mail options in the --help outputSteve Holme2013-09-201-3/+3
| | | | ... that these options apply to SMTP only.
* curl: Fixed usage of DNS options when not using c-ares resolverSteve Holme2013-09-133-8/+14
| | | | | | | | | | Commit 32352ed6adddcb introduced various DNS options, however, these would cause curl to exit with CURLE_NOT_BUILT_IN when c-ares wasn't being used as the backend resolver even if the options weren't set by the user. Additionally corrected some minor coding style errors from the same commit.
* curl: Add support for various DNS binding options.Ben Greear2013-09-125-5/+39
| | | | | | | | | | | (Passed on to c-ares.) Allows something like this: curl --dns-interface sta8 --dns-ipv4-addr 8.8.1.111 --interface sta8 \ --localaddr 8.8.1.111 --dns-servers 8.8.8.1 www.google.com Signed-off-by: Ben Greear <greearb@candelatech.com>
* urlglob: improved error messages and column number on bad useDaniel Stenberg2013-09-062-82/+66
| | | | | | | Introduce a convenience macro and keep of the column better so that it can point out the offending column better. Updated test 75 accordingly.
* urlglob: avoid error code translationDaniel Stenberg2013-09-061-6/+4
| | | | | By using the correct values from the start we don't have to translate them!
* urlglob: avoid NULL pointer dereferenceDaniel Stenberg2013-09-061-1/+1
| | | | Thanks to clang-analyzer
* curl: unbreak --http1.0 againDaniel Stenberg2013-09-051-2/+2
| | | | I broke it in 2eabb7d590
* curl: add --http1.1 and --http2.0 optionsDaniel Stenberg2013-09-042-4/+20
|
* curl -V: output HTTP2 as a feature if presentDaniel Stenberg2013-09-041-1/+2
|
* tool_operate.c: Fixed compilation warningSteve Holme2013-08-271-0/+1
| | | | warning: implicit declaration of function 'checkpasswd'
* curl: Moved check for password out of get parameter loopSteve Holme2013-08-272-9/+13
| | | | | | | | | | Moved the calls to checkpasswd() out of the getparameter() function which allows for any related arguments to be specified on the command line before or after --user (and --proxy-user). For example: --bearer doesn't need to be specified before --user to prevent curl from asking for an unnecessary password as is the case with commit e7dcc454c67a2f.
* curl: added --bearer option to helpKyle L. Huff2013-08-261-0/+1
| | | | Added the --bearer option to the help output
* curl: added basic SASL XOAUTH2 supportKyle L. Huff2013-08-264-3/+15
| | | | | | | | | Added the ability to specify an XOAUTH2 bearer token [RFC6750] via the --bearer option. Example usage: curl --url "imaps://imap.gmail.com:993/INBOX/;UID=1" --ssl-reqd --bearer ya29.AHES6Z...OMfsHYI --user username@example.com
* tool_urlglob.c: Fixed compiler warningsSteve Holme2013-08-261-2/+2
| | | | warning: 'variable' may be used uninitialized in this function
* curl_easy_perform_ev: debug/test functionDaniel Stenberg2013-08-203-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | This function is meant to work *exactly* as curl_easy_perform() but will use the event-based libcurl API internally instead of curl_multi_perform(). To avoid relying on an actual event-based library and to not use non-portable functions (like epoll or similar), there's a rather inefficient emulation layer implemented on top of Curl_poll() instead. There's currently some convenience logging done in curl_easy_perform_ev which helps when tracking down problems. They may be suitable to remove or change once things seem to be fine enough. curl has a new --test-event option when built with debug enabled that then uses curl_easy_perform_ev() instead of curl_easy_perform(). If built without debug, using --test-event will only output a warning message. NOTE: curl_easy_perform_ev() is not part if the public API on purpose. It is only present in debug builds of libcurl and MUST NOT be considered stable even then. Use it for libcurl-testing purposes only. runtests.pl now features an -e command line option that makes it use --test-event for all curl command line tests. The man page is updated.
* glob: error out on range overflowDaniel Stenberg2013-08-161-6/+28
| | | | | | | | | | | The new multiply() function detects range value overflows. 32bit machines will overflow on a 32bit boundary while 64bit hosts support ranges up to the full 64 bit range. Added test 1236 to verify. Bug: http://curl.haxx.se/bug/view.cgi?id=1267 Reported-by: Will Dietz
* urlglob: better detect unclosed braces, empty lists and overflowsDaniel Stenberg2013-08-163-249/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A rather big overhaul and cleanup. 1 - curl wouldn't properly detect and reject globbing that ended with an open brace if there were brackets or braces before it. Like "{}{" or "[0-1]{" 2 - curl wouldn't properly reject empty lists so that "{}{}" would result in curl getting (nil) strings in the output. 3 - By using strtoul() instead of sscanf() the code will now detected over and underflows. It now also better parses the step argument to only accept positive numbers and only step counters that is smaller than the delta between the maximum and minimum numbers. 4 - By switching to unsigned longs instead of signed ints for the counters, the max values for []-ranges are now very large (on 64bit machines). 5 - Bumped the maximum number of globs in a single URL to 100 (from 10) 6 - Simplified the code somewhat and now it stores fixed strings as single- entry lists. That's also one of the reasons why I did (5) as now all strings between "globs" will take a slot in the array. Added test 1234 and 1235 to verify. Updated test 87. This commit fixes three separate bug reports. Bug: http://curl.haxx.se/bug/view.cgi?id=1264 Bug: http://curl.haxx.se/bug/view.cgi?id=1265 Bug: http://curl.haxx.se/bug/view.cgi?id=1266 Reported-by: Will Dietz
* --help: fix the --sasl-ir in the help outputDaniel Stenberg2013-08-141-1/+1
|
* curl: make --no-[option] work properly for several optionsDaniel Stenberg2013-08-141-5/+5
| | | | --create-dirs, --crlf, --socks5-gssapi-nec and --sasl-ir
* curl: second follow-up for commit 5af2bfb9Yang Tse2013-08-011-1/+2
| | | | Display progress-bar unconditionally on first call
* curl: follow-up for commit 5af2bfb9Yang Tse2013-07-312-4/+4
| | | | Use tvnow() and tvdiff() to avoid introducing new linkage issues
* curl: --progress-bar max update frequency now at 5HzDaniel Stenberg2013-07-313-4/+5
|
* curl: make --progress-bar update the line less frequentlyDaniel Stenberg2013-07-312-11/+14
| | | | | | | | | | | | Also, use memset() instead of a lame loop. The previous logic that tried to avoid too many updates were very ineffective for really fast transfers, as then it could easily end up doing hundreds of updates per second that would make a significant impact in transfer performance! Bug: http://curl.haxx.se/mail/archive-2013-07/0031.html Reported-by: Marc Doughty
* md5 & metalink: use better build macros on Apple operating systemsNick Zitzmann2013-07-301-2/+5
| | | | | | | | | | Previously we used __MAC_10_X and __IPHONE_X to mark digest-generating code that was specific to OS X and iOS. Now we use __MAC_OS_X_VERSION_MAX_ALLOWED and __IPHONE_OS_VERSION_MAX_ALLOWED instead of those macros. Bug: http://sourceforge.net/p/curl/bugs/1255/ Reported by: Edward Rudd
* tool_operhlp.c: fix add_file_name_to_url() OOM handlingYang Tse2013-07-291-0/+2
|
* tool_operate.c: fix brace placement for vi/emacs delimiter matchingYang Tse2013-07-291-14/+13
|
* tool_operate.c: move <fabdef.h> header inclusion locationYang Tse2013-07-291-1/+4
|
* curl: fix upload of a zip file in OpenVMSJohn E. Malmberg2013-07-221-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | Two fixes: 1. Force output file format to be stream-lf so that partial downloads can be continued. This should have minor impact as if the file does not exist, it was created with stream-lf format. The only time this was an issue is if there was already an existing file with a different format. 2. Fix file uploads are now fixed. a. VMS binary files such as ZIP archives are now uploaded correctly. b. VMS text files are read once to get the correct size and then converted to line-feed terminated records as they are read into curl. The default VMS text formats do not contain either line-feed or carriage-return terminated records. Those delimiters are added by the operating system file read calls if the application requests them. Bug: http://curl.haxx.se/bug/view.cgi?id=496