1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
Commit Graph

1703 Commits

Author SHA1 Message Date
Marc Hoersken
667d133dab tool_urlglob.c: added some comments to clarify for loop conditions
I was tempted to change those to >= 0 until I saw that this is
actually a for loop that terminates once i underflows.
2014-04-18 23:28:26 +02:00
Steve Holme
4991c13784 Makefile.vc6: Follow up fix to commit 45d3f00803 2014-04-06 00:53:47 +01:00
Marc Hoersken
45d3f00803 Makefile.vc6: added warnless.c to fix build 2014-04-05 21:45:39 +02:00
Maciej Puzio
4946ea05e2 curl: add --proxy-header 2014-04-04 17:03:43 +02:00
Paul Marks
0bc4938eec curl: stop interpreting IPv6 literals as glob patterns.
This makes it possible to fetch from an IPv6 literal without specifying
the -g option.  Globbing remains available elsehwere in the URL.

For example:
  curl http://[::1]/file[1-3].txt

This creates no ambiguity, because there is no overlap between the
syntax of valid globs and valid IPv6 literals.  Globs contain hyphens
and at most 1 colon, while IPv6 literals have no hyphens, and at least 2
colons.

The peek_ipv6() parser simply whitelists a set of characters and counts
colons, because the real validation happens later on.  The character set
includes A-Z, in case someone decides to implement support for scopes
like [fe80::1%25eth0] in the future.

Signed-off-by: Paul Marks <pmarks@google.com>
2014-03-30 23:45:29 +02:00
Daniel Stenberg
38d582ff54 mkhelp: generate code for --disable-manual as well
This allows configure --disable-manual to run and build without having
to regenerate the src/tool_hugehelp.c file which otherwise is necessary
since we ship tarballs with that file present.

Reported-by: Remi Gacogne
Bug: http://curl.haxx.se/bug/view.cgi?id=1350
2014-03-26 13:22:10 +01:00
Steve Holme
3ebfaf6a03 tool_operate: Fixed uninitialised variable under some error situations
For example when a URL is not specified or the headers file fails to
open.
2014-03-23 11:04:15 +00:00
Steve Holme
ed02f0abca tool_parsecfg: Reworked error handling from commit fc59a9e1 2014-03-22 16:50:47 +00:00
Steve Holme
5e097583f7 tool_getparam: Removed "dead assignment" code introduced in commit 1a9b58fc 2014-03-22 16:31:13 +00:00
Jiri Malak
420d9ff3eb Rework Open Watcom make files to use standard Wmake features
Remove slash/backslash problem, now only slashes are used,
Wmake automaticaly translate slash/backslash to proper version or tools are not sensitive for it.
Enable spaces in path.
Use internal rm command for all host platforms
Add error message if old Open Watcom version is used. Some old versions exhibit build problems for Curl latest version. Now only versions 1.8, 1.9 and 2.O beta are supported
2014-03-03 08:19:05 +01:00
Steve Holme
7fef4016de tool: Do not output libcurl source for the information only parameters
Ensure a source file isn't generated for the following informational
command line parameters when --libcurl is specified:

--help, --manual, --version and --engine list

As the output would only include a fairly empty looking main() function
and a call to curl_easy_init() and curl_easy_cleanup() when performed
with --engine list.
2014-03-02 10:42:53 +00:00
Steve Holme
68920b6c11 tool: Fixed libcurl source output for multiple operations
Correctly output libcurl source code that includes multiply operations
as specified by --next. Note that each operation evaluates to a single
curl_easy_perform() in source code form.

Also note that the output could be optimised a little so global config
options are only output once rather than per operation as is presently
the case.
2014-03-02 09:44:18 +00:00
Steve Holme
46b1d0a047 tool_metalink.h: Fixed compilation warning
warning: declaration of 'struct GlobalConfig' will not be visible
outside of this function
2014-03-01 20:16:33 +00:00
Steve Holme
eba197161a tool: Moved internal variable isatty to the global config 2014-03-01 18:30:16 +00:00
Steve Holme
36802d6e0c tool_operate.c: Fixed compilation error
incompatible types - from 'OperationConfig *' to 'GlobalConfig *'
2014-03-01 18:14:16 +00:00
Steve Holme
f1a9e6858e tool: Moved --libcurl to the global config 2014-03-01 17:23:14 +00:00
Steve Holme
75e996f29f tool: Moved --progress-bar to the global config 2014-03-01 13:20:35 +00:00
Steve Holme
5513bbd5c3 tool: Moved --stderr to the global config 2014-03-01 13:03:20 +00:00
Dan Fandrich
bd248a0b80 tool_main: Fixed a memory leak on main_init error 2014-02-28 21:58:12 +01:00
Steve Holme
78f26394dc tool_cfgable: Code policing of structure pointers 2014-02-27 21:11:37 +00:00
Steve Holme
4efa1d29e2 tool: Moved --trace and --verbose to the global config 2014-02-27 21:01:08 +00:00
Steve Holme
fd97c17bb7 tool_main: Forgot to initialise the first operation's global pointer 2014-02-27 20:49:28 +00:00
Steve Holme
5577540ad5 tool: Moved --silient to the global config
Other global options such as --libcurl, --trace and --verbose to
follow.
2014-02-27 20:31:27 +00:00
Steve Holme
17df2d8f8e tool_cfgable: Added GlobalConfig pointer to OperationConfig
In order to ease the moving of global options such as the error stream,
updated the OperationConfig structure to point to the GlobalConfig.
2014-02-27 20:20:17 +00:00
Steve Holme
fc59a9e18f tool: Added support to .curlrc for URL specific options
In addition to adding support for URL specific options via the command
line with --next it is now possible to specify "next" in .curlrc.
2014-02-26 22:05:37 +00:00
Steve Holme
07d7603b45 tool: Reworked argument parsing to use --next/-:
Follow up to commit 1a9b58fcb2 to replace the : command line option
with --next and -:.
2014-02-26 20:53:23 +00:00
Steve Holme
1a9b58fcb2 tool_getparam: Added initial support for --next/-:
Added initial support for --next/-: which will be used to replace the
rather confusing : command line operation what was used for the URL
specific options prototype.
2014-02-26 20:42:30 +00:00
Daniel Stenberg
d48eb1dd69 parse_args: fix a too long source code line 2014-02-25 23:36:13 +01:00
Steve Holme
70052836d1 tool_help: Moved --no-alpn and --no-npn to be listed alphabetically
...and added the HTTP suffix as these options are only used for HTTP2
based connections.
2014-02-25 21:38:36 +00:00
Steve Holme
249dc83571 tool: Moved --showerror to the global config
Other global options such as --libcurl, --trace and --verbose to
follow.
2014-02-25 20:52:36 +00:00
Steve Holme
0704dd770d tool_getparam: Added global config to getparameter()
In preparation for parsing global options added the GlobalConfig
structure to the getparameter() function.
2014-02-25 19:38:17 +00:00
Steve Holme
ad388a7d37 tool_getparam.h: Fixed compilation warning
warning: declaration of 'struct GlobalConfig' will not be visible
outside of this function
2014-02-25 07:16:51 +00:00
Steve Holme
f35668985e tool_cfgable: Added support for knowing the current operation 2014-02-24 21:25:36 +00:00
Steve Holme
c27cc68815 tool_operate: Moved easy handle cleanup into tool_main 2014-02-24 20:35:48 +00:00
Marc Hoersken
0af2322bc6 tool_hugehelp: partially reverted 24e22e10
Compilation was not possible if manuel is disabled due this error:
 error: macro "hugehelp" passed 1 arguments, but takes just 0
  void hugehelp(void) {}
2014-02-24 21:30:36 +01:00
Steve Holme
59b5ef444e tool_main: Moved easy handle into global config structure 2014-02-24 20:01:37 +00:00
Steve Holme
0d9ddf91ca tool: Fixed line longer than 79 characters from commit 705a4cb549 2014-02-23 16:13:09 +00:00
Steve Holme
cc31a4a645 tool_main: Corrected typo from commit d6b9f054e9 in Symbian code 2014-02-23 14:10:05 +00:00
Steve Holme
665096e24c tool_main: Moved OperateConfig cleanup into main_free() 2014-02-23 13:44:59 +00:00
Steve Holme
d6b9f054e9 tool_main: Moved initial OperateConfig creation into main_init() 2014-02-23 13:35:51 +00:00
Steve Holme
2249f7fe70 tool_cfgable: Added global config structure 2014-02-23 13:12:47 +00:00
Steve Holme
705a4cb549 tool_cfgable: Renamed Configurable structure to OperationConfig
To allow for the addition of a global config structure and prevent
confusion between the two.
2014-02-23 13:09:20 +00:00
Steve Holme
6512e93be1 tool: Fixed incorrect return code with --version from commit c10bf9bb36 2014-02-23 12:13:39 +00:00
Steve Holme
8c80840d01 tool_getparam: Moved tool_help() call into operate() 2014-02-23 11:16:05 +00:00
Steve Holme
24e22e1078 tool_getparam: Moved hugehelp() call into operate() 2014-02-23 11:12:03 +00:00
Steve Holme
c10bf9bb36 tool_getparam: Moved tool_version_info() call into operate() 2014-02-23 11:10:01 +00:00
Steve Holme
e6e8b14405 tool_cfgable: Removed list_engine flag from config structure
In preparation for separating the global config options from the per
operation config options, reworked the list engines code to not use a
member variable in the Configurable structure.
2014-02-22 21:00:03 +00:00
Steve Holme
b914e7ed02 tool_operate: Start to use CURLcode rather than int for return codes
To help assist with the detection of incorrect return codes, as per
commits ee23d13a79, 33b8960dc8 and aba98991a5, updated the operate
based functions to return CURLcode error codes.
2014-02-22 18:57:02 +00:00
Steve Holme
ee23d13a79 tool: Fixed incorrect return code when setting HTTP request fails
During initialisation SetHTTPrequest() may fail and cURL would return
PARAM_BAD_USE, which is equivalent to CURLE_NOT_BUILT_IN in cURL error
terms.

Instead, return CURLE_FAILED_INIT as we do for other functions that may
fail during initialisation.
2014-02-22 18:14:33 +00:00
Steve Holme
dcbae71812 tool_getparam: Moved version information into separate function in tool_help 2014-02-22 17:47:13 +00:00