summaryrefslogtreecommitdiff
path: root/src/tool_paramhlp.h
Commit message (Collapse)AuthorAgeFilesLines
* copyright: update all copyright lines and remove year rangesDaniel Stenberg2023-01-031-1/+1
| | | | | | | | | | | | - they are mostly pointless in all major jurisdictions - many big corporations and projects already don't use them - saves us from pointless churn - git keeps history for us - the year range is kept in COPYING checksrc is updated to allow non-year using copyright statements Closes #10205
* curl: timeout in the read callbackDaniel Stenberg2022-10-281-1/+1
| | | | | | | | | | | | | | The read callback can timeout if there's nothing to read within the given maximum period. Example use case is when doing "curl -m 3 telnet://example.com" or anything else that expects input on stdin or similar that otherwise would "hang" until something happens and then not respect the timeout. This fixes KNOWN_BUG 8.1, first filed in July 2009. Bug: https://sourceforge.net/p/curl/bugs/846/ Closes #9815
* tool_paramhlp: make the max argument a 'double'Rickard Hallerbäck2022-10-161-1/+1
| | | | | | | To fix compiler warnings "Implicit conversion from 'long' to 'double' may lose precision" Closes #9700
* tool: remove protocol count limitationPatrick Monnerat2022-09-221-1/+1
| | | | | | | | | | | | | | | | Replace bit mask protocol sets by null-terminated arrays of protocol tokens. These are the addresses of the protocol names returned by curl_version_info(). Protocol names are sorted case-insensitively before output to satisfy CI tests matches consistency. The protocol list returned by curl_version_info() is augmented with all RTMP protocol variants. Test 1401 adjusted for new alpha ordered output. Closes #9546
* cli tool: do not use disabled protocolsPatrick Monnerat2022-09-161-1/+2
| | | | | | | | | | | | | | | | | | | | As they are now rejected by the library, take care of not passing disabled protocol names to CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR. Rather than using the CURLPROTO_* constants, dynamically assign protocol numbers based on the order they are listed by curl_version_info(). New type proto_set_t implements prototype bit masks: it should therefore be large enough to accomodate all library-enabled protocols. If not, protocol numbers beyond the bit count of proto_set_t are recognized but "inaccessible": when used, a warning is displayed and the value is ignored. Should proto_set_t overflows, enabled protocols are reordered to force those having a public CURLPROTO_* representation to be accessible. Code has been added to subordinate RTMP?* protocols to the presence of RTMP in the enabled protocol list, being returned by curl_version_info() or not.
* tool_paramhlp: make check_protocol return ParameterErrorDaniel Stenberg2022-07-231-1/+1
| | | | | | "enumerated type mixed with another type" Closes #9179
* tool_getparam: repair cleanargDaniel Stenberg2022-07-101-2/+0
| | | | | | | | | | | | Regression since 9e5669f. Make sure the "cleaning" of command line arguments is done on the original argv[] pointers. As a bonus, it also exits better on out of memory error. Reported-by: Litter White Fixes #9128 Closes #9130
* setopt: add CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STRDaniel Stenberg2022-07-041-1/+3
| | | | | | | | | | | | | | ... as replacements for deprecated CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS as these new ones do not risk running into the 32 bit limit the old ones are facing. CURLINFO_PROTCOOL is now deprecated. The curl tool is updated to use the new options. Added test 1597 to verify the libcurl protocol parser. Closes #8992
* copyright: make repository REUSE compliantmax.mehl2022-06-131-1/+3
| | | | | | | | | | | Add licensing and copyright information for all files in this repository. This either happens in the file itself as a comment header or in the file `.reuse/dep5`. This commit also adds a Github workflow to check pull requests and adapts copyright.pl to the changes. Closes #8869
* curl: add --create-file-mode [mode]Daniel Stenberg2020-12-211-0/+1
| | | | | | | | This option sets the (octal) mode to use for the remote file when one is created, using the SFTP, SCP or FILE protocols. When not set, the default is 0644. Closes #6244
* copyright: fix year rangesDaniel Stenberg2020-11-051-1/+1
| | | | Follow-up from 4d2f8006777
* curl.se: new homeDaniel Stenberg2020-11-041-1/+1
| | | | Closes #6172
* tool: make a few char pointers point to const char insteadMarcel Raad2019-12-311-1/+1
| | | | | | These are read-only. Closes https://github.com/curl/curl/pull/4771
* curl: cap the maximum allowed values for retry time argumentsDaniel Stenberg2019-07-301-1/+2
| | | | | | | | | | ... to avoid integer overflows later when multiplying with 1000 to convert seconds to milliseconds. Added test 1269 to verify. Reported-by: Jason Lee Closes #4166
* curl: detect and bail out early on parameter integer overflowsDaniel Stenberg2017-08-071-3/+2
| | | | | | | | | Make the number parser aware of the maximum limit curl accepts for a value and return an error immediately if larger, instead of running an integer overflow later. Fixes #1730 Closes #1736
* vtls: add options to specify range of enabled TLS versionsJozef Kralik2017-03-081-0/+2
| | | | | | | 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
* URLs: change all http:// URLs to https://Daniel Stenberg2016-02-031-1/+1
|
* CURLOPT_DEFAULT_PROTOCOL: addedNathaniel Waisbrot2015-08-221-1/+2
| | | | | | | | | | | | | | | - Add new option CURLOPT_DEFAULT_PROTOCOL to allow specifying a default protocol for schemeless URLs. - Add new tool option --proto-default to expose CURLOPT_DEFAULT_PROTOCOL. In the case of schemeless URLs libcurl will behave in this way: When the option is used libcurl will use the supplied default. When the option is not used, libcurl will follow its usual plan of guessing from the hostname and falling back to 'http'.
* tool_cfgable: Renamed Configurable structure to OperationConfigSteve Holme2014-02-231-6/+6
| | | | | To allow for the addition of a global config structure and prevent confusion between the two.
* tool_paramhlp: Added URL index to password prompt for multiple operationsSteve Holme2014-02-161-1/+1
|
* tool_operate: Moved required argument getting into separate functionSteve Holme2014-02-151-1/+1
|
* tool: Fixed incorrect return code if password prompting runs out of memorySteve Holme2014-01-191-2/+2
| | | | | | | | | 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.
* src/tool: allow timeouts to accept decimal valuesDave Reisner2013-07-141-0/+2
| | | | | | | | | | | Implement wrappers around strtod to convert the user argument to a double with sane error checking. Use this to allow --max-time and --connect-timeout to accept decimal values instead of strictly integers. The manpage is updated to make mention of this feature and, additionally, forewarn that the actual timeout of the operation can vary in its precision (particularly as the value increases in its decimal precision).
* avoid mixing of enumerated type with another typeYang Tse2012-11-261-3/+3
|
* cmdline: parse numerical options stricterDaniel Stenberg2012-07-101-0/+1
| | | | | | | | | | | 1 - str2offset() no longer accepts negative numbers since offsets are by nature positive. 2 - introduced str2unum() for the command line parser that accepts numericals which are not supposed to be negative, so that it will properly complain on apparent bad uses and mistakes. Bug: http://curl.haxx.se/mail/archive-2012-07/0013.html
* 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: OOM handling fixesYang Tse2011-10-051-3/+1
|
* curl tool: code moved to tool_*.[ch] filesYang Tse2011-10-051-0/+53