Commit Graph

1844 Commits

Author SHA1 Message Date
Maksim Stsepanenka 2eb4f5efe9 tool_setopt: fix c_escape truncated octal
Closes https://github.com/bagder/curl/pull/469
2015-10-02 02:45:28 -04:00
Daniel Hwang 1467dec147 tool: remove redundant libcurl check
The easysrc generation is run only when --libcurl is initialized.

Ref: https://github.com/bagder/curl/issues/429

Closes #448
2015-09-22 17:06:28 +02:00
Jay Satiro 3f8d4e264d tool_operate: Don't call easysrc cleanup unless --libcurl
- Review of 4d95491.

The author changed it so easysrc only initializes when --libcurl but did
not do the same for the call to easysrc cleanup.

Ref: https://github.com/bagder/curl/issues/429
2015-09-21 02:21:38 -04:00
Daniel Lee Hwang 4d95491636 tool: generate easysrc only on --libcurl
Code should only be generated when --libcurl is used.

Bug: https://github.com/bagder/curl/issues/429
Reported-by: @greafhe, Jay Satiro

Closes #429
Closes #442
2015-09-20 12:54:18 +02:00
Daniel Stenberg fad9604613 curl: customrequest_helper: deal with NULL custom method 2015-09-11 18:49:28 +02:00
Daniel Stenberg 481e0de00a curl: point out unnecessary uses of -X in verbose mode
It uses 'Note:' as a prefix as opposed to the common 'Warning:' to take
down the tone a bit.

It adds a warning for using -XHEAD on other methods becasue that may
lead to a hanging connection.
2015-09-11 08:53:53 +02:00
Daniel Stenberg 82db076d9f gitignore: ignore more generated VC Makefiles 2015-09-03 23:35:41 +02:00
Steve Holme b604b7f040 tool_sdecls.h: Fixed compilation warning from commit 4a889441d3
tool_sdecls.h:139 warning: comma at end of enumerator list
2015-09-02 06:52:12 +01:00
Steve Holme fb0825cb0a makefiles: Added our standard copyright header
But kept the original author, when they were specified in a comment, as
the initial copyright holder.
2015-08-30 14:51:13 +01:00
Daniel Stenberg 4a889441d3 curl: point out the conflicting HTTP methods if used
It isn't always clear to the user which options that cause the HTTP
methods to conflict so by spelling them out it should hopefully be
easier to understand why curl complains.
2015-08-25 09:20:56 +02:00
Daniel Stenberg ce034356d2 curl: clarify that users can only specify one _METHOD_ 2015-08-25 00:04:03 +02:00
Dan Fandrich 2acaf3c804 tool: fix memory leak with --proto-default option 2015-08-23 20:57:17 +02:00
Nathaniel Waisbrot 9756d1da76 CURLOPT_DEFAULT_PROTOCOL: added
- 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'.
2015-08-22 21:57:14 -04:00
Jay Satiro 9518139c73 gitignore: Sort for readability
find . -name .gitignore -print0 | xargs -i -0 sort -o '{}' '{}'
2015-08-18 01:03:05 -04:00
Viktor Szakats 9ee40ce2ab build: refer to fixed libidn versions
closes #371
2015-08-10 23:20:18 +02:00
Daniel Stenberg 373b77bca2 comment: fix comment about adding new option support 2015-07-26 14:15:07 +02:00
Jay Satiro b46a7744bc tool_operate: Fix CURLOPT_SSL_OPTIONS for builds without HTTPS
- Set CURLOPT_SSL_OPTIONS only if the tool enabled an SSL option.

Broken by me several days ago in 172b2be.
https://github.com/bagder/curl/commit/172b2be#diff-70b44ee478e58d4e1ddcf9c9a73d257b

Bug: http://curl.haxx.se/mail/lib-2015-07/0119.html
Reported-by: Dan Fandrich
2015-07-25 16:32:15 -04:00
Jay Satiro 172b2beba6 SSL: Add an option to disable certificate revocation checks
New tool option --ssl-no-revoke.
New value CURLSSLOPT_NO_REVOKE for CURLOPT_SSL_OPTIONS.

Currently this option applies only to WinSSL where we have automatic
certificate revocation checking by default. According to the
ssl-compared chart there are other backends that have automatic checking
(NSS, wolfSSL and DarwinSSL) so we could possibly accommodate them at
some later point.

Bug: https://github.com/bagder/curl/issues/264
Reported-by: zenden2k <zenden2k@gmail.com>
2015-07-17 02:40:16 -04:00
Travis Burtrum 55b78c5ae9 SSL: Pinned public key hash support 2015-07-01 19:43:47 +02:00
Daniel Stenberg 1f70cdef98 tool_header_cb: fflush the header stream
Flush the header stream when -D is used so that they are sent off
earlier.

Bug: https://github.com/bagder/curl/issues/324
Reported-by: Cédric Connes
2015-06-25 11:53:56 -07:00
Lior Kaplan f44b803f16 tool_help: fix --tlsv1 help text to use >= for TLSv1 2015-06-21 13:33:11 -04:00
Daniel Stenberg afbee791d5 tool: always provide negotiate/kerberos options
libcurl can still be built with it, even if the tool is not. Maintain
independence!
2015-06-18 16:57:38 +02:00
Linus Nielsen 1a8926d12f help: Add --proxy-service-name and --service-name to the --help output 2015-06-08 10:00:11 +02:00
Daniel Stenberg 33ee411848 checksrc: detect fopen() for text without the FOPEN_* macros
Follow-up to e8423f9ce1 with discussionis in
https://github.com/bagder/curl/pull/258

This check scans for fopen() with a mode string without 'b' present, as
it may indicate that an FOPEN_* define should rather be used.
2015-06-02 08:28:10 +02:00
Jay Satiro e8423f9ce1 curl_setup: Add macros for FOPEN_READTEXT, FOPEN_WRITETEXT
- Change fopen calls to use FOPEN_READTEXT instead of "r" or "rt"
- Change fopen calls to use FOPEN_WRITETEXT instead of "w" or "wt"

This change is to explicitly specify when we need to read/write text.
Unfortunately 't' is not part of POSIX fopen so we can't specify it
directly. Instead we now have FOPEN_READTEXT, FOPEN_WRITETEXT.

Prior to this change we had an issue on Windows if an application that
uses libcurl overrides the default file mode to binary. The default file
mode in Windows is normally text mode (translation mode) and that's what
libcurl expects.

Bug: https://github.com/bagder/curl/pull/258#issuecomment-107093055
Reported-by: Orgad Shaneh
2015-06-01 03:21:23 -04:00
Daniel Stenberg 42ed88e70a curl: fix potential NULL dereference
Coverity CID 1299428: Dereference after null check (FORWARD_NULL)
2015-05-22 16:19:30 +02:00
Viktor Szakats 3d38a38012 build: bump version in default nghttp2 paths 2015-05-19 07:42:16 +02:00
Alessandro Ghedini 5bf472fd39 tool_help: fix formatting for --next option 2015-05-08 14:44:15 +02:00
Viktor Szakats 6a61285909 build: update depedency versions, urls, example makefiles
- update default versions of dependencies (except for rare/old platforms)
- update urls
- sync examples makefiles with main ones
- remove line ending space
2015-04-30 08:29:00 +02:00
Linus Nielsen 97c272e5d1 Negotiate: custom service names for SPNEGO.
* Add new options, CURLOPT_PROXY_SERVICE_NAME and CURLOPT_SERVICE_NAME.
* Add new curl options, --proxy-service-name and --service-name.
2015-04-28 08:29:56 +02:00
Anthony Avina 6a7261359b tool: New option --data-raw to HTTP POST data, '@' allowed.
Add new option --data-raw which is almost the same as --data but does
not have a special interpretation of the @ character.

Prior to this change there was no (easy) way to pass the @ character as
the first character in POST data without it being interpreted as a
special character.

Bug: https://github.com/bagder/curl/issues/198
Reported-by: Jens Rantil
2015-04-25 14:51:14 -04:00
Kamil Dudka 710a2e99b5 curl -z: do not write empty file on unmet condition
This commit fixes a regression introduced in curl-7_41_0-186-g261a0fe.
It also introduces a regression test 1424 based on tests 78 and 1423.

Reported-by: Viktor Szakats
Bug: https://github.com/bagder/curl/issues/237
2015-04-23 14:42:07 +02:00
Dan Fandrich 79478fdb68 tool: fixed a comment typo 2015-04-23 00:09:49 +02:00
Jay Satiro 0675abbc75 cyassl: Implement public key pinning
Also add public key extraction example to CURLOPT_PINNEDPUBLICKEY doc.
2015-04-22 17:07:19 -04:00
Kamil Dudka b47c17d67c nss: implement public key pinning for NSS backend
Bug: https://bugzilla.redhat.com/1195771
2015-04-22 13:21:31 +02:00
Daniel Stenberg 1fd33e3ec8 dist: include {src,lib}/checksrc.whitelist 2015-04-22 13:16:04 +02:00
Daniel Stenberg 691a07dac6 parsecfg: do not continue past a zero termination
When a config file line ends without newline, the parsing function could
continue reading beyond that point in memory.

Reported-by: Hanno Böck
2015-04-17 11:44:57 +02:00
Kamil Dudka 261a0fedcf src/tool_operate: create output file on successful download
... of an empty file

Bug: https://github.com/bagder/curl/issues/183
2015-04-08 09:43:08 +02:00
Kamil Dudka f251417d85 src/tool_cb_wrt: separate fnc for output file creation 2015-04-08 09:36:56 +02:00
Dan Fandrich ae3c985060 tool_operate: only set SSL options if SSL is enabled 2015-03-28 11:57:16 +01:00
Paul Howarth 559e2cc921 build: link curl to openssl libraries when openssl support is enabled
This fixes a build failure where openssl and libmetalink are used
together and the system linker does not do implicit linking (e.g.
Fedora 13 and later releases). The MD5 functions required for
metalink support must be pulled in from the openssl crypto library.

This is similar to commit c6e7cbb94e,
which fixes the same sort of problem for NSS builds.
2015-03-26 13:23:37 +01:00
Emil Lerner 83835f7185 globbing: fix url number calculation when using range with step
In function glob_range, the number of urls was multiplied by (max - min
+ 1), regardless of step. The correct formula is (max - min) / step + 1
2015-03-25 12:48:15 +01:00
Emil Lerner 7b223a3a21 globbing: fix step parsing for character globbing ranges
The glob_range function used wrong offset (3 instead of 4) for parsing
integer step inside character range specification, which led to 'bad
range' error when using character ranges with explicitly specified step
(such as '[a-z:2]')
2015-03-25 11:29:46 +01:00
Daniel Stenberg 5d23279299 CURLOPT_PATH_AS_IS: added
--path-as-is is the command line option

Added docs in curl.1 and CURLOPT_PATH_AS_IS.3

Added test in test 1241
2015-03-24 10:31:58 +01:00
Alessandro Ghedini 1f651d1d4d curl: add --false-start option 2015-03-20 20:14:35 +01:00
Daniel Stenberg 1977ff811d metalink: fix resource leak in OOM
Coverity CID 1288826
2015-03-19 09:08:08 +01:00
Jay Satiro 28de58504e mkhelp: Remove trailing carriage return from every line of input
- Get rid of this flood of warnings in Windows mingw build:
warning: missing terminating " character

The warning is due to the carriage return. When msysgit checks out files
from the repo by default it converts the line endings to CRLF. Prior to
this change when mkhelp.pl processed the MANUAL and curl.1 in CRLF
format the trailing carriage returns caused unnecessary CR in the
output.
2015-03-18 13:48:36 +01:00
Daniel Stenberg 2dc1a5ce93 checksrc: detect and remove space before trailing semicolons 2015-03-17 14:06:48 +01:00
Daniel Stenberg 0037eb5805 checksrc: introduce a whitelisting concept 2015-03-17 13:57:37 +01:00
Daniel Stenberg 9395999543 checksrc: use space after comma 2015-03-17 13:57:37 +01:00