Compare commits

...

1084 Commits

Author SHA1 Message Date
Patrick Monnerat
ed24d41cb1 gskit: protect inetsocketpair() against foreign connection.
Avoid blocking read.
Drain SSL over SSL output upon close.
2015-12-23 15:43:25 +01:00
Patrick Monnerat
cc9b053d84 gskit: Implement SSL over SSL
This is done via a TCP socket pair monitored at each negotiate/send/receive
attempt for explicit pipelining.
See gskit.c comments for more information.
2015-12-22 15:58:28 +01:00
Kamil Dudka
3e7a1ff9a6 nss: fix crash when closing HTTPS conn over HTTPS proxy
Truncated valgrind output capturing the crash follows:

Invalid read of size 8
   at 0x628B4A0: PR_Close (priometh.c:104)
   by 0x43C088: nss_close (nss.c:1356)
   by 0x43C17F: Curl_nss_close (nss.c:1377)
   by 0x438F42: Curl_ssl_close (vtls.c:618)
   by 0x45460B: Curl_disconnect (url.c:3000)
   by 0x42EACA: close_all_connections (multi.c:1887)
   by 0x42EB37: curl_multi_cleanup (multi.c:1907)
   by 0x44B4CA: Curl_close (url.c:427)
   by 0x4282C2: curl_easy_cleanup (easy.c:859)
   by 0x41341C: main_free (tool_main.c:206)
   by 0x4134F4: main (tool_main.c:260)
 Address 0x99afa10 is 0 bytes inside a block of size 48 free'd
   at 0x4C29D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x62A2C33: pt_Close (ptio.c:1277)
   by 0x43BACD: nspr_io_close (nss.c:1141)
   by 0x54D6E25: ssl_DefClose (ssldef.c:203)
   by 0x43BACD: nspr_io_close (nss.c:1141)
   by 0x54D6E25: ssl_DefClose (ssldef.c:203)
   by 0x43C088: nss_close (nss.c:1356)
   by 0x43C173: Curl_nss_close (nss.c:1376)
   by 0x438F42: Curl_ssl_close (vtls.c:618)
   by 0x45460B: Curl_disconnect (url.c:3000)
   by 0x42EACA: close_all_connections (multi.c:1887)
   by 0x42EB37: curl_multi_cleanup (multi.c:1907)
 Block was alloc'd at
   at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x6289F71: _PR_Getfd (prfdcach.c:103)
   by 0x62A4816: pt_SetMethods.isra.13 (ptio.c:3303)
   by 0x62A56E5: PR_ImportTCPSocket (ptio.c:4577)
   by 0x43D4D0: nss_setup_connect (nss.c:1733)
   by 0x43DDCA: nss_connect_common (nss.c:1929)
   by 0x43DF1E: Curl_nss_connect_nonblocking (nss.c:1985)
   by 0x4386CE: Curl_ssl_connect_nonblocking (vtls.c:364)
   by 0x47F02C: https_proxy_connect (http_proxy.c:58)
   by 0x47F086: Curl_proxy_connect (http_proxy.c:74)
   by 0x445891: Curl_http_connect (http.c:1348)
   by 0x42D613: multi_runsingle (multi.c:1233)
2015-12-16 00:32:13 +01:00
Patrick Monnerat
e21bd4ecb5 os400: add new https proxy options 2015-12-15 14:56:54 +01:00
Patrick Monnerat
4bb13975a8 gskit: adapt to new ssl proxy parameters 2015-12-15 14:30:25 +01:00
Daniel Stenberg
4e28002898 Merge branch 'master' into HTTPS-proxy 2015-11-19 23:29:04 +01:00
Patrick Monnerat
ff8d352ae9 curl.h: s/#defien/#define/ 2015-11-19 13:53:47 +01:00
Patrick Monnerat
250d786bd2 os400: synchronize ILE/RPG header file 2015-11-19 13:52:06 +01:00
Patrick Monnerat
0cf80c05ea os400: Provide options for libssh2 use in compile scripts. Adjust README. 2015-11-19 13:37:51 +01:00
danielsh@apache.org
b27893d15c zsh completion: Preserve single quotes in output
When an option's help string contains literal single quotes, those
single quotes would be stripped from the option's description in the
completion output (unless the zsh RC_QUOTES option were set while the
completion function was being sourced, which is not the default).  This
patch makes the completion output contain single quotes where the --help
output does.

Closes #532
2015-11-19 12:10:31 +01:00
MaxGiting
05cd55f229 FAQ: Grammar changes
Closes https://github.com/bagder/curl/pull/533
2015-11-18 23:00:50 -05:00
Daniel Stenberg
ec6d8a38ae curl_gssapi: remove 'const' to fix compiler warnings
initialization discards 'const' qualifier from pointer target type
2015-11-17 23:06:05 +01:00
Alex Rousskov
127a7b0257 gnutls: finished support for HTTPS proxies. 2015-11-17 23:02:06 +01:00
Alex Rousskov
043c5f5c33 axtls: Fixed build
axTLS does not support HTTPS proxies yet
(ssl_connect_init_proxy returns CURLE_NOT_BUILT_IN).
2015-11-17 23:02:01 +01:00
Alex Rousskov
171de1bef8 cyassl: Fixed build
CyaSSL does not support HTTPS proxies yet
(ssl_connect_init_proxy returns CURLE_NOT_BUILT_IN).
2015-11-17 23:01:52 +01:00
Alex Rousskov
f956ebf252 PolarSSL: Fixed build with backend
PolarSSL does not support HTTPS proxies yet
(ssl_connect_init_proxy returns CURLE_NOT_BUILT_IN).
2015-11-17 23:01:34 +01:00
Alex Rousskov
68a7d38aa0 NSS: Full backend support for HTTPS proxies
Also adjusts SSL_IS_PROXY() to work correctly without requiring
sockindex.
2015-11-17 23:01:23 +01:00
Daniel Stenberg
b4c39010b5 http2: http_done: don't free already-freed push headers
The push headers are freed after the push callback has been invoked,
meaning this code should only free the headers if the callback was never
invoked and thus the headers weren't freed at that time.

Reported-by: Davey Shafik
2015-11-17 09:47:58 +01:00
Anders Bakken
a72207ecf0 getconnectinfo: Don't call recv(2) if socket == -1
Closes #528
2015-11-16 22:42:13 +01:00
Daniel Stenberg
6c5f4303fe CURLMOPT_PUSHFUNCTION.3: *_byname() returns only the first header
... if there are more than one using the same name
2015-11-16 08:26:48 +01:00
Daniel Stenberg
39904d6f7d http2: minor comment typo 2015-11-16 08:22:08 +01:00
Daniel Stenberg
88f585c3a1 sasl; fix checksrc warnings 2015-11-15 23:15:00 +01:00
Steve Holme
051485d9e0 RELEASE-NOTES: Adjusted for the recent OAuth 2.0 activity 2015-11-15 20:18:44 +00:00
Steve Holme
3c4065f402 tests: Disabled 889 and 890 until we support POP3 continuation responses
As POP3 final and continuation responses both begin with a + character,
and both the finalcode and contcode variables in SASLprotoc are set as
such, we cannot tell the difference between them when we are expecting
an optional continuation from the server such as the following:

+ something else from the server
+OK final response

Disabled these tests until such a time we can tell the responses apart.
2015-11-15 20:14:46 +00:00
Steve Holme
d0ddfe2216 tests: Corrected typos from commit ba4d8f7eba 2015-11-15 20:11:55 +00:00
Steve Holme
ca770d87e2 tests: Added OAUTHBEARER failure response tests 2015-11-15 20:11:54 +00:00
Steve Holme
ee04bee82b oauth2: Support OAUTHBEARER failures sent as continuation responses
According to RFC7628 a failure message may be sent by the server in a
base64 encoded JSON string as a continuation response.

Currently only implemented for OAUTHBEARER and not XAUTH2.
2015-11-15 20:11:53 +00:00
Daniel Stenberg
6cfd646f58 RELEASE-NOTES: synced with 808a17ee67 2015-11-15 19:12:06 +01:00
Steve Holme
808a17ee67 tests: Renamed existing OAuth 2.0 (XOAUTH) tests 2015-11-14 11:19:57 +00:00
Steve Holme
ba4d8f7eba tests: Added OAuth 2.0 (OAUTHBEARER) tests 2015-11-14 11:16:04 +00:00
Steve Holme
febda2f305 oauth2: Added support for OAUTHBEARER SASL mechanism to IMAP, POP3 and SNMP
OAUTHBEARER is now the official "registered" SASL mechanism name for
OAuth 2.0. However, we don't want to drop support for XOAUTH2 as some
servers won't support the new mechanism yet.
2015-11-14 10:28:05 +00:00
Daniel Stenberg
ceb396c54a RELEASE-NOTES: recounted curl_easy_setopt() options 2015-11-13 23:40:40 +01:00
Daniel Stenberg
796c6ef02b typecheck-gcc.h: add missing slist-using options
CURLOPT_RESOLVE and CURLOPT_PROXYHEADER were missing

Also sorted the list.
2015-11-13 23:19:19 +01:00
Daniel Stenberg
60cf8157c7 typecheck-gcc.h: added CURLOPT_CLOSESOCKETDATA
... and sorted curl_is_cb_data_option alphabetically
2015-11-13 23:12:48 +01:00
Sebastian Pohlschmidt
ad2d517545 openssl: Free modules on cleanup
Curl_ossl_init calls OPENSSL_load_builtin_modules() but
Curl_ossl_cleanup doesn't make a call to free these modules.

Bug: https://github.com/bagder/curl/issues/526
2015-11-13 16:11:41 -05:00
Steve Holme
1ee0aded89 symbols-in-versions: Added new CURLOPTTYPE_STRINGPOINT alias
...following commit aba281e762 to fix test 1119.
2015-11-13 20:42:35 +00:00
Daniel Stenberg
f322ca7765 curl: mark two more options strings for --libcurl output 2015-11-13 16:59:09 +01:00
Daniel Stenberg
fd0c678e21 typecheck-gcc.h: add some missing string types
Also sorted that list alphabetically
2015-11-13 16:53:17 +01:00
Daniel Stenberg
aba281e762 curl.h: introducing the STRINGPOINT alias
As an alias for OBJECTPOINT. Provided to allow us to grep for all string
options easier.
2015-11-13 16:50:10 +01:00
Daniel Stenberg
64e959ffe3 cleanup: general removal of TODO (and similar) comments
They tend to never get updated anyway so they're frequently inaccurate
and we never go back to revisit them anyway. We document issues to work
on properly in KNOWN_BUGS and TODO instead.
2015-11-13 16:15:26 +01:00
Daniel Stenberg
86e2197337 ftplistparser: remove empty function 2015-11-13 16:12:18 +01:00
Daniel Stenberg
6c20a87105 openssl: remove #if check for 0.9.7 for ENGINE_load_private_key 2015-11-13 15:55:52 +01:00
Daniel Stenberg
b430d94fb2 openssl: all supported versions have X509_STORE_set_flags
Simplify by removing #ifdefs and macros
2015-11-13 15:52:39 +01:00
Daniel Stenberg
0755308a6a openssl: remove 0.9.3 check 2015-11-13 15:51:46 +01:00
Daniel Stenberg
53b13d0c71 openssl: remove #ifdefs for < 0.9.5 support
We only support >= 0.9.7
2015-11-13 15:49:49 +01:00
Daniel Stenberg
431ba85829 lib/vtls/openssl: remove unused traces of yassl ifdefs 2015-11-13 15:48:04 +01:00
dfandrich
eb3703f052 unit1603: Demote hash mismatch failure to a warning
The hashes can vary between architectures (e.g. Sparc differs from x86_64).
This is not a fatal problem but just reduces the coverage of these white-box
tests, as the assumptions about into which hash bucket each key falls are no
longer valid.
2015-11-12 23:50:18 +01:00
dfandrich
d7e352402c unit1603: Added unit tests for hash functions 2015-11-12 22:49:32 +01:00
dfandrich
278ea24a7a unit1602: Fixed failure in torture test 2015-11-12 22:47:37 +01:00
Steve Holme
1f82df9146 sasl: Re-introduced XOAUTH2 in the default enabled authentication mechanism
Following the fix in commit d6d58dd558 it is necessary to re-introduce
XOAUTH2 in the default enabled authentication mechanism, which was
removed in commit 7b2012f262, otherwise users will have to specify
AUTH=XOAUTH2 in the URL.

Note: OAuth 2.0 will only be used when the bearer is specified.
2015-11-12 19:45:24 +00:00
Stefan Bühler
077fd8f1fa sasl_sspi: fix identity memory leak in digest authentication 2015-11-12 19:11:40 +00:00
Stefan Bühler
b6baa108fa sasl_sspi: fixed unicode build for digest authentication
Closes #525
2015-11-12 19:11:40 +00:00
Steve Holme
88702ebb31 oauth2: Re-factored OAuth 2.0 state variable 2015-11-12 18:25:33 +00:00
Steve Holme
d6d58dd558 sasl: Don't choose OAuth 2.0 if mechanism not advertised
Regression from commit 9e8ced9890 which meant if --oauth2-bearer was
specified but the SASL mechanism wasn't supported by the server then
the mechanism would be chosen.
2015-11-12 18:25:33 +00:00
Daniel Stenberg
a7c4bcd971 runtests: more compact "System characteristics" output
- no point in repeating curl features that is already listed as features
  from the curl -V output

- remove the port numbers/unix domain path from the output unless
  verbose is used, as that is rarely interesting to users.
2015-11-12 15:32:48 +01:00
Daniel Stenberg
3c24400636 runtests: rename conditional curl-features to $has_[name] 2015-11-12 14:50:13 +01:00
Steve Holme
dcf5b614ca oauth2: Introduced support for host and port details
Added support to the OAuth 2.0 message function for host and port, in
order to accommodate the official OAUTHBEARER SASL mechanism which is
to be added shortly.
2015-11-11 22:26:21 +00:00
Steve Holme
6479f5a076 curl_setup.h: Removed duplicate CURL_DISABLE_RTSP when HTTP_ONLY defined 2015-11-11 22:19:39 +00:00
Steve Holme
d64add3c71 cmake: Add missing feature macros in config header (Part 2)
In addition to commit a215381c94 added the RTSP, RTMP and SMB protocols.
2015-11-11 22:18:24 +00:00
Douglas Creager
a215381c94 cmake: Add missing feature macros in config header
The curl_config.h file can be generated either from curl_config.h.cmake
or curl_config.h.in, depending on whether you're building using CMake or
the autotools.  The CMake template header doesn't include entries for
all of the protocols that you can disable, which (I think) means that
you can't actually disable those protocols when building via CMake.

Closes #523
2015-11-10 22:38:52 +01:00
Douglas Creager
3e0d64d075 BoringSSL: Work with stricter BIO_get_mem_data()
BoringSSL implements `BIO_get_mem_data` as a function, instead of a
macro, and expects the output pointer to be a `char **`.  We have to add
an explicit cast to grab the pointer as a `const char **`.

Closes #524
2015-11-10 22:34:07 +01:00
Daniel Stenberg
01b7d8274c http2: rectify the http2 version #if check
We need 1.0.0 or later. Also verified by configure.
2015-11-10 09:10:46 +01:00
Steve Holme
7023d8aa37 oauth2: Don't use XAUTH2 in OAuth 2.0 function name 2015-11-09 22:25:09 +00:00
Steve Holme
eaa98cef8d oauth2: Don't use XOAUTH2 in OAuth 2.0 variables 2015-11-09 22:25:08 +00:00
Steve Holme
4e3d396900 oauth2: Use OAuth 2.0 rather than XOAUTH2 in comments
When referring to OAuth 2.0 we should use the official name rather the
SASL mechanism name.
2015-11-09 22:25:08 +00:00
Daniel Stenberg
f54a4aa9a3 imap: avoid freeing constant string
The fix in 1a614c6c3 was wrong and would leed to free() of a fixed
string.

Pointed-out-by: Kamil Dudka
2015-11-09 10:54:55 +01:00
Daniel Stenberg
6225c48a03 ROADMAP: remove two items already done 2015-11-09 09:05:43 +01:00
Daniel Stenberg
9b7f8ab21b RELEASE-NOTES: synced with 2200bf6205 2015-11-09 09:00:39 +01:00
Jay Satiro
2200bf6205 acinclude: Remove check for 16-bit curl_off_t
Because it's illogical to check for a 16-bit curl_off_t.

Ref: https://github.com/bagder/curl/issues/425#issuecomment-154964205
2015-11-09 02:56:40 -05:00
Dan Fandrich
729b92afbe tool: Fixed a memory leak on OOM introduced in 19cb0c4a 2015-11-08 16:50:25 +01:00
Justin Ehlert
23b8fc15c8 imap: Don't check for continuation when executing a CUSTOMREQUEST
Bug: https://github.com/bagder/curl/issues/486
Closes https://github.com/bagder/curl/pull/487
2015-11-08 12:12:33 +00:00
Daniel Stenberg
e3c85405d0 imap: checksrc: remove space after while before paren 2015-11-07 23:21:29 +01:00
Daniel Stenberg
2581585961 checksrc.whitelist: "missing space after close paren"
... when it was within a string!
2015-11-07 23:20:50 +01:00
Steve Holme
007f3e0971 opts: Corrected TLS protocols list to include POP3S rather than POP3 2015-11-07 22:11:04 +00:00
Steve Holme
23c4090fd3 imap: Quote other 'atom-specials' and not just the space character
Closes #517
2015-11-07 11:59:32 +00:00
Steve Holme
50bff12ac8 imap: Fixed double quote in LIST command when mailbox contains spaces 2015-11-07 11:20:34 +00:00
Daniel Stenberg
1a614c6c37 imap: fix compiler warning
imap.c:657:13: error: assignment discards 'const' qualifier from pointer
target type [-Werror=discarded-qualifiers]
2015-11-06 23:44:27 +01:00
Steve Holme
505d966850 imap: Don't call imap_atom() when no mailbox specified in LIST command 2015-11-06 21:49:26 +00:00
Daniel Stenberg
748ffc77c6 curl.1: remove the overlap --range example
... it is just weird to include by default even if it still works.
2015-11-06 15:03:00 +01:00
Daniel Stenberg
60c86297bf tftp tests: verify sent options too
The tftpd test server now logs all received options and thus all TFTP
test cases need to match them exactly.

Extended test 283 to use and verify --tftp-blksize.
2015-11-06 10:55:30 +01:00
Jay Satiro
cd3aba1a5c getinfo: CURLINFO_ACTIVESOCKET: fix bad socket value
- Set user info param to the socket returned by Curl_getconnectinfo,
regardless of if the socket is bad. Effectively this means the user info
param now will receive CURL_SOCKET_BAD instead of -1 on bad socket.

- Remove incorrect comments.

CURLINFO_ACTIVESOCKET is documented to write CURL_SOCKET_BAD to user
info param but prior to this change it wrote -1.

Bug: https://github.com/bagder/curl/pull/518
Reported-by: Marcel Raad
2015-11-06 00:30:16 -05:00
Patrick Monnerat
f6fbbd6dc3 curl_ntlm_core: fix 2 curl_off_t constant overflows. 2015-11-05 15:20:43 +01:00
Patrick Monnerat
210fc95c0f os400: adjust specific code to support new options. 2015-11-05 14:41:22 +01:00
Lauri Kasanen
3bd7f28000 rawstr: Speed up Curl_raw_toupper by 40%
Rationale: when starting up a curl-using app, all cookies from the jar
are checked against each other. This was causing a startup delay in the
Fifth browser.

All tests pass.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
2015-11-02 22:57:13 +01:00
Daniel Stenberg
3f7b1bb89f http redirects: %-encode bytes outside of ascii range
Apparently there are sites out there that do redirects to URLs they
provide in plain UTF-8 or similar. Browsers and wget %-encode such
headers when doing a subsequent request. Now libcurl does too.

Added test 1138 to verify.

Closes #473
2015-11-02 12:48:03 +01:00
Daniel Stenberg
1ea3a7d5e4 RELEASE-NOTES: synced with cba5bc5854 2015-11-02 10:16:21 +01:00
Daniel Stenberg
cba5bc5854 symbols-in-version: add all CURL_HTTPPOST_* symbols 2015-11-02 08:41:53 +01:00
Daniel Stenberg
ca5f9341ef formadd: support >2GB files on windows
Closes #425
2015-11-02 08:41:46 +01:00
Daniel Stenberg
49a991346e curl.h: s/HTTPPOST_/CURL_HTTPOST_
Fixes a name space pollution at the cost of programs using one of these
defines will no longer compile. However, the vast majority of libcurl
programs that do multipart formposts use curl_formadd() to build this
list.

Closes #506
2015-10-31 22:51:20 +01:00
Daniel Stenberg
fbf09b7775 mbedtls: fix "Structurally dead code"
CID 1332129
2015-10-29 22:59:27 +01:00
Daniel Stenberg
f6ce8c9abb mbedtls: fix "Logically dead code"
CID 1332128
2015-10-29 22:57:09 +01:00
Daniel Stenberg
4c62066cec Revert "openssl: engine: remove double-free"
This reverts commit 370ee919b3.

Issue #509 has all the details but it was confirmed that the crash was
not due to this, so the previous commit was wrong.
2015-10-29 14:59:11 +01:00
Daniel Stenberg
9b87078d55 curl.1: -E: s/private certificate/client certificate
... as the certificate is strictly speaking not private.

Reported-by: John Levon
2015-10-28 13:17:54 +01:00
Daniel Stenberg
370ee919b3 openssl: engine: remove double-free
After a successful call to SSL_CTX_use_PrivateKey(), we must not call
EVP_PKEY_free() on the key.

Reported-by: nased0
Closes #509
2015-10-27 13:45:25 +01:00
Jay Satiro
e2f430c74a socks: Fix incorrect port numbers in failed connect messages 2015-10-27 02:39:00 -04:00
Daniel Stenberg
ea2c959db4 DISTRO-DILEMMA: removed
Out of date and not kept accurate. It was sort of a problem of the past
anyway.
2015-10-26 16:31:03 +01:00
xiangbin li
ca20ca54b2 MacOSX-Framework: sdk regex fix for sdk 10.10 and later
closes #507
2015-10-25 12:35:49 +01:00
Jay Satiro
d9a1776b32 build: Fix support for PKG_CONFIG
- Allow the user to use PKG_CONFIG but not PKGCONFIG.

Background:

Last week in 14d5a86 a change was made to allow the user to set the
PKGCONFIG variable. Today in 72d99f2 I supplemented that to allow the
more common PKG_CONFIG as an alternative if PKGCONFIG is not set.

Neither of those changes worked as expected because PKGCONFIG is
occasionally reset in configure and by the CURL_CHECK_PKGCONFIG macro.
Instead in this commit I take the approach that the user may set
PKG_CONFIG only.
2015-10-24 03:31:57 -04:00
Jay Satiro
72d99f2e7b build: Fix mingw ssl gdi32 order
- If mingw ssl make sure -lgdi32 comes after ssl libs

- Allow PKG_CONFIG to set pkg-config location and options

Bug: https://github.com/bagder/curl/pull/501
Reported-by: Kang Lin
2015-10-23 17:17:54 -04:00
Daniel Stenberg
2f4f4108d6 RELEASE-NOTES: synced with 03b6e07816 2015-10-23 16:40:44 +02:00
Daniel Stenberg
03b6e07816 polarssl/mbedtls: fix name space pollution
Global private symbols MUST start with Curl_!
2015-10-23 16:14:29 +02:00
Dmitry S. Baikov
6288cb9304 mbedTLS: THREADING_SUPPORT compilation fix
Closes #505
2015-10-23 16:05:25 +02:00
Daniel Stenberg
eefd5a95af test1137: verify --ignore-content-length for FTP 2015-10-23 15:24:56 +02:00
Daniel Stenberg
b1fc8c0e97 curl.1: --ignore-content-length now works for FTP too 2015-10-23 15:24:31 +02:00
Kurt Fankhauser
529f9310b1 ftp: allow CURLOPT_IGNORE_CONTENT_LENGTH to ignore size
This allows FTP transfers with growing (or shrinking) files without
causing a transfer error.

Closes #480
2015-10-23 14:57:30 +02:00
Daniel Stenberg
b1199def8c CURLOPT_STREAM_WEIGHT.3: call argument 'weight' too
... and add a little example of what the weight actually means. "Relative
proportion of bandwidth".
2015-10-23 09:23:46 +02:00
Daniel Stenberg
b7d894d808 http2: add stream options to dist and curl_easy_setopt.3 2015-10-23 09:16:00 +02:00
Daniel Stenberg
d31ed6ac71 http2: s/priority/weight 2015-10-23 08:22:38 +02:00
Daniel Stenberg
419d410ca0 http2: on_frame_recv: trust the conn/data input
Removed wrong assert()s

The 'conn' passed in as userdata can be used and there can be other
sessionhandles ('data') than the single one this checked for.
2015-10-23 08:22:38 +02:00
Daniel Stenberg
3042cb5043 http2: added three stream prio/deps options
CURLOPT_STREAM_DEPENDS

CURLOPT_STREAM_DEPENDS_E

CURLOPT_STREAM_PRIORITY
2015-10-23 08:22:38 +02:00
Daniel Stenberg
23cc0c00d4 RELEASE-NOTES: synced with ace68fdc0c 2015-10-22 18:40:53 +02:00
m-gardet
ace68fdc0c mbedtls:new profile with RSA min key len = 1024.
Closes #502
2015-10-22 15:28:57 +02:00
Daniel Stenberg
9744ef2289 checksrc: add crude // detection 2015-10-21 23:18:04 +02:00
Gisle Vanem
c238d4da1b build: fix for MSDOS/djgpp
- Add a VPATH-statement for the vtls/*.c files.

- Due to 'vtls/*.c', remove that subdir part from $(OBJECTS).
2015-10-21 13:00:52 -04:00
Daniel Stenberg
5fecdc26f7 copyrights: update Gisle Vanem's email 2015-10-20 13:33:01 +02:00
Daniel Stenberg
257a1c0d14 vtls: fix compiler warning for TLS backends without sha256
... noticed with mbedTLS.
2015-10-20 08:12:44 +02:00
Jonas Minnberg
fe7590f729 vtls: added support for mbedTLS
closes #496
2015-10-20 07:57:24 +02:00
Javier G. Sogo
72646c2e48 cmake: Fix for add_subdirectory(curl) use-case
- Use CURL_BINARY_DIR instead of CMAKE_BINARY_DIR.

When including CURL using add_subdirectory the variables
CMAKE_BINARY_DIR and CURL_BINARY_DIR hold different paths.

Closes https://github.com/bagder/curl/pull/488
Closes https://github.com/bagder/curl/pull/498
2015-10-19 12:49:56 -04:00
Daniel Stenberg
4201e4a9ac RELEASE-NOTES: synced with 4c773bcb47 2015-10-18 23:48:07 +02:00
Daniel Stenberg
4c773bcb47 tests/FILEFORMAT: mention PSL as a valid feture to check for
For example in test 1136
2015-10-18 23:25:26 +02:00
Daniel Stenberg
cb922d47d6 teste1136: only run when PSL is enabled 2015-10-18 23:20:08 +02:00
Daniel Stenberg
06b5fd8fde curl: slist_wc: remove curl_memory.h inclusion
... that's for the library only.
2015-10-18 00:43:37 +02:00
Daniel Stenberg
5cf0166636 configure: add PSL to the list of features
... to make test 1014 work again after e77b5b7453.
2015-10-18 00:11:13 +02:00
Daniel Hwang
19cb0c4a88 tool: Generate easysrc with last cache linked-list
Using a last cache linked-list improves the performance of easysrc
generation.

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

Closes #452
2015-10-18 00:00:50 +02:00
Tim Rühsen
e77b5b7453 cookies: Add support for Mozilla's Publix Suffix List
Use libpsl to check the domain value of Set-Cookie headers (and cookie
jar entries) for not being a Publix Suffix.

The configure script checks for "libpsl" by default. Disable the check
with --without-libpsl.

Ref: https://publicsuffix.org/
Ref: https://github.com/publicsuffix/list
Ref: https://github.com/rockdaboot/libpsl
2015-10-17 16:37:49 +02:00
Richard Hosking
684816cd9b curlbuild.h: Fix non-configure compiling to mips and sh4 targets 2015-10-16 23:57:44 +02:00
Anders Bakken
2b98cb57c4 http2: Don't pass unitialized name+len pairs to nghttp2_submit_request
bug introduced by 1869164293.

Closes #493
2015-10-16 23:46:03 +02:00
Dan Fandrich
3fde8a4971 test1601: fix compilation with --enable-debug and --disable-crypto-auth 2015-10-16 23:04:54 +02:00
Daniel Stenberg
443e81ea47 multi: fix off-by-one finit[] array size
introduced in c6aedf680f. It needs to be CURLM_STATE_LAST big since it
must hande the range 0 .. CURLM_STATE_MSGSENT (18) and CURLM_STATE_LAST
is 19 right now.

Reported-by: Dan Fandrich
Bug: http://curl.haxx.se/mail/lib-2015-10/0069.html
2015-10-16 22:42:56 +02:00
Daniel Stenberg
c6aedf680f fread_func: move callback pointer from set to state struct
... and assign it from the set.fread_func_set pointer in the
Curl_init_CONNECT function. This A) avoids that we have code that
assigns fields in the 'set' struct (which we always knew was bad) and
more importantly B) it makes it impossibly to accidentally leave the
wrong value for when the handle is re-used etc.

Introducing a state-init functionality in multi.c, so that we can set a
specific function to get called when we enter a state. The
Curl_init_CONNECT is thus called when switching to the CONNECT state.

Bug: https://github.com/bagder/curl/issues/346

Closes #346
2015-10-15 23:32:19 +02:00
Dan Fandrich
854976ad7b test1531: case the size to fix the test on non-largefile builds 2015-10-14 22:00:09 +02:00
Daniel Stenberg
14d5a86b3e acinclude: remove PKGCONFIG override
... and allow it to get set by a caller easier.

Reported-by: Rainer Jung
Bug: http://curl.haxx.se/mail/lib-2015-10/0035.html
2015-10-13 12:58:52 +02:00
Dan Fandrich
db532eff1e docs/INSTALL: Updated example minimal binary sizes 2015-10-12 23:47:10 +02:00
Erik Johansson
3ad83bc3a6 openssl: Fix set up of pkcs12 certificate verification chain
sk_X509_pop will decrease the size of the stack which means that the loop would
end after having added only half of the certificates.

Also make sure that the X509 certificate is freed in case
SSL_CTX_add_extra_chain_cert fails.
2015-10-11 23:14:04 +02:00
Daniel Stenberg
13ddb9e54a ntlm: error out without 64bit support as the code needs it
It makes it a clearer message for developers reaching that point without
the necessary support.

Thanks-by: Jay Satiro

Closes #78
2015-10-09 23:51:54 +02:00
Daniel Stenberg
7715a70ba2 curl_global_init: set the memory function pointers correct
follow-up from 6f8ecea0
2015-10-09 16:13:54 +02:00
Daniel Stenberg
6f8ecea059 curl_global_init_mem: set function pointers before doing init
... as in the polarssl TLS backend for example it uses memory functions.
2015-10-09 16:04:11 +02:00
Jay Satiro
048f84637f http2: Fix http2_recv to return -1 if recv returned -1
If the underlying recv called by http2_recv returns -1 then that is the
value http2_recv returns to the caller.
2015-10-09 00:29:25 -04:00
Svyatoslav Mishyn
d30ad55c59 curl_easy_recv.3: CURLINFO_LASTSOCKET => CURLINFO_ACTIVESOCKET
Closes #479
2015-10-08 22:50:49 +02:00
Svyatoslav Mishyn
08e5fb4465 curl_easy_send.3: CURLINFO_LASTSOCKET => CURLINFO_ACTIVESOCKET 2015-10-08 22:50:42 +02:00
Svyatoslav Mishyn
2e373f4a6f CURLOPT_CONNECT_ONLY.3: CURLINFO_LASTSOCKET => CURLINFO_ACTIVESOCKET 2015-10-08 22:50:42 +02:00
Daniel Stenberg
bce689605d CURLOPT_CERTINFO.3: fix reference to CURLINFO_CERTINFO 2015-10-08 13:47:52 +02:00
Daniel Stenberg
8256b44e5a ntlm: get rid of unconditional use of long long
... since some compilers don't have it and instead use other types, such
as __int64.

Reported by: gkinseyhpw
Closes #478
2015-10-08 12:31:06 +02:00
Anders Bakken
da2d3b5805 des: Fix header conditional for Curl_des_set_odd_parity
Follow up to 613e502.
2015-10-08 02:07:12 -04:00
Daniel Stenberg
3771da335b configure: build silently by default
'make V=1' will make the build verbose like before
2015-10-07 14:56:07 +02:00
Daniel Stenberg
8bb43ecd05 bump: start climbing toward 7.46.0 2015-10-07 14:52:32 +02:00
Daniel Stenberg
645fc44764 RELEASE-PROCEDURE: add the github HTTPS download step 2015-10-07 14:46:49 +02:00
Daniel Stenberg
2c000d91f3 THANKS: 19 new contributors from the 7.45.0 announcement 2015-10-07 10:12:39 +02:00
Daniel Stenberg
aed57fdc95 RELEASE-NOTES: synced with 69ea579700 2015-10-05 19:36:31 +02:00
Jay Satiro
69ea579700 getinfo: Fix return code for unknown CURLINFO options
- If a CURLINFO option is unknown return CURLE_UNKNOWN_OPTION.

Prior to this change CURLE_BAD_FUNCTION_ARGUMENT was returned on
unknown. That return value is contradicted by the CURLINFO option
documentation which specifies a return of CURLE_UNKNOWN_OPTION on
unknown.
2015-10-04 17:29:43 -04:00
rouzier
b1d55997e5 hiperfifo: fix the pointer passed to WRITEDATA
Closes https://github.com/bagder/curl/pull/471
2015-10-04 17:16:14 -04:00
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
Orange Tsai
5bf36ea30d gopher: don't send NUL byte
Closes #466
2015-10-01 18:15:11 +02:00
Jay Satiro
c6ff538ebd runtests: Fix pid check in checkdied
Because the 'not' operator has a very low precedence and as a result the
entire statement was erroneously negated and could never be true.
2015-09-29 22:08:57 -04:00
Thorsten Schöning
8fd190c04f win32: make recent Borland compilers use long long 2015-09-30 00:03:35 +02:00
Daniel Stenberg
ec9cbb1757 RELEASE-NOTES: synced with 69b89050d4 2015-09-29 10:57:42 +02:00
Michael Kalinin
69b89050d4 openssl: Fix algorithm init
- Change algorithm init to happen after OpenSSL config load.

Additional algorithms may be available due to the user's config so we
initialize the algorithms after the user's config is loaded.

Bug: https://github.com/bagder/curl/issues/447
Reported-by: Denis Feklushkin
2015-09-28 22:47:25 -04:00
Svyatoslav Mishyn
963b7bd4f7 docs: fix unescaped '\n' in man pages
Closes https://github.com/bagder/curl/pull/459
2015-09-27 23:45:41 -04:00
Daniel Stenberg
af90becf4b http2: set TCP_NODELAY unconditionally
For a single-stream download from localhost, we managed to increase
transfer speed from 1.6MB/sec to around 400MB/sec, mostly because of
this single fix.
2015-09-27 23:23:58 +02:00
Daniel Stenberg
46ad4f7f93 http2: avoid superfluous Curl_expire() calls
... only call it when there is data arriving for another handle than the
one that is currently driving it.

Improves single-stream download performance quite a lot.

Thanks-to: Tatsuhiro Tsujikawa
Bug: http://curl.haxx.se/mail/lib-2015-09/0097.html
2015-09-27 23:23:33 +02:00
Daniel Stenberg
790d6de485 readwrite_data: set a max number of loops
... as otherwise a really fast pipe can "lock" one transfer for some
protocols, like with HTTP/2.
2015-09-27 20:48:35 +02:00
Sergei Nikulov
4f037367ed CI: Added AppVeyor-CI for curl
Closes #439
2015-09-26 23:57:36 +02:00
Daniel Stenberg
32fc638ddf FTP: fix uploading ASCII with unknown size
... don't try to increase the supposed file size on newlines if we don't
know what file size it is!

Patch-by: lzsiga
2015-09-26 23:36:25 +02:00
Tatsuhiro Tsujikawa
119037325d build: fix failures with -Wcast-align and -Werror
Closes #457
2015-09-26 23:10:20 +02:00
Tatsuhiro Tsujikawa
710bb89cf3 curl-confopts.m4: Add missing ')'
... for CURL_CHECK_OPTION_RT

Closes #456
2015-09-26 23:09:40 +02:00
Jay Satiro
095fe60e27 curl_easy_getinfo.3: Add brief description for each CURLINFO 2015-09-25 02:37:42 -04:00
Jakub Zakrzewski
4d60e125de CMake: Ensure discovered include dirs are considered
...during header checks. Otherwise some following header tests
(incorrectly) fail.

Closes #436
2015-09-23 15:19:54 +02:00
Jakub Zakrzewski
7c478cad57 CMake: Put "winsock2.h" before "windows.h" during configure checks
"windows.h" includes "winsock.h" what causes many redefinition errors
if "winsock2.h" is included afterwards and can cause build to fail.
2015-09-23 15:18:38 +02:00
Daniel Stenberg
0110cced2a tests: disable 1510 due to CI-problems on github 2015-09-23 13:53:38 +02:00
Mike Crowe
5f87906e0e gnutls: Report actual GnuTLS error message for certificate errors
If GnuTLS fails to read the certificate then include whatever reason it
provides in the failure message reported to the client.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
2015-09-23 13:44:40 +02:00
Daniel Stenberg
684bf30802 RELEASE-NOTES: synced with 6b56901b56 2015-09-22 22:21:58 +02:00
Mike Crowe
6b56901b56 gnutls: Support CURLOPT_KEYPASSWD
The gnutls vtls back-end was previously ignoring any password set via
CURLOPT_KEYPASSWD. Presumably this was because
gnutls_certificate_set_x509_key_file did not support encrypted keys.

gnutls now has a gnutls_certificate_set_x509_key_file2 function that
does support encrypted keys. Let's determine at compile time whether the
available gnutls supports this new function. If it does then use it to
pass the password. If it does not then emit a helpful diagnostic if a
password is set. This is preferable to the previous behaviour of just
failing to read the certificate without giving a reason in that case.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
2015-09-22 17:30:33 +02:00
Daniel Stenberg
7362008c1c CURLINFO_TLS_SESSION: always return backend info
... even for those that don't support providing anything in the
'internals' struct member since it offers a convenient way for
applications to figure this out.
2015-09-22 17:21:37 +02: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
Richard van den Berg
0583ed3e48 CURLOPT_PROXY.3: A proxy given as env variable gets no special treatment
Closes #449
2015-09-22 16:54:28 +02:00
Daniel Stenberg
67ae07c2e0 TODO: 5.7 More compressions
Like for example brotli, as being implemented in Firefox now.
2015-09-22 10:53:55 +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
Viktor Szakats
bb72b9453d CURLOPT_PINNEDPUBLICKEY.3: replace test.com with example.com
closes #443
2015-09-20 18:41:23 +02:00
Daniel Stenberg
5fde69cdc3 KNOWN_BUGS: 91 "curl_easy_perform hangs with imap and PolarSSL"
Closes #334
2015-09-20 13:34:16 +02:00
Daniel Stenberg
443014e905 KNOWN_BUGS: add link to #85 2015-09-20 13:31:22 +02:00
Daniel Stenberg
37af1766e9 tests: disable 1801 until fixed
It is unreliable and causes CI problems on github

Closes #380
2015-09-20 13:12:44 +02:00
Daniel Stenberg
67dbf8aa9c RELEASE-NOTES: synced with 4d95491636 2015-09-20 13:00:19 +02: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
Jay Satiro
47b7d658b4 vtls: Change designator name for server's pubkey hash
- Change the designator name we use to show the base64 encoded sha256
hash of the server's public key from 'pinnedpubkey' to
'public key hash'.

Though the server's public key hash is only shown when comparing pinned
public key hashes, the server's hash may not match one of the pinned.
2015-09-19 22:40:40 -04:00
Isaac Boukris
f65e07ca59 NTLM: Reset auth-done when using a fresh connection
With NTLM a new connection will always require authentication.
Fixes #435
2015-09-19 23:21:05 +02:00
Daniel Hwang
30c131f51f ssl: add server cert's "sha256//" hash to verbose
Add a "pinnedpubkey" section to the "Server Certificate" verbose

Bug: https://github.com/bagder/curl/issues/410
Reported-by: W. Mark Kubacki

Closes #430
Closes #410
2015-09-19 23:17:39 +02:00
Jakub Zakrzewski
c979a3d0c4 openldap: only part of LDAP query results received
Introduced with commit 65d141e6da

Closes #440
2015-09-19 23:06:03 +02:00
Alessandro Ghedini
c184a5c6bc openssl: don't output certinfo data 2015-09-19 22:53:31 +02:00
Alessandro Ghedini
c00cec9864 openssl: refactor certificate parsing to use OpenSSL memory BIO
Fixes #427
2015-09-19 22:53:31 +02:00
Kamil Dudka
958d2ffb19 nss: prevent NSS from incorrectly re-using a session
Without this workaround, NSS re-uses a session cache entry despite the
server name does not match.  This causes SNI host name to differ from
the actual host name.  Consequently, certain servers (e.g. github.com)
respond by 400 to such requests.

Bug: https://bugzilla.mozilla.org/1202264
2015-09-18 17:38:51 +02:00
Kamil Dudka
a9fd53887b nss: check return values of NSS functions 2015-09-18 17:07:22 +02:00
Daniel Stenberg
65ca3b083c CURLOPT_PINNEDPUBLICKEY.3: mention error code 2015-09-17 08:54:32 +02:00
Daniel Stenberg
82e3e8e31f openssl: build with < 0.9.8
... without sha256 support and no define saying so.

Reported-by: Rajkumar Mandal
2015-09-17 08:54:04 +02:00
Daniel Stenberg
887a4a19aa libcurl-errors.3: add two missing error codes
CURLE_SSL_PINNEDPUBKEYNOTMATCH and CURLE_SSL_INVALIDCERTSTATUS
2015-09-17 08:49:06 +02:00
Jay Satiro
b550a1c067 CURLOPT_PINNEDPUBLICKEY.3: Improve pubkey extraction example
- Show how a certificate can be obtained using OpenSSL.

Bug: https://github.com/bagder/curl/pull/430
Reported-by: Daniel Hwang
2015-09-14 03:16:04 -04:00
Daniel Stenberg
202162daeb http2: removed unused function 2015-09-13 16:33:51 +02:00
Daniel Stenberg
a7cb6a28e2 CURLINFO_ACTIVESOCKET.3: mention it replaces *LASTSOCKET 2015-09-12 23:37:52 +02:00
Daniel Stenberg
3d4ffa71f7 opts: add CURLINFO_* man pages to dist 2015-09-12 23:22:33 +02:00
Daniel Stenberg
cdba82e1c2 opts: 19 more CURLINFO_* options made into stand-alone man pages 2015-09-12 23:13:47 +02:00
Daniel Stenberg
68c620fdc7 RELEASE-NOTES: synced with fad9604613 2015-09-12 12:54:58 +02:00
Daniel Stenberg
fad9604613 curl: customrequest_helper: deal with NULL custom method 2015-09-11 18:49:28 +02:00
Svyatoslav Mishyn
0e17369f5b CURLOPT_FNMATCH_FUNCTION.3: fix typo
s => is

Closes #428
2015-09-11 18:43:54 +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
Jay Satiro
df6a4d3519 curl_sspi: fix possibly undefined CRYPT_E_REVOKED
Bug: https://github.com/bagder/curl/pull/411
Reported-by: Viktor Szakats
2015-09-10 02:17:33 -04:00
Jay Satiro
e30763c72e buildconf.bat: fix syntax error 2015-09-09 02:46:48 -04:00
Benjamin Kircher
6a0bd6ce8b winbuild: run buildconf.bat if necessary 2015-09-09 02:37:57 -04:00
Svyatoslav Mishyn
4e6f7aee64 docs: fix argument type for CURLINFO_SPEED_*, CURLINFO_SIZE_*
long => double
2015-09-08 21:19:34 -04:00
Sergei Nikulov
1b8a5afe78 cmake: IPv6 : disable Unix header check on Windows platform
Closes #409
2015-09-08 15:49:15 +02:00
Daniel Stenberg
87e533ace0 parse_proxy: reject illegal port numbers
If the port number in the proxy string ended weirdly or the number is
too large, skip it. Mostly as a means to bail out early if a "bare" IPv6
numerical address is used without enclosing brackets.

Also mention the bracket requirement for IPv6 numerical addresses to the
man page for CURLOPT_PROXY.

Closes #415

Reported-by: Marcel Raad
2015-09-08 15:17:00 +02:00
Daniel Stenberg
27620171ff FTP: do_more: add check for wait_data_conn in upload case
In some timing-dependnt cases when a 4xx response immediately followed
after a 150 when a STOR was issued, this function would wrongly return
'complete == true' while 'wait_data_conn' was still set.

Closes #405

Reported-by: Patricia Muscalu
2015-09-08 09:29:03 +02:00
Svyatoslav Mishyn
664398e43b CURLOPT_TLSAUTH_TYPE.3: update description
Closes #414
Closes #413
2015-09-06 23:12:17 +02:00
Svyatoslav Mishyn
3a4f42dd0c CURLOPT_PATH_AS_IS.3: fix typo
leavit => leaveit

closes #412
2015-09-05 23:19:49 +02:00
Svyatoslav Mishyn
5ea0004438 CURLINFO_SSL_VERIFYRESULT.3: add short description 2015-09-05 23:19:33 +02:00
Svyatoslav Mishyn
f1ccf68e8c CURLINFO_SSL_ENGINES.3: add short description 2015-09-05 23:19:33 +02:00
Svyatoslav Mishyn
d36d83ba4b CURLINFO_CONTENT_LENGTH_UPLOAD.3: replace "receive" with "get" for consistency 2015-09-05 23:19:33 +02:00
Svyatoslav Mishyn
5dc556031b CURLINFO_REDIRECT_TIME.3: remove redundant '!' 2015-09-05 23:19:33 +02:00
Kamil Dudka
0e91737615 Revert "has: generate the curl/has.h header"
This reverts commit a60bde79f9 I have
pushed by mistake.  Apologies for my incompetent use of the git repo!
2015-09-04 16:12:26 +02:00
Kamil Dudka
7380433d6a nss: do not directly access SSL_ImplementedCiphers[]
It causes dynamic linking issues at run-time after an update of NSS.

Bug: https://lists.fedoraproject.org/pipermail/devel/2015-September/214117.html
2015-09-04 14:35:36 +02:00
Daniel Stenberg
a60bde79f9 has: generate the curl/has.h header
changed macro name, moved and renamed script to become docs/libcurl/has.pl,
generate code that is checksrc compliant
2015-09-04 10:41:43 +02:00
Daniel Stenberg
82db076d9f gitignore: ignore more generated VC Makefiles 2015-09-03 23:35:41 +02:00
Daniel Stenberg
25a2e8ebaf projects/Windows/.gitignore: ignore generated files for release 2015-09-03 23:34:53 +02:00
Daniel Stenberg
1869164293 http2: don't pass on Connection: headers
RFC 7540 section 8.1.2.2 states: "An endpoint MUST NOT generate an
HTTP/2 message containing connection-specific header fields; any message
containing connection-specific header fields MUST be treated as
malformed"

Closes #401
2015-09-03 22:23:50 +02:00
Daniel Stenberg
4ceddcf8ca curl.1: update RFC references 2015-09-03 19:52:23 +02:00
Daniel Stenberg
e1a4bab86a CURLOPT_POSTREDIR.3: update RFC number and section 2015-09-03 17:33:16 +02:00
Daniel Stenberg
8a0ff1e529 CURLOPT_FOLLOWLOCATION.3: mention methods for redirects
and some general cleaning up
2015-09-03 17:27:40 +02:00
Marcel Raad
668231c309 inet_pton.c: Fix MSVC run-time check failure (2)
This fixes another run-time check failure because of a narrowing cast on
Visual C++.

Closes #408
2015-09-03 11:37:50 +02:00
Jay Satiro
cb6a07fed0 docs: Warn about any-domain cookies and multiple transfers
- Warn that cookies without a domain are sent to any domain:
CURLOPT_COOKIELIST, CURLOPT_COOKIEFILE, --cookie

- Note that imported Set-Cookie cookies without a domain are no longer
exported:
CURLINFO_COOKIELIST, CURLOPT_COOKIEJAR, --cookie-jar
2015-09-03 02:35:11 -04: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
Daniel Stenberg
9bb198026e opts: 8 more CURLINFO* options as stand-alone man pages 2015-09-02 00:00:53 +02:00
Daniel Stenberg
749c0ca05b RELEASE-NOTES: synced with c764cb4add 2015-08-31 23:17:53 +02:00
Daniel Stenberg
c764cb4add man-pages: more SEE ALSO links 2015-08-31 16:03:53 +02:00
Daniel Stenberg
6099f5fcac opts: more CURLINFO_* options as stand-alone man pages 2015-08-31 15:28:21 +02:00
Steve Holme
4963948089 sasl: Only define Curl_sasl_digest_get_pair() when CRYPTO_AUTH enabled
Introduced in commit 59f3f92ba6 this function is only implemented when
CURL_DISABLE_CRYPTO_AUTH is not defined. As such we shouldn't define
the function in the header file either.
2015-08-31 12:44:01 +01:00
Steve Holme
b850437991 sasl: Updated SPN variables and comments for consistency
In places the "host name" and "realm" variable was referred to as
"instance" whilst in others it was referred to as "host".
2015-08-31 12:43:58 +01:00
Daniel Stenberg
eb8283bb1a configure: check for HMAC_Update in openssl
Turns out HMAC_Init is now deprecated in openssl master (and I spelled
HMAC_Init_ex wrong in previous commit)
2015-08-30 23:21:30 +02:00
Steve Holme
415f0370ea win32: Use DES_set_odd_parity() from OpenSSL/BoringSSL by default
Set HAVE_DES_SET_ODD_PARITY when using OpenSSL/BoringSSL as native
Windows builds don't use the autoconf tools.
2015-08-30 22:06:10 +01:00
Steve Holme
347a6ee597 des: Fixed compilation warning from commit 613e5022fe
curl_ntlm_core.c:150: warning 'Curl_des_set_odd_parity' undefined;
                      assuming extern returning int
2015-08-30 21:45:30 +01:00
Steve Holme
2a59fb25cc buildconf.bat: Fixed double blank line in 'curl manual' warning output 2015-08-30 15:09:43 +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
Jay Satiro
dfeb85a187 CURLOPT_FILETIME.3: CURLINFO_FILETIME has its own manpage now 2015-08-29 23:23:58 -04:00
Daniel Stenberg
96a3488eae CURLINFO_RESPONSE_CODE.3: added short description 2015-08-29 13:55:00 +02:00
Daniel Stenberg
45e918564a opts: 7 initial CURLINFO_* options as stand-alone man pages 2015-08-28 22:58:00 +02:00
Nikolai Kondrashov
1abb218fe0 libcurl.m4: Put braces around empty if body
Put braces around empty "if" body in libcurl.m4 check to avoid warning:

        suggest braces around empty body in an 'if' statement

and make it work with -Werror builds.

Closes #402
2015-08-28 22:51:55 +02:00
Svyatoslav Mishyn
ac7be02e69 curl_easy_escape.3: escape '\n'
Closes #398
2015-08-25 22:44:22 +02:00
Svyatoslav Mishyn
37f173cfd0 curl_easy_{escape,setopt}.3: fix example
remove redundant '}'
2015-08-25 22:44:14 +02:00
Sergei Nikulov
2132708ac2 cmake: added Windows SSL support
Closes #399
2015-08-25 22:42:28 +02: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
Svyatoslav Mishyn
f21408132a curl_easy_{escape,unescape}.3: "char *" vs. "const char *"
Closes #395
2015-08-24 23:58:57 +02:00
Patrick Monnerat
aec249f89f os400: include new options in wrappers and update ILE/RPG binding. 2015-08-24 14:20:34 +02:00
Daniel Stenberg
e7d171da6b KNOWN_BUGS: #2, not reading a HEAD response-body is not a bug
... since HTTP is forbidden to return any such.
2015-08-24 12:56:20 +02:00
Daniel Stenberg
874413b3e1 KNOWN_BUGS: #78 zero-length files is already fixed! 2015-08-24 12:53:38 +02:00
Razvan Cojocaru
62f306ff34 getinfo: added CURLINFO_ACTIVESOCKET
This patch addresses known bug #76, where on 64-bit Windows SOCKET is 64
bits wide, but long is only 32, making CURLINFO_LASTSOCKET unreliable.

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
2015-08-24 12:34:17 +02:00
Daniel Stenberg
36f6f6f4f2 http2: remove dead code
Leftovers from when we removed the private socket hash.

Coverity CID 1317365, "Logically dead code"
2015-08-24 11:31:45 +02:00
Daniel Stenberg
a78534794e ntlm: mark deliberate switch case fall-through
Coverity CID 1317367, "Missing break in switch"
2015-08-24 11:29:22 +02:00
Daniel Stenberg
110d99c661 http2: on_frame_recv: get a proper 'conn' for the debug logging
"Explicit null dereferenced (FORWARD_NULL)"

Coverity CID 1317366
2015-08-24 11:26:30 +02:00
Daniel Stenberg
6d91b70d8b RELEASE-NOTES: synced with 2acaf3c804 2015-08-24 00:21:08 +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
22cb631198 runtests: Allow for spaces in server-verify curl custom path 2015-08-22 21:19:34 -04:00
Daniel Stenberg
613e5022fe NTLM: recent boringssl brought DES_set_odd_parity back
... so improve the #ifdefs for using our local implementation.
2015-08-22 23:59:18 +02:00
Daniel Stenberg
2c12ac8de2 configure: detect latest boringssl
Since boringssl brought back DES_set_odd_parity again, it cannot be used
to differentiate from boringssl. Using the OPENSSL_IS_BORINGSSL define
seems better anyway.

URL: f551028d5c%5E!/
Original-patch-by: Bertrand Simonnet

Closes #393
2015-08-22 00:08:03 +02:00
Daniel Stenberg
30aa38c818 configure: change functions to detect openssl (clones)
... since boringssl moved the former ones and the check started to fail.

URL: f551028d5c%5E!/
Original-patch-by: Bertrand Simonnet
2015-08-22 00:03:56 +02:00
Alessandro Ghedini
8363656cb4 openssl: handle lack of server cert when strict checking disabled
If strict certificate checking is disabled (CURLOPT_SSL_VERIFYPEER
and CURLOPT_SSL_VERIFYHOST are disabled) do not fail if the server
doesn't present a certificate at all.

Closes #392
2015-08-21 15:32:51 +02:00
Daniel Stenberg
38ef1b3e7f ftp: clear the do_more bit when the server has connected
The multi state machine would otherwise go into the DO_MORE state after
DO, even for the case when the FTP state machine had already performed
those duties, which caused libcurl to get stuck in that state and fail
miserably. This occured for for active ftp uploads.

Reported-by: Patricia Muscalu
2015-08-21 13:30:08 +02:00
Jactry Zeng
1d89fd983a travis.yml: Add OS X testbot. 2015-08-21 12:48:52 +02:00
Rémy Léone
b3c7f5159a travis: Upgrading to container based build
http://docs.travis-ci.com/user/migrating-from-legacy

Closes #388
2015-08-20 23:28:05 +02:00
Daniel Stenberg
1cea72bfde RELEASE-NOTES: synced with 14ff86256b 2015-08-20 23:12:21 +02:00
Erik Janssen
14ff86256b rtsp: stop reading empty DESCRIBE responses
Based-on-patch-by: Jim Hollinger
2015-08-20 23:07:03 +02:00
Erik Janssen
e4fb5f2f61 rtsp: support basic/digest authentication 2015-08-20 23:02:28 +02:00
Sam Roth
e67e71d62b CURLMOPT_PUSHFUNCTION.3: fix argument types
Closes #389
Closes #386
2015-08-19 10:35:24 +02:00
Marcel Raad
618dfd65e4 inet_pton.c: Fix MSVC run-time check failure
Visual Studio complains with a message box:

"Run-Time Check Failure #1 - A cast to a smaller data type has caused a
loss of data.  If this was intentional, you should mask the source of
the cast with the appropriate bitmask.

For example:
char c = (i & 0xFF);

Changing the code in this way will not affect the quality of the
resulting optimized code."

This is because only 'val' is cast to unsigned char, so the "& 0xff" has
no effect.

Closes #387
2015-08-19 09:31:45 +02:00
Jay Satiro
1f1f131e09 docs: Update the redirect protocols disabled by default
- Clarify that FILE and SCP are disabled by default since 7.19.4
- Add that SMB and SMBS are disabled by default since 7.40.0
- Add CURLPROTO_SMBS to the list of protocols
2015-08-18 01:38:07 -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
Daniel Stenberg
5a136398ed curl_easy_getinfo.3: fix superfluous space
... and changed "oriented" to "related"

Closes #378
2015-08-15 23:56:28 +02:00
Daniel Stenberg
7166d91a03 CURLOPT_HTTP_VERSION.3: connection re-use goes before version 2015-08-15 23:36:28 +02:00
Daniel Kahn Gillmor
31673ff517 curl.1: Document weaknesses in SSLv2 and SSLv3
Acknowledge that SSLv3 is also widely considered to be insecure.

Also, provide references for people who want to know more about why it's
insecure.
2015-08-15 22:53:46 +02:00
Steve Holme
bedf0a588e generate.bat: Added support for generating only the prerequisite files 2015-08-14 20:59:48 +01:00
Steve Holme
6ba9a1b952 generate.bat: Only call buildconf.bat if it exists 2015-08-14 20:46:11 +01:00
Steve Holme
bc66c21c23 generate.bat: Fixed issues when ran in directories with special chars 2015-08-14 20:38:57 +01:00
Brad King
a9c97fba81 cmake: Fix CurlTests check for gethostbyname_r with 5 arguments
Fix the check code to pass 5 arguments instead of 6.  This typo was
introduced by commit aebfd4cfbf (cmake: fix gethostby{addr,name}_r in
CurlTests, 2014-10-31).
2015-08-14 16:12:27 +02:00
Steve Holme
1a85c8ef15 * buildconf.bat: Fixed issues when ran in directories with special chars
Bug: https://github.com/bagder/curl/pull/379
Reported-by: Daniel Seither
2015-08-14 07:34:37 +01:00
Jay Satiro
9e1b1ca606 curl_global_init_mem.3: Stronger thread safety warning
Bug: http://curl.haxx.se/mail/lib-2015-08/0016.html
Reported-by: Eric Ridge
2015-08-13 23:29:27 -04:00
Svyatoslav Mishyn
15da07d2f2 curl_multi_add_handle.3: fix a typo
"can not" => "cannot"

closes #377
2015-08-12 15:23:59 +02:00
Alessandro Ghedini
5be0c88297 docs: fix typos
closes #376
2015-08-12 11:29:55 +02:00
Daniel Stenberg
052a9dfdad bump: start working toward 7.45.0 2015-08-12 09:07:37 +02:00
Daniel Stenberg
7332ac565c THANKS: remove duplicate name 2015-08-12 08:34:55 +02:00
Daniel Stenberg
105828a309 THANKS-filter: merge Todd's names 2015-08-12 08:32:10 +02:00
Daniel Stenberg
2bcd3ef7b2 THANKS: 13 new contributors from the 7.44.0 RELEASE-NOTES 2015-08-12 08:21:44 +02:00
Daniel Stenberg
1a7f66a3de RELEASE-NOTES: synced with c75a1e7750 2015-08-11 20:13:01 +02:00
Svyatoslav Mishyn
c75a1e7750 curl_formget.3: correct return code
Closes #375
2015-08-11 20:08:33 +02:00
Svyatoslav Mishyn
daf7f98c11 libcurl-tutorial.3: fix formatting
Closes #374
2015-08-11 14:59:07 +02:00
Svyatoslav Mishyn
bb0acba67d curl_easy_recv.3: fix formatting 2015-08-11 14:58:54 +02:00
Anders Bakken
5778e6f526 http2: discard frames with no SessionHandle
Return 0 instead of NGHTTP2_ERR_CALLBACK_FAILURE if we can't locate the
SessionHandle. Apparently mod_h2 will sometimes send a frame for a
stream_id we're finished with.

Use nghttp2_session_get_stream_user_data and
nghttp2_session_set_stream_user_data to identify SessionHandles instead
of a hash.

Closes #372
2015-08-11 08:16:33 +02:00
Daniel Stenberg
c8a656d3c7 RELEASE-NOTES: synced with 9ee40ce2ab 2015-08-11 00:16:19 +02:00
Viktor Szakats
9ee40ce2ab build: refer to fixed libidn versions
closes #371
2015-08-10 23:20:18 +02:00
Daniel Stenberg
0b8e9c8522 Revert "configure: disable libidn by default"
This reverts commit e6749055d6.

... since libidn has since been fixed.
2015-08-10 14:54:41 +02:00
Jakub Zakrzewski
9a5574ca7b CMake: s/HAVE_GSS_API/HAVE_GSSAPI/ to match header define
Otherwise the build only pretended to use GSS-API

Closes #370
2015-08-10 13:39:35 +02:00
Daniel Stenberg
ade6682f8d SFTP: fix range request off-by-one in size check
Reported-by: Tim Stack

Closes #359
2015-08-10 09:18:19 +02:00
Daniel Stenberg
002d58f1e8 test46: update cookie expire time
... since it went old and thus was expired and caused the test to fail!
2015-08-10 00:12:12 +02:00
Steve Holme
cde447217f generate.bat: Use buildconf.bat for prerequisite file generation 2015-08-09 18:02:53 +01:00
Steve Holme
9d29afdfe3 buildconf.bat: Tidy up of comments after recent commits 2015-08-09 18:02:34 +01:00
Steve Holme
0cc0b7e268 buildconf.bat: Added full generation of src\tool_hugehelp.c
Added support for generating the full man page based on code from
generate.bat.
2015-08-09 17:54:09 +01:00
Steve Holme
aa9ead36a4 buildconf.bat: Added detection of groff, nroff, perl and gzip
To allow for the full generation of tool_hugehelp.c added detection of
the required programs - based on code from generate.bat.
2015-08-09 17:12:33 +01:00
Steve Holme
ecece2cfb5 buildconf.bat: Move DOS variable clean-up code to separate function
Rather than duplicate future variables, during clean-up of both success
and error conditions, use a common function that can be called by both.
2015-08-09 17:02:27 +01:00
Steve Holme
4d13b78aec RELEASE-NOTES: Synced with 39dcf352d2 2015-08-09 12:04:57 +01:00
Steve Holme
39dcf352d2 buildconf.bat: Added error messages on failure 2015-08-09 11:46:28 +01:00
Steve Holme
55a255ee9c buildconf.bat: Generate and clean files in the same order 2015-08-09 11:46:26 +01:00
Steve Holme
4c47cbf533 buildconf.bat: Maintain compatibility with DOS based systems
Commit f08e30d7bc broke compatibility with DOS and non Windows NT based
versions of Windows due to the use of the setlocal command.
2015-08-09 11:46:24 +01:00
Jay Satiro
c22fae7ccc CURLOPT_RESOLVE.3: Note removal support was added in 7.42
Bug: http://curl.haxx.se/mail/lib-2015-08/0019.html
Reported-by: Inca R
2015-08-09 02:33:25 -04:00
Steve Holme
d712da787e checksrc.bat: Fixed error when missing *.c and *.h files
File Not Found
2015-08-08 21:01:31 +01:00
Steve Holme
2b743dcf8e checksrc.bat: Fixed incorrect 'lib\vtls' path check in commit 333c36b276 2015-08-08 21:01:29 +01:00
Steve Holme
333c36b276 checksrc.bat: Fixed error when [directory] isn't a curl source directory
The system cannot find the file specified.
2015-08-08 11:36:47 +01:00
Steve Holme
1ab763acce checksrc.bat: Added check for unknown arguments 2015-08-08 11:36:47 +01:00
Steve Holme
a8e9e0c205 scripts: Added missing comments 2015-08-08 11:36:45 +01:00
Steve Holme
4a21346ef3 scripts: Always perform setlocal and endlocal calls in pairs
Ensure that there isn't a mismatch between setlocal and endlocal calls,
which could have happened due to setlocal being called after certain
error conditions were checked for.
2015-08-08 11:13:21 +01:00
Steve Holme
4aee1f9cf5 scripts: Allow -help to be specified in any argument
Allow the -help command line argument to be specified in any argument
and not just as the first.
2015-08-08 11:13:19 +01:00
juef
b9b7ccd04a curl_multi_remove_handle.3: fix formatting
closes #366
2015-08-06 23:37:26 +02:00
Steve Holme
84d122a8d6 README: Added notes about 'Running DLL based configurations'
...as well as a TODO for a future enhancement to the project files.

Thanks-to: Jay Satiro
2015-08-06 22:00:35 +01:00
Steve Holme
5b9151231d RELEASE-NOTES: Synced with cf8975387f 2015-08-06 19:00:36 +01:00
Steve Holme
cf8975387f buildconf.bat: Synchronise no repository error with generate.bat 2015-08-06 18:53:49 +01:00
Steve Holme
0342ada31f generate.bat: Added a check for the presence of a git repository 2015-08-06 18:53:30 +01:00
Jay Satiro
3f5f042e5d build: Added wolfSSL configurations to VC10+ project files
URL: https://github.com/bagder/curl/pull/174
2015-08-06 18:13:09 +01:00
Jay Satiro
bb6b521f69 build: Added wolfSSL build script for Visual Studio projects
Added the wolfSSL build script, based on build-openssl.bat, as well as
the property sheet and header file required for the upcoming additions
to the Visual Studio project files.
2015-08-06 18:02:19 +01:00
Daniel Stenberg
8279dd7d39 CHANGES: refer to the online changelog
Suggested-by: mc0e
2015-08-06 15:28:27 +02:00
Isaac Boukris
fe6049f04b NTLM: handle auth for only a single request
Currently when the server responds with 401 on NTLM authenticated
connection (re-used) we consider it to have failed.  However this is
legitimate and may happen when for example IIS is set configured to
'authPersistSingleRequest' or when the request goes thru a proxy (with
'via' header).

Implemented by imploying an additional state once a connection is
re-used to indicate that if we receive 401 we need to restart
authentication.

Closes #363
2015-08-06 14:39:26 +02:00
Steve Holme
7f11259eb7 RELEASE-NOTES: Synced with 473807b95f 2015-08-05 19:34:47 +01:00
Steve Holme
473807b95f generate.bat: Use buildconf.bat for prerequisite file clean-up 2015-08-05 19:15:46 +01:00
Steve Holme
f08e30d7bc buildconf.bat: Added support for file clean-up via -clean 2015-08-05 18:52:50 +01:00
Steve Holme
6428b8de42 buildconf.bat: Added progress output 2015-08-05 18:02:37 +01:00
Steve Holme
97c9d31884 buildconf.bat: Avoid using goto for file not in repository 2015-08-05 17:54:20 +01:00
Daniel Stenberg
9947f259bf curl_slist_append.3: add error checking to the example 2015-08-05 14:28:39 +02:00
Steve Holme
33de75ed63 buildconf.bat: Added display of usage text with -help 2015-08-05 06:47:47 +01:00
Steve Holme
df5965ebf4 buildconf.bat: Added exit codes for error handling 2015-08-05 06:45:21 +01:00
Steve Holme
6e566451ce buildconf.bat: Added our standard copyright header 2015-08-05 06:43:26 +01:00
Steve Holme
07f7cdc309 buildconf.bat: Use lower-case for commands and reserved keywords 2015-08-05 06:40:48 +01:00
Steve Holme
3725748599 generate.bat: Only clean prerequisite files when in ALL mode 2015-08-04 19:22:36 +01:00
Steve Holme
1e67bc5eaf generate.bat: Moved error messages out of sub-routines 2015-08-04 19:15:13 +01:00
Steve Holme
12f915ca2a generate.bat: More use of lower-case for commands and reserved keywords 2015-08-04 19:09:15 +01:00
Daniel Stenberg
4b96240d3f libcurl.3: fix a single typo
Closes #361
2015-08-03 23:28:31 +02:00
Daniel Stenberg
1b3d3f9237 RELEASE-NOTES: synced with c4eb10e2f0 2015-08-03 14:50:18 +02:00
Daniel Stenberg
c4eb10e2f0 SSH: three state machine fixups
The SSH state machine didn't clear the 'rc' variable appropriately in a
two places which prevented it from looping the way it should. And it
lacked an 'else' statement that made it possible to erroneously get
stuck in the SSH_AUTH_AGENT state.

Reported-by: Tim Stack

Closes #357
2015-08-02 22:50:31 +02:00
Daniel Stenberg
3b4ee0d432 curl_gssapi: remove 'const' to fix compiler warnings
initialization discards 'const' qualifier from pointer target type
2015-08-02 00:24:38 +02:00
Daniel Stenberg
c092b0f0f3 docs: formpost needs the full size at start of upload
Closes #360
2015-08-02 00:15:39 +02:00
Steve Holme
f75b6065db sspi: Fix typo from left over from old code which referenced NTLM
References to NTLM in the identity generation should have been removed
in commit c469941293 but not all were.
2015-08-01 23:09:03 +01:00
Steve Holme
11ab3f8918 win32: Fix compilation warnings from commit 40c921f8b8
connect.c:953:5: warning: initializer element is not computable at load
                 time
connect.c:953:5: warning: missing initializer for field 'dwMinorVersion'
                 of 'OSVERSIONINFOEX'
curl_sspi.c:97:5: warning: initializer element is not computable at load
                  time
curl_sspi.c:97:5: warning: missing initializer for field 'szCSDVersion'
                  of 'OSVERSIONINFOEX'
2015-08-01 22:55:01 +01:00
Steve Holme
a1b2a6bd93 schannel: Fix compilation warning from commit 7a8e861a56
schannel.c:1125:5: warning: missing initializer for field 'dwMinorVersion'
                   of 'OSVERSIONINFOEX' [-Wmissing-field-initializers
2015-08-01 22:54:57 +01:00
Daniel Stenberg
c8331f515e libcurl-thread.3: minor reformatting 2015-07-31 23:19:02 +02:00
Jay Satiro
23b84e448f curl_global_init_mem.3: Warn threaded resolver needs thread safe funcs
Bug: http://curl.haxx.se/mail/lib-2015-07/0149.html
Reported-by: Eric Ridge
2015-07-31 02:38:44 -04:00
Jay Satiro
0da1f5dc5c libcurl-thread.3: Warn memory functions must be thread safe
Bug: http://curl.haxx.se/mail/lib-2015-07/0149.html
Reported-by: Eric Ridge
2015-07-31 01:58:03 -04:00
Steve Holme
909f0a82b0 RELEASE-NOTES: Synced with 8b1d00ac1a 2015-07-31 06:24:35 +01:00
Steve Holme
8b1d00ac1a INSTALL: Minor formatting correction in 'Legacy Windows and SSL' section
...as well as some rewording.
2015-07-30 16:59:55 +01:00
Kamil Dudka
f7dcc7c118 http: move HTTP/2 cleanup code off http_disconnect()
Otherwise it would never be called for an HTTP/2 connection, which has
its own disconnect handler.

I spotted this while debugging <https://bugzilla.redhat.com/1248389>
where the http_disconnect() handler was called on an FTP session handle
causing 'dnf' to crash.  conn->data->req.protop of type (struct FTP *)
was reinterpreted as type (struct HTTP *) which resulted in SIGSEGV in
Curl_add_buffer_free() after printing the "Connection cache is full,
closing the oldest one." message.

A previously working version of libcurl started to crash after it was
recompiled with the HTTP/2 support despite the HTTP/2 protocol was not
actually used.  This commit makes it work again although I suspect the
root cause (reinterpreting session handle data of incompatible protocol)
still has to be fixed.  Otherwise the same will happen when mixing FTP
and HTTP/2 connections and exceeding the connection cache limit.

Reported-by: Tomas Tomecek
Bug: https://bugzilla.redhat.com/1248389
2015-07-30 15:16:43 +02:00
Viktor Szakats
ecf7618e12 ABI doc: use secure URL 2015-07-30 15:02:44 +02:00
Daniel Stenberg
5b9a006b8f ABI: remove the ascii logo
and made the indent level to 1
2015-07-30 12:16:14 +02:00
Daniel Stenberg
fc69e2f7ec libcurl-multi.3: mention curl_multi_wait
... and some general rewordings to improve this docs.

Reported-by: Tim Stack

Closes #356
2015-07-30 10:18:45 +02:00
Steve Holme
bdd8cf4777 maketgz: Fixed some VC makefiles missing from the release tarball
VC7, VC11, VC12 and VC14 makefiles were missing from the release
tarball.
2015-07-30 06:34:03 +01:00
Steve Holme
dda81c1d5f RELEASE-NOTES: Synced with 2d7e165761 2015-07-29 19:17:18 +01:00
Steve Holme
2d7e165761 build: Added VC14 project files to Makefile.am 2015-07-29 19:07:08 +01:00
Steve Holme
8356022d17 build: Added VC14 project files
Updates to Makefile.am for the generation of the project files in
the tarball to follow.
2015-07-29 18:42:48 +01:00
Jay Satiro
467309406e libcurl-thread.3: Clarify CURLOPT_NOSIGNAL takes long value 1L 2015-07-29 02:05:32 -04:00
Steve Holme
b656715da3 generate.bat: Use lower-case for commands and reserved keywords
Whilst there are no coding standards for the batch files used in curl,
most tend to use lower-case for keywords and upper-case for variables.
2015-07-28 23:08:24 +01:00
Steve Holme
9b95306d4c build: Added initial VC14 support to generate.bat
Visual Studio project files and updates to makefile.am to follow.
2015-07-28 22:55:49 +01:00
Steve Holme
98e8b050ef build: Fixed missing .opensdf files from VC10+ .gitignore files 2015-07-28 20:46:56 +01:00
Steve Holme
d9efd36907 build: Use $(ProjectName) macro for curl.exe and curld.exe filenames
This wasn't possible with the old curlsrc project filenames, but like
commit 2a615a2b64 and 11397eb6dd for libcurl use the built in Visual
Studio macros for the output filenames.
2015-07-28 20:44:59 +01:00
Steve Holme
1627930177 build: Renamed curl src Visual Studio project files
Following commit 957fcd9049 and in preparation for adding the VC14
project files renamed the curl source project files.
2015-07-28 20:44:14 +01:00
Jay Satiro
299b74fcfc libcurl-thread.3: Revert to stricter handle wording
.. also update formatting and add WinSSL and wolfSSL to the SSL/TLS
handlers list.
2015-07-28 13:57:06 +02:00
Jay Satiro
279965c923 libcurl-thread.3: Consolidate thread safety info
This is a new document to consolidate our thread safety information from
several documents (curl-www:features, libcurl.3, libcurl-tutorial.3).
Each document's section on multi-threading will now point to this one.
2015-07-28 13:57:06 +02:00
Steve Holme
7db03e5c21 README: Corrected formatting for 'Legacy Windows and SSL' section
...as well as some wording.
2015-07-27 00:48:53 +01:00
Steve Holme
a728225a92 build-openssl.bat: Added support for VC14 2015-07-26 23:58:36 +01:00
Daniel Stenberg
29e5cf2a2d RELEASE-NOTES: synced with 0f645adc95 2015-07-26 22:33:17 +02:00
Daniel Stenberg
0f645adc95 test1902: attempt to make the test more reliable
Closes #355
2015-07-26 22:20:26 +02:00
Daniel Stenberg
373b77bca2 comment: fix comment about adding new option support 2015-07-26 14:15:07 +02:00
Jay Satiro
6d62d2c55d build-openssl.bat: Show syntax if required args are missing 2015-07-25 19:03:20 -04:00
Daniel Stenberg
14b9e780d4 TODO: improve how curl works in a windows console window
Closes #322 for now
2015-07-26 00:48:55 +02:00
Daniel Stenberg
8204844f47 1.11 minimize dependencies with dynamicly loaded modules
Closes #349 for now
2015-07-26 00:45:22 +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
Daniel Stenberg
a284b0ebc4 configure: check if OpenSSL linking wants -ldl
To make it easier to link with static versions of OpenSSL, the configure
script now checks if -ldl is needed for linking.

Help-by: TJ Saunders
2015-07-25 10:52:49 +02:00
Michael Kaufmann
c5d060cab4 HTTP: ignore "Content-Encoding: compress"
Currently, libcurl rejects responses with "Content-Encoding: compress"
when CURLOPT_ACCEPT_ENCODING is set to "". I think that libcurl should
treat the Content-Encoding "compress" the same as other
Content-Encodings that it does not support, e.g. "bzip2". That means
just ignoring it.
2015-07-25 00:46:01 +02:00
Marcel Raad
98835eed29 openssl: work around MSVC warning
MSVC 12 complains:

lib\vtls\openssl.c(1554): warning C4701: potentially uninitialized local
variable 'verstr' used It's a false positive, but as it's normally not,
I have enabled warning-as-error for that warning.
2015-07-24 00:12:31 +02:00
Michał Fita
cee21eb6a7 configure: add --disable-rt option
This option disables any attempts in configure to create dependency on
stuff requiring linking to librt.so and libpthread.so, in this case this
means clock_gettime(CLOCK_MONOTONIC, &mt).

We were in need to build curl which doesn't link libpthread.so to avoid
the following bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=16628.
2015-07-24 00:09:29 +02:00
Kamil Dudka
da650c1e54 http2: verify success of strchr() in http2_send()
Detected by Coverity.

Error: NULL_RETURNS:
lib/http2.c:1301: returned_null: "strchr" returns null (checked 103 out of 109 times).
lib/http2.c:1301: var_assigned: Assigning: "hdbuf" = null return value from "strchr".
lib/http2.c:1302: dereference: Incrementing a pointer which might be null: "hdbuf".
1300|
1301|     hdbuf = strchr(hdbuf, 0x0a);
1302|->   ++hdbuf;
1303|
1304|     authority_idx = 0;
2015-07-23 11:51:53 +02:00
Jay Satiro
40c921f8b8 Windows: Fix VerifyVersionInfo calls
- Fix the VerifyVersionInfo calls, which we use to test for the OS major
version, to also test for the minor version as well as the service pack
major and minor versions.

MSDN: "If you are testing the major version, you must also test the
minor version and the service pack major and minor versions."

https://msdn.microsoft.com/en-us/library/windows/desktop/ms725492.aspx

Bug: https://github.com/bagder/curl/pull/353#issuecomment-123493098
Reported-by: Marcel Raad <MarcelRaad@users.noreply.github.com>
2015-07-22 01:55:43 -04:00
Marcel Raad
7a8e861a56 schannel: Replace deprecated GetVersion with VerifyVersionInfo 2015-07-22 01:55:42 -04:00
Steve Holme
ad32457623 makefile: Added support for VC14 2015-07-21 18:52:43 +01:00
Patrick Monnerat
32d4260c2d os400: ebcdic wrappers for new functions. Upgrade ILE/RPG bindings. 2015-07-21 16:36:34 +02:00
Patrick Monnerat
1df8d28381 libcurl: VERSIONINFO update
Addition of new procedures curl_pushheader_bynum and curl_pushheader_byname
requires VERSIONINFO updating.
2015-07-21 14:01:19 +02:00
Patrick Monnerat
fa0eeedf35 http2: satisfy external references even if http2 is not compiled in. 2015-07-21 13:55:39 +02:00
Daniel Stenberg
68d17643f5 http2: add stream != NULL checks for reliability
They should not trigger, but in case of internal problems we at least
avoid crashes this way.
2015-07-20 21:35:15 +02:00
Jay Satiro
aab76af1fa symbols-in-versions: Add new CURLSSLOPT_NO_REVOKE symbol 2015-07-18 15:27:48 -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
Jay Satiro
606b29fe0d runtests: Allow for spaces in curl custom path
.. also fix some typos in test's FILEFORMAT spec.
2015-07-16 22:21:07 -04:00
David Woodhouse
60b19630b0 ntlm_wb: Fix theoretical memory leak
Static analysis indicated that my commit 9008f3d564 ("ntlm_wb: Fix
hard-coded limit on NTLM auth packet size") introduced a potential
memory leak on an error path, because we forget to free the buffer
before returning an error.

Fix this.

Although actually, it never happens in practice because we never *get*
here with state == NTLMSTATE_TYPE1. The state is always zero. That
might want cleaning up in a separate patch.

Reported-by: Terri Oda
2015-07-16 14:22:45 -04:00
Jay Satiro
de74e856e6 strerror: Add CRYPT_E_REVOKED to SSPI error strings 2015-07-15 22:19:20 -04:00
Kamil Dudka
cd20e81e89 libtest: call PR_Cleanup() on exit if NSPR is used
This prevents valgrind from reporting possibly lost memory that NSPR
uses for file descriptor cache and other globally allocated internal
data structures.

Reported-by: Štefan Kremeň
2015-07-14 21:52:33 +02:00
John Malmberg
79416fb2d6 openssl: VMS support for SHA256
setup-vms.h: More symbols for SHA256, hacks for older VAX

openssl.h: Use OpenSSL OPENSSL_NO_SHA256 macro to allow building on VAX.

openssl.c: Use OpenSSL version checks and OPENSSL_NO_SHA256 macro to
allow building on VAX and 64 bit VMS.
2015-07-14 01:25:36 -04:00
Jay Satiro
8f0178a56b examples: Fix typo in multi-single.c 2015-07-11 02:32:53 -04:00
Tatsuhiro Tsujikawa
845b011614 http2: Fix memory leak in push header array 2015-07-07 12:33:41 +02:00
Dan Fandrich
ce1bf87a04 test2041: fixed line endings in protocol part 2015-07-02 08:32:18 +02:00
Dan Fandrich
5602ad721b cyassl: fixed mismatched sha256sum function prototype 2015-07-02 08:29:22 +02:00
moparisthebest
55b78c5ae9 SSL: Pinned public key hash support 2015-07-01 19:43:47 +02:00
Daniel Stenberg
c00b18d540 examples: provide <DESC> sections 2015-07-01 11:43:12 +02:00
John Malmberg
4ed8537be6 OpenVMS: VMS Software, Inc now the supplier.
setup-vms.h: Symbol case fixups submitted by Michael Steve

build_gnv_curl_pcsi_desc.com: VSI aka as VMS Software, is now the
supplier of new versions of VMS.  The install kit needs to accept
VSI as a producer.
2015-07-01 11:15:47 +02:00
Daniel Stenberg
cd2644fe2c gtls: initial work to support HTTPS proxy 2015-07-01 08:46:43 +02:00
Jay Satiro
1c5997ae9d multi: Move http2 push function declarations to header end
This change necessary for binary compatibility.

Prior to this change test 1135 failed due to the order of functions.
2015-07-01 08:46:43 +02:00
Daniel Stenberg
f9087b7499 vtls: moved the new SSL_* access macros to generic header 2015-07-01 08:46:43 +02:00
Daniel Stenberg
7df237b0b1 openssl: remove unused arguments
... that popped up when SSL_IS_PROXY() was modified.
2015-07-01 08:46:39 +02:00
Daniel Stenberg
211b265ffd openssl: fixup the proxy/primary access macros
IS_PROXY_SSL() no longer depend on connect state

IS_PROXY_SSL renamed to SSL_IS_PROXY

SSL_OPTION renamed to SSL_SET_OPTION

SSL_OPTION_PRIM renamed to SSL_CONN_CONFIG
2015-07-01 00:16:40 +02:00
Daniel Stenberg
316054e8cd gtls: access 'CApath' through connectdata
and fix the error message
2015-07-01 00:04:26 +02:00
Jay Satiro
66a5f76583 multi: Move http2 push function declarations to header end
This change necessary for binary compatibility.

Prior to this change test 1135 failed due to the order of functions.
2015-06-30 17:19:21 -04:00
Daniel Stenberg
f7e2cd278a Merge branch 'master' into HTTPS-proxy 2015-06-30 23:06:15 +02:00
Daniel Stenberg
b505df4b68 gnutls: adapted to the internally moved SSL struct 2015-06-30 23:05:48 +02:00
Jay Satiro
616cecfdb6 symbols-in-versions: Add new http2 push symbols
Prior to this change test 1119 failed due to the missing symbols.
2015-06-30 17:03:08 -04:00
Daniel Stenberg
b59f296bf6 RELEASE-NOTES: synced with e6749055d6 2015-06-30 00:45:14 +02:00
Daniel Stenberg
e58bd8e41a Merge branch 'master' into HTTPS-proxy 2015-06-30 00:32:37 +02:00
Daniel Stenberg
e6749055d6 configure: disable libidn by default
For security reasons, until there is a fix.

Bug: http://curl.haxx.se/mail/lib-2015-06/0143.html
Reported-by: Gustavo Grieco, Feist Josselin
2015-06-29 23:17:30 +02:00
Daniel Stenberg
8208dd3b22 SSL-PROBLEMS: mention WinSSL problems in WinXP 2015-06-29 15:03:56 +02:00
Daniel Stenberg
0c46abd79a CODE_OF_CONDUCT.md: added
Just to underscore how we treat each other in this project. Nothing new
really, but could be useful for newcomers and outsiders to see our
values.
2015-06-29 11:35:13 +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
Roger Leigh
e3e06e1aee tests: Distribute CMakeLists.txt files in subdirectories 2015-06-25 07:48:50 -07:00
Daniel Stenberg
37402b5eb8 CURLOPT_FAILONERROR.3: mention that it closes the connection
Reported-by: bemoody
Bug: https://github.com/bagder/curl/issues/325
2015-06-24 15:26:15 -07:00
Alex Rousskov
3d90ec5448 proxy: Support HTTPS proxy and SOCKS+HTTP(s)
HTTPS proxies:

An HTTPS proxy receives all transactions over an SSL/TLS connection. Once a
secure connection with the proxy is established, the user agent uses the proxy
as usual, including sending CONNECT requests to instruct the proxy to establish
a [usually secure] TCP tunnel with an origin server. HTTPS proxies protect
nearly all aspects of user-proxy communications as opposed to HTTP proxies that
receive all requests (including CONNECT requests) in vulnerable clear text.

With HTTPS proxies, it is possible to have two concurrent _nested_ SSL/TLS
sessions: the "outer" one between the user agent and the proxy and the "inner"
one between the user agent and the origin server (through the proxy). This
change adds supports for such nested sessions as well.

The secure connection with the proxy requires its own set of the usual
SSL/TLS-related options (their descriptions need polishing):

  --proxy-cacert FILE        CA certificate to verify peer against
  --proxy-capath DIR         CA directory to verify peer against
  --proxy-cert CERT[:PASSWD] Client certificate file and password
  --proxy-cert-type TYPE     Certificate file type (DER/PEM/ENG)
  --proxy-ciphers LIST       SSL ciphers to use
  --proxy-crlfile FILE       Get a CRL list in PEM format from the given file
  --proxy-insecure           Allow connections to SSL sites without certs
  --proxy-key KEY            Private key file name
  --proxy-key-type TYPE      Private key file type (DER/PEM/ENG)
  --proxy-pass PASS          Pass phrase for the private key
  --proxy-ssl-allow-beast    Allow security flaw to improve interop
  --proxy-sslv2              Use SSLv2
  --proxy-sslv3              Use SSLv3
  --proxy-tlsv1              Use TLSv1
  --proxy-tlsuser USER       TLS username
  --proxy-tlspassword STRING TLS password
  --proxy-tlsauthtype STRING TLS authentication type (default SRP)

All --proxy-foo options are independent from their --foo counterparts, except
--proxy-crlfile defaults to --crlfile and --proxy-capath defaults to --capath.

Curl now also supports %{proxy_ssl_verify_result} --write-out variable,
similar to the existing %{ssl_verify_result} variable.

SOCKS proxy + HTTP/HTTPS proxy combination:

If both --socks* and --proxy options are given, Curl first connects to the
SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy.
2015-06-24 23:59:18 +02:00
Daniel Stenberg
69c77f69a5 curl_multi_setopt.3: alpha sort the options 2015-06-24 14:55:12 -07:00
Daniel Stenberg
dc2cbfda89 curl_multi_setopt.3: add the new push options 2015-06-24 14:52:58 -07:00
Tatsuhiro Tsujikawa
1b5eba8324 http2: Use nghttp2 library error code for error return value 2015-06-24 23:44:42 +02:00
Tatsuhiro Tsujikawa
ddb106d7f6 http2: Harden header validation for curl_pushheader_byname
Since we do prefix match using given header by application code
against header name pair in format "NAME:VALUE", and VALUE part can
contain ":", we have to careful about existence of ":" in header
parameter.  ":" should be allowed to match HTTP/2 pseudo-header field,
and other use of ":" in header must be treated as error, and
curl_pushheader_byname should return NULL.  This commit implements
this behaviour.
2015-06-24 23:44:42 +02:00
Tatsuhiro Tsujikawa
77044b53f7 CURLMOPT_PUSHFUNCTION.3: Remove unused variable 2015-06-24 23:44:42 +02:00
Daniel Stenberg
c712aa0ebe CURLMOPT_PUSHFUNCTION.3: added example 2015-06-24 23:44:42 +02:00
Daniel Stenberg
a384f28ca6 http2: curl_pushheader_byname now takes a const char * 2015-06-24 23:44:42 +02:00
Daniel Stenberg
bf445b6e12 http2-serverpush.c: example code 2015-06-24 23:44:42 +02:00
Daniel Stenberg
a3a55d80ec http2: free all header memory after the push callback 2015-06-24 23:44:42 +02:00
Daniel Stenberg
e9f0dd43bc http2: init the pushed transfer properly 2015-06-24 23:44:42 +02:00
Daniel Stenberg
f65ab8864e http2: fixed the header accessor functions for the push callback 2015-06-24 23:44:42 +02:00
Daniel Stenberg
feea9263e9 http2: setup the new pushed stream properly 2015-06-24 23:44:42 +02:00
Daniel Stenberg
ea7134ac87 http2: initial implementation of the push callback 2015-06-24 23:44:42 +02:00
Daniel Stenberg
70191958b5 http2: initial HTTP/2 server push types/docs 2015-06-24 23:44:42 +02:00
Daniel Stenberg
5156982377 test1531: verify POSTFIELDSIZE set after add_handle
Following the fix made in 903b6e0556.
2015-06-23 17:51:03 -07:00
Daniel Stenberg
903b6e0556 pretransfer: init state.infilesize here, not in add_handle
... to properly support that options are set to the handle after it is
added to the multi handle.

Bug: http://curl.haxx.se/mail/lib-2015-06/0122.html
Reported-by: Stefan Bühler
2015-06-23 17:48:37 -07:00
Lior Kaplan
f44b803f16 tool_help: fix --tlsv1 help text to use >= for TLSv1 2015-06-21 13:33:11 -04:00
Jay Satiro
6842afbf44 INSTALL: Advise use of non-native SSL for Windows <= XP
Advise that WinSSL in versions <= XP will not be able to connect to
servers that no longer support the legacy handshakes and algorithms used
by those versions, and to use an alternate backend like OpenSSL instead.

Bug: https://github.com/bagder/curl/issues/253
Reported-by: zenden2k <zenden2k@gmail.com>
2015-06-20 18:45:25 -04:00
Kamil Dudka
ea1eec8ea8 curl_easy_setopt.3: restore contents removed by mistake
... in commit curl-7_43_0-18-g570076e
2015-06-19 10:07:32 -04:00
Daniel Stenberg
570076e82c curl_easy_setopt.3: mention CURLOPT_PIPEWAIT 2015-06-19 15:47:27 +02:00
Jay Satiro
ef0fdb83b8 cookie: Fix bug in export if any-domain cookie is present
In 3013bb6 I had changed cookie export to ignore any-domain cookies,
however the logic I used to do so was incorrect, and would lead to a
busy loop in the case of exporting a cookie list that contained
any-domain cookies. The result of that is worse though, because in that
case the other cookies would not be written resulting in an empty file
once the application is terminated to stop the busy loop.
2015-06-18 19:37:20 -04:00
Dan Fandrich
1c3811f4fd FTP: fixed compiling with --disable-proxy, broken in b88f980a 2015-06-18 23:20:10 +02: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
Daniel Stenberg
2546134b97 TODO: Support IDNA2008 2015-06-18 16:32:47 +02:00
Viktor Szakats
93aacc3050 Makefile.m32: add support for CURL_LDFLAG_EXTRAS
It is similar to existing CURL_CFLAG_EXTRAS, but for
extra linker option.
2015-06-18 14:43:26 +02:00
Daniel Stenberg
307f212379 RTSP: removed another piece of dead code
Coverity CID 1306668
2015-06-18 14:29:57 +02:00
Daniel Stenberg
26ddc536b0 openssl: fix use of uninitialized buffer
Make sure that the error buffer is always initialized and simplify the
use of it to make the logic easier.

Bug: https://github.com/bagder/curl/issues/318
Reported-by: sneis
2015-06-18 14:20:31 +02:00
Daniel Stenberg
0e7d76d6a8 examples: more descriptions 2015-06-18 11:38:54 +02:00
Daniel Stenberg
26583a62ab examples: add descriptions with <DESC>
Using this fixed format for example descriptions, we can generate a
better list on the web site.
2015-06-18 10:17:02 +02:00
Daniel Stenberg
cf6ef2dc92 libcurl-errors.3: fix typo 2015-06-18 00:17:47 +02:00
Daniel Stenberg
3b93f1a3ec curl_easy_setopt.3: option order doesn't matter 2015-06-18 00:09:46 +02:00
Daniel Stenberg
46d0eba2e9 openssl: fix build with BoringSSL
OPENSSL_load_builtin_modules does not exist in BoringSSL. Regression
from cae43a1
2015-06-18 00:06:46 +02:00
Paul Howarth
4a2398627c openssl: Fix build with openssl < ~ 0.9.8f
The symbol SSL3_MT_NEWSESSION_TICKET appears to have been introduced at
around openssl 0.9.8f, and the use of it in lib/vtls/openssl.c breaks
builds with older openssls (certainly with 0.9.8b, which is the latest
older version I have to try with).
2015-06-17 16:53:34 +02:00
Daniel Stenberg
b88f980a74 FTP: do the HTTP CONNECT for data connection blocking
** WORK-AROUND **

The introduced non-blocking general behaviour for Curl_proxyCONNECT()
didn't work for the data connection establishment unless it was very
fast. The newly introduced function argument makes it operate in a more
blocking manner, more like it used to work in the past. This blocking
approach is only used when the FTP data connecting through HTTP proxy.

Blocking like this is bad. A better fix would make it work more
asynchronously.

Bug: https://github.com/bagder/curl/issues/278
2015-06-17 14:00:12 +02:00
Daniel Stenberg
85739723ba bump: start the journey toward 7.44.0 2015-06-17 13:59:33 +02:00
Jay Satiro
f72b30e6fb CURLOPT_ERRORBUFFER.3: Fix example, escape backslashes 2015-06-17 02:49:14 -04:00
Jay Satiro
52d83cb0c6 CURLOPT_ERRORBUFFER.3: Improve example 2015-06-17 02:25:51 -04:00
Daniel Stenberg
38e07886ed RELEASE-NOTES: 7.43.0 release 2015-06-17 07:44:53 +02:00
Daniel Stenberg
bdf89d80ca THANKS: updated with 7.43.0 names 2015-06-17 07:43:13 +02:00
Kamil Dudka
24a8359b25 http: do not leak basic auth credentials on re-used connections
CVE-2015-3236

This partially reverts commit curl-7_39_0-237-g87c4abb

Reported-by: Tomas Tomecek, Kamil Dudka
Bug: http://curl.haxx.se/docs/adv_20150617A.html
2015-06-17 07:43:13 +02:00
Kamil Dudka
24f0b6ebf7 test2040: verify basic auth on re-used connections 2015-06-17 07:43:13 +02:00
Daniel Stenberg
50c7f17e50 SMB: rangecheck values read off incoming packet
CVE-2015-3237

Detected by Coverity. CID 1299430.

Bug: http://curl.haxx.se/docs/adv_20150617B.html
2015-06-17 07:43:13 +02:00
Jay Satiro
3e7ec1e849 schannel: schannel_recv overhaul
This commit is several drafts squashed together. The changes from each
draft are noted below. If any changes are similar and possibly
contradictory the change in the latest draft takes precedence.

Bug: https://github.com/bagder/curl/issues/244
Reported-by: Chris Araman

%%
%% Draft 1
%%
- return 0 if len == 0. that will have to be documented.
- continue on and process the caches regardless of raw recv
- if decrypted data will be returned then set the error code to CURLE_OK
and return its count
- if decrypted data will not be returned and the connection has closed
(eg nread == 0) then return 0 and CURLE_OK
- if decrypted data will not be returned and the connection *hasn't*
closed then set the error code to CURLE_AGAIN --only if an error code
isn't already set-- and return -1
- narrow the Win2k workaround to only Win2k

%%
%% Draft 2
%%
- Trying out a change in flow to handle corner cases.

%%
%% Draft 3
%%
- Back out the lazier decryption change made in draft2.

%%
%% Draft 4
%%
- Some formatting and branching changes
- Decrypt all encrypted cached data when len == 0
- Save connection closed state
- Change special Win2k check to use connection closed state

%%
%% Draft 5
%%
- Default to CURLE_AGAIN in cleanup if an error code wasn't set and the
connection isn't closed.

%%
%% Draft 6
%%
- Save the last error only if it is an unrecoverable error.

Prior to this I saved the last error state in all cases; unfortunately
the logic to cover that in all cases would lead to some muddle and I'm
concerned that could then lead to a bug in the future so I've replaced
it by only recording an unrecoverable error and that state will persist.

- Do not recurse on renegotiation.

Instead we'll continue on to process any trailing encrypted data
received during the renegotiation only.

- Move the err checks in cleanup after the check for decrypted data.

In either case decrypted data is always returned but I think it's easier
to understand when those err checks come after the decrypted data check.

%%
%% Draft 7
%%
- Regardless of len value go directly to cleanup if there is an
unrecoverable error or a close_notify was already received. Prior to
this change we only acknowledged those two states if len != 0.

- Fix a bug in connection closed behavior: Set the error state in the
cleanup, because we don't know for sure it's an error until that time.

- (Related to above) In the case the connection is closed go "greedy"
with the decryption to make sure all remaining encrypted data has been
decrypted even if it is not needed at that time by the caller. This is
necessary because we can only tell if the connection closed gracefully
(close_notify) once all encrypted data has been decrypted.

- Do not renegotiate when an unrecoverable error is pending.

%%
%% Draft 8
%%
- Don't show 'server closed the connection' info message twice.

- Show an info message if server closed abruptly (missing close_notify).
2015-06-17 00:17:03 -04:00
Paul Oliver
28f4fc5272 Fix typo in docs
s/curret/current/
2015-06-16 12:16:55 +02:00
Viktor Szakats
45f21e0f37 docs: update URLs 2015-06-16 09:08:00 +02:00
Daniel Stenberg
f93da27756 RELEASE-NOTES: synced with f29f2cbd00 2015-06-16 09:07:37 +02:00
Viktor Szakats
f29f2cbd00 README: use secure protocol for Git repository 2015-06-15 23:45:34 +02:00
Viktor Szakats
4fd187c677 HTTP2.md: use SSL/TLS IETF URLs 2015-06-15 11:39:41 +02:00
Viktor Szakats
496e96c242 LICENSE-MIXING: update URLs
* use SSL/TLS where available
* follow permanent redirects
2015-06-15 11:37:55 +02:00
Daniel Stenberg
bb5b29ec14 LICENSE-MIXING: refreshed 2015-06-15 10:57:43 +02:00
Daniel Stenberg
75ba107767 curl_easy_duphandle: see also *reset 2015-06-15 10:37:38 +02:00
Daniel Stenberg
b430cb2a58 rtsp_do: fix DEAD CODE
"At condition p_request, the value of p_request cannot be NULL."

Coverity CID 1306668.
2015-06-15 09:05:07 +02:00
Daniel Stenberg
99eafc49bb security:choose_mech fix DEAD CODE warning
... by removing the "do {} while (0)" block.

Coverity CID 1306669
2015-06-15 09:02:46 +02:00
Daniel Stenberg
45bad4ac97 curl.1: netrc is in man section 5 2015-06-15 08:28:42 +02:00
Daniel Stenberg
f3288196ff curl.1: small format fix
use \fI-style instead of .BR for references
2015-06-15 08:26:37 +02:00
Daniel Stenberg
ff7097f72c urldata: store POST size in state.infilesize too
... to simplify checking when PUT _or_ POST have completed.

Reported-by: Frank Meier
Bug: http://curl.haxx.se/mail/lib-2015-06/0019.html
2015-06-14 23:31:01 +02:00
Dan Fandrich
55fc47a401 test1530: added http to required features 2015-06-14 22:38:39 +02:00
Drake Arconis
d186be9510 build: Fix typo from OpenSSL 1.0.2 version detection fix 2015-06-14 16:01:18 -04:00
Drake Arconis
878c5757c0 build: Properly detect OpenSSL 1.0.2 when using configure 2015-06-14 15:15:36 -04:00
Jay Satiro
dd39a67101 curl_multi_info_read.3: fix example formatting 2015-06-13 23:25:53 -04:00
Daniel Stenberg
da08a204c2 BINDINGS: there's a new R binding in town! 2015-06-13 23:10:23 +02:00
Daniel Stenberg
a9ed0fd6cb BINDINGS: added the Xojo binding 2015-06-11 23:33:49 +02:00
Joel Depooter
a3e5a4371b schannel: Add support for optional client certificates
Some servers will request a client certificate, but not require one.
This change allows libcurl to connect to such servers when using
schannel as its ssl/tls backend. When a server requests a client
certificate, libcurl will now continue the handshake without one,
rather than terminating the handshake. The server can then decide
if that is acceptable or not. Prior to this change, libcurl would
terminate the handshake, reporting a SEC_I_INCOMPLETE_CREDENTIALS
error.
2015-06-11 15:53:01 -04:00
Daniel Stenberg
4a7feea31a curl_easy_cleanup.3: provide more SEE ALSO 2015-06-11 08:32:11 +02:00
Daniel Stenberg
8d0d688296 debug: remove http2 debug leftovers 2015-06-10 23:16:37 +02:00
Daniel Stenberg
a5fb9151ee VERSIONS: now using markdown 2015-06-10 00:21:06 +02:00
Daniel Stenberg
f348b2d3bc RELEASE-PROCEDURE: remove ascii logo at the top of file 2015-06-10 00:16:48 +02:00
Daniel Stenberg
1514f3506b INTERNALS: absorbed docs/LIBCURL-STRUCTS 2015-06-10 00:11:54 +02:00
Daniel Stenberg
55f3eb588d INTERNALS: cat lib/README* >> INTERNALS
and a conversion to markdown. Removed the lib/README.* files. The idea
being to move toward having INTERNALS as the one and only "book" of
internals documentation.

Added a TOC to top of the document.
2015-06-09 23:57:22 +02:00
Jay Satiro
cbf2920d02 openssl: LibreSSL and BoringSSL do not use TLS_client_method
Although OpenSSL 1.1.0+ deprecated SSLv23_client_method in favor of
TLS_client_method LibreSSL and BoringSSL didn't and still use
SSLv23_client_method.

Bug: https://github.com/bagder/curl/commit/49a6642#commitcomment-11578009
Reported-by: asavah@users.noreply.github.com
2015-06-08 23:45:26 -04:00
Daniel Stenberg
0fcfe4d7ac RELEASE-NOTES: synced with 20ac345806 2015-06-09 00:33:23 +02:00
Daniel Stenberg
20ac345806 CURLOPT_OPENSOCKETFUNCTION: return error at once
When CURL_SOCKET_BAD is returned in the callback, it should be treated
as an error (CURLE_COULDNT_CONNECT) if no other socket is subsequently
created when trying to connect to a server.

Bug: http://curl.haxx.se/mail/lib-2015-06/0047.html
2015-06-09 00:22:02 +02:00
Daniel Stenberg
eaeeed2e8f fopen.c: fix a few compiler warnings 2015-06-08 13:47:33 +02:00
Ville Skyttä
56b7663f73 docs: Spelling fixes 2015-06-08 13:43:31 +02:00
Ville Skyttä
025dbe46df docs: man page indentation and syntax fixes 2015-06-08 13:37:14 +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
Jay Satiro
b8673bb9f0 openssl: Fix verification of server-sent legacy intermediates
- Try building a chain using issuers in the trusted store first to avoid
problems with server-sent legacy intermediates.

Prior to this change server-sent legacy intermediates with missing
legacy issuers would cause verification to fail even if the client's CA
bundle contained a valid replacement for the intermediate and an
alternate chain could be constructed that would verify successfully.

https://rt.openssl.org/Ticket/Display.html?id=3621&user=guest&pass=guest
2015-06-07 23:33:32 -04:00
Daniel Stenberg
8f4791440a BINDINGS: update several URLs
Stop linking to the curl.haxx.se anchor pages, they are usually only
themselves pointers to the real page so better point there directly
instead.
2015-06-05 09:15:40 +02:00
Daniel Stenberg
6befade68f BINDINGS: the curl-rust binding 2015-06-05 08:55:19 +02:00
Daniel Stenberg
3587da9e7c curl.h: add CURL_HTTP_VERSION_2
The protocol is named "HTTP/2" after all. It is an alias for the
existing CURL_HTTP_VERSION_2_0 enum.
2015-06-05 08:26:47 +02:00
Daniel Stenberg
1ce14037c0 openssl: removed error string #ifdef
ERR_error_string_n() was introduced in 0.9.6, no need to #ifdef anymore
2015-06-05 00:12:56 +02:00
Daniel Stenberg
30bd59ba6e openssl: removed USERDATA_IN_PWD_CALLBACK kludge
Code for OpenSSL 0.9.4 serves no purpose anymore!
2015-06-05 00:11:32 +02:00
Daniel Stenberg
ccfdd5986c openssl: remove SSL_get_session()-using code
It was present for OpenSSL 0.9.5 code but we only support 0.9.7 or
later.
2015-06-05 00:09:25 +02:00
Daniel Stenberg
fc16d9cec8 openssl: remove dummy callback use from SSL_CTX_set_verify()
The existing callback served no purpose.
2015-06-05 00:02:17 +02:00
Daniel Stenberg
7c17b58eec LIBCURL-STRUCTS: clarify for multiplexing 2015-06-04 22:43:54 +02:00
Jay Satiro
3013bb6b1c cookie: Stop exporting any-domain cookies
Prior to this change any-domain cookies (cookies without a domain that
are sent to any domain) were exported with domain name "unknown".

Bug: https://github.com/bagder/curl/issues/292
2015-06-03 21:48:47 -04:00
Daniel Stenberg
001ab7d860 RELEASE-PROCEDURE: refreshed 'coming dates' 2015-06-03 14:44:04 +02:00
Jay Satiro
59432503c0 curl_setup: Change fopen text macros to use 't' for MSDOS
Bug: https://github.com/bagder/curl/pull/258#issuecomment-107915198
Reported-by: Gisle Vanem
2015-06-02 14:04:00 -04:00
Daniel Stenberg
f6af9aef7e curl_multi_timeout.3: added example 2015-06-02 12:18:10 +02:00
Daniel Stenberg
46a050e9f5 curl_multi_perform.3: added example 2015-06-02 12:13:23 +02:00
Daniel Stenberg
3cac8c9049 curl_multi_info_read.3: added example 2015-06-02 12:01:39 +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
Daniel Stenberg
3bbcb4b036 curl_getdate.3: update RFC reference 2015-06-01 15:04:40 +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
9f5dcab83d http2-upload.c: use PIPEWAIT for playing HTTP/2 better 2015-06-01 08:46:18 +02:00
Daniel Stenberg
41db5aed7a http2-download: check for CURLPIPE_MULTIPLEX properly
Bug: http://curl.haxx.se/mail/lib-2015-06/0001.html
Reported-by: Rafayel Mkrtchyan
2015-06-01 08:45:30 +02:00
Isaac Boukris
4bb815a32e HTTP-NTLM: fail auth on connection close instead of looping
Bug: https://github.com/bagder/curl/issues/256
2015-05-31 23:21:15 +02:00
Daniel Stenberg
4e7c3c12d3 5.6 Refuse "downgrade" redirects 2015-05-31 00:39:19 +02:00
Daniel Stenberg
9a0a16a61c README.pingpong: removed 2015-05-31 00:20:22 +02:00
Daniel Stenberg
2f1eae0f27 ROADMAP: remove HTTP/2 multiplexing - its here now 2015-05-30 12:09:22 +02:00
Daniel Stenberg
3628a90852 HTTP2.md: formatted properly 2015-05-30 12:07:39 +02:00
Daniel Stenberg
a8904b39f3 HTTP2: moved docs into docs/ and make it markdown 2015-05-30 11:55:33 +02:00
Daniel Stenberg
8a7c1c76b3 README.http2: refreshed and added multiplexing info 2015-05-30 11:53:24 +02:00
Daniel Stenberg
f348a6b4ab dist: add the http2 examples 2015-05-28 16:04:13 +02:00
Daniel Stenberg
d1b1d782f5 http2 examples: clean up some comments 2015-05-28 16:04:00 +02:00
Daniel Stenberg
e57f08863a examples: added two programs doing multiplexed HTTP/2 2015-05-28 15:58:34 +02:00
Daniel Stenberg
44fe4b9029 scripts: moved contributors.sh and contrithanks.sh into subdir 2015-05-27 16:10:08 +02:00
Daniel Stenberg
9972666b47 RELEASE-NOTES: synced with c005790ff1 2015-05-27 14:48:59 +02:00
Daniel Melani
c005790ff1 openssl: typo in comment 2015-05-27 11:31:48 +02:00
Jay Satiro
49a6642f01 openssl: Use TLS_client_method for OpenSSL 1.1.0+
SSLv23_client_method is deprecated starting in OpenSSL 1.1.0. The
equivalent is TLS_client_method.

https://github.com/openssl/openssl/commit/13c9bb3#diff-708d3ae0f2c2973b272b811315381557
2015-05-27 01:30:30 -04:00
Daniel Stenberg
f81d356c21 FAQ: How do I port libcurl to my OS? 2015-05-26 19:13:40 +02:00
Jay Satiro
b18a1654c1 CURLOPT_COOKIELIST.3: Explain Set-Cookie without a domain
Document that if Set-Cookie is used without a domain then the cookie is
sent for any domain and will not be modified.

Bug: http://curl.haxx.se/mail/lib-2015-05/0137.html
Reported-by: Alexander Dyagilev
2015-05-25 17:27:53 -04:00
Tatsuhiro Tsujikawa
02dfc930b5 http2: Copy data passed in Curl_http2_switched into HTTP/2 connection buffer
Previously, after seeing upgrade to HTTP/2, we feed data followed by
upgrade response headers directly to nghttp2_session_mem_recv() in
Curl_http2_switched().  But it turns out that passed buffer, mem, is
part of stream->mem, and callbacks called by
nghttp2_session_mem_recv() will write stream specific data into
stream->mem, overwriting input data.  This will corrupt input, and
most likely frame length error is detected by nghttp2 library.  The
fix is first copy the passed data to HTTP/2 connection buffer,
httpc->inbuf, and call nghttp2_session_mem_recv().
2015-05-25 23:07:49 +02:00
Jay Satiro
96c0164b88 CURLOPT_COOKIE.3: Explain that the cookies won't be modified
The CURLOPT_COOKIE doc says it "sets the cookie header explicitly in the
outgoing request(s)." However there seems to be some user confusion
about cookie modification. Document that the cookies set by this option
are not modified by the cookie engine.

Bug: http://curl.haxx.se/mail/lib-2015-05/0115.html
Reported-by: Alexander Dyagilev
2015-05-24 19:01:13 -04:00
Jay Satiro
4bef1c7bf4 CURLOPT_COOKIELIST.3: Add example 2015-05-24 15:39:49 -04:00
Dan Fandrich
4a79475b13 testcurl.pl: use rel2abs to make the source directory absolute
This function makes a platform-specific absolute path which uses
backslashes on Windows. This form works when passing it on the
command-line, as well as if the source is on another drive.
2015-05-24 12:09:34 +02:00
Dan Fandrich
b6e3da5f08 conncache: fixed memory leak on OOM (torture tests) 2015-05-24 11:19:07 +02:00
Daniel Stenberg
28cdc0d82c perl: remove subdir, not touched in 9 years 2015-05-24 00:54:55 +02:00
Daniel Stenberg
3a973517a9 log2changes.pl: moved to scripts/ 2015-05-24 00:09:23 +02:00
Alessandro Ghedini
f9f22b0d63 scripts: add zsh.pl for generating zsh completion 2015-05-24 00:03:14 +02:00
Dan Fandrich
ef02da3156 test1510: another flaky test 2015-05-23 16:28:09 +02:00
Daniel Stenberg
e582cd16ff security: fix "Unchecked return value" from sscanf()
By (void) prefixing it and adding a comment. Did some minor related
cleanups.

Coverity CID 1299423.
2015-05-22 16:52:41 +02:00
Daniel Stenberg
1514977bcd security: simplify choose_mech
Coverity CID 1299424 identified dead code because of checks that could
never equal true (if the mechanism's name was NULL).

Simplified the function by removing a level of pointers and removing the
loop and array that weren't used.
2015-05-22 16:46:01 +02:00
Daniel Stenberg
fda0e74c22 RTSP: catch attempted unsupported requests better
Replace use of assert with code that properly catches bad input at
run-time even in non-debug builds.

This flaw was sort of detected by Coverity CID 1299425 which claimed the
"case RTSPREQ_NONE" was dead code.
2015-05-22 16:32:42 +02:00
Daniel Stenberg
03e2a9b023 share_init: fix OOM crash
A failed calloc() would lead to NULL pointer use.

Coverity CID 1299427.
2015-05-22 16:26:14 +02:00
Daniel Stenberg
817323ed82 parse_proxy: switch off tunneling if non-HTTP proxy
non-HTTP proxy implies not using CURLOPT_HTTPPROXYTUNNEL

Bug: http://curl.haxx.se/mail/lib-2015-05/0056.html
Reported-by: Sean Boudreau
2015-05-22 16:19:53 +02: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
Daniel Stenberg
84d811f6af http2: on_frame_recv: return early on stream 0
Coverity CID 1299426 warned about possible NULL dereference otherwise,
but that would only ever happen if we get invalid HTTP/2 data with
frames for stream 0. Avoid this risk by returning early when stream 0 is
used.
2015-05-22 15:17:16 +02:00
Daniel Stenberg
d04bab8873 http: removed self assignment
Follow-up fix from b0143a2a33

Detected by coverity. CID 1299429
2015-05-22 09:57:16 +02:00
Tatsuhiro Tsujikawa
640f283bbb http2: Make HTTP Upgrade work
This commit just add implicitly opened stream 1 to streams hash.
2015-05-22 09:31:19 +02:00
Jay Satiro
995c6006fe strerror: Change SEC_E_ILLEGAL_MESSAGE description
Prior to this change the description for SEC_E_ILLEGAL_MESSAGE was OS
and language specific, and invariably translated to something not very
helpful like: "The message received was unexpected or badly formatted."

Bug: https://github.com/bagder/curl/issues/267
Reported-by: Michael Osipov
2015-05-22 02:30:38 -04:00
Jay Satiro
78ac944dc2 telnet: Fix read-callback change for Windows builds
Refer to b0143a2 for more information on the read-callback change.
2015-05-21 23:26:32 -04:00
Daniel Stenberg
ee04c20b74 CURLOPT_HTTPPROXYTUNNEL.3: only works with a HTTP proxy! 2015-05-21 14:17:17 +02:00
Dan Fandrich
126e7f7253 testcurl.pl: allow source to be in an arbitrary directory
This way, the build directory can be located on an entirely different
filesystem from the source code (e.g. a tmpfs).
2015-05-21 09:14:40 +02:00
Daniel Stenberg
b0143a2a33 read_callback: move to SessionHandle from connectdata
With many easy handles using the same connection for multiplexing, it is
important we store and keep the transfer-oriented stuff in the
SessionHandle so that callbacks and callback data work fine even when
many easy handles share the same physical connection.
2015-05-20 23:06:45 +02:00
Daniel Stenberg
6a688976f0 http2: show stream IDs in decimal
It makes them easier to match output from the nghttpd test server.
2015-05-20 23:06:29 +02:00
Tatsuhiro Tsujikawa
c175d184a2 http2: Faster http2 upload
Previously, when we send all given buffer in data_source_callback, we
return NGHTTP2_ERR_DEFERRED, and nghttp2 library removes this stream
temporarily for writing.  This itself is good.  If this is the sole
stream in the session, nghttp2_session_want_write() returns zero,
which means that libcurl does not check writeability of the underlying
socket.  This leads to very slow upload, because it seems curl only
upload 16k something per 1 second.  To fix this, if we still have data
to send, call nghttp2_session_resume_data after nghttp2_session_send.
This makes nghttp2_session_want_write() returns nonzero (if connection
window still opens), and as a result, socket writeability is checked,
and upload speed becomes normal.
2015-05-20 22:43:37 +02:00
Dmitry Eremin-Solenikov
d5aab55b33 gtls: don't fail on non-fatal alerts during handshake
Stop curl from failing when non-fatal alert is received during
handshake.  This e.g. fixes lots of problems when working with https
sites through proxies.
2015-05-20 22:41:30 +02:00
Daniel Stenberg
0f6f7c100a curl_easy_unescape.3: update RFC reference
Reported-by: bsammon
Bug: https://github.com/bagder/curl/issues/282
2015-05-20 08:21:27 +02:00
Jay Satiro
db979fea73 CURLOPT_POSTFIELDS.3: Mention curl_easy_escape
.. also correct some variable naming in curl_easy_escape.3

Bug: https://github.com/bagder/curl/issues/281
Reported-by: bsammon@users.noreply.github.com
2015-05-20 01:48:31 -04:00
Brian Prodoehl
a393d64456 openssl: Use SSL_CTX_set_msg_callback and SSL_CTX_set_msg_callback_arg
BoringSSL removed support for direct callers of SSL_CTX_callback_ctrl
and SSL_CTX_ctrl, so move to a way that should work on BoringSSL and
OpenSSL.

re #275
2015-05-19 22:54:42 +02:00
Jay Satiro
265f83a9f0 curl.1: fix missing space in section --data 2015-05-19 15:43:40 -04:00
Daniel Stenberg
301ba7772c transfer: remove erroneous and misleading comment 2015-05-19 14:00:19 +02:00
Kamil Dudka
00a770b3f5 http: silence compile-time warnings without USE_NGHTTP2
Error: CLANG_WARNING:
lib/http.c:173:16: warning: Value stored to 'http' during its initialization is never read

Error: COMPILER_WARNING:
lib/http.c: scope_hint: In function ‘http_disconnect’
lib/http.c:173:16: warning: unused variable ‘http’ [-Wunused-variable]
2015-05-19 12:53:30 +02:00
Jay Satiro
dd23c49546 transfer: Replace __func__ instances with function name
.. also make __func__ replacement in multi.

Prior to this change debug builds would fail to build if the compiler
was building pre-c99 and didn't support __func__.
2015-05-19 02:23:55 -04:00
Viktor Szakats
3d38a38012 build: bump version in default nghttp2 paths 2015-05-19 07:42:16 +02:00
Daniel Stenberg
d4313b1f01 INTERNALS: we require nghttp2 1.0.0+ now 2015-05-19 07:42:16 +02:00
Jay Satiro
7da064fdd2 http: Add some include guards for the new HTTP/2 stuff 2015-05-18 20:53:58 -04:00
Daniel Stenberg
897a7b3a13 http2: store upload state per stream
Use a curl_off_t for upload left
2015-05-18 15:41:43 +02:00
Daniel Stenberg
155b1f5df9 http2: fix build when NOT h2-enabled 2015-05-18 14:09:32 +02:00
Daniel Stenberg
979670988a http2: switch to use Curl_hash_destroy()
as after 4883f7019d, the *_clean() function only flushes the hash.
2015-05-18 11:41:16 +02:00
Daniel Stenberg
0b26b94bdc curlver: restore LIBCURL_VERSION_NUM defined as a full number
As it breaks configure, curl-config and test 1023 if not.
2015-05-18 11:29:06 +02:00
Anthony Avina
4883f7019d hostip: fix unintended destruction of hash table
.. and added unit1602 for hash.c
2015-05-18 11:15:43 +02:00
Daniel Stenberg
39b9bf60d1 curlver: introducing new version number (checking) macros 2015-05-18 11:09:13 +02:00
Daniel Stenberg
d69eee0964 runtests.pl: use 'h2c' now, no -14 anymore 2015-05-18 10:10:55 +02:00
Tatsuhiro Tsujikawa
7ff7e45405 http2: Ignore if we have stream ID not in hash in on_stream_close
We could get stream ID not in the hash in on_stream_close.  For
example, if we decided to reject stream (e.g., PUSH_PROMISE), then we
don't create stream and store it in hash with its stream ID.
2015-05-18 09:33:48 +02:00
Tatsuhiro Tsujikawa
4ac6cc3ebd Require nghttp2 v1.0.0
This commit requires nghttp2 v1.0.0 to compile, and migrate to v1.0.0,
and utilize recent version of nghttp2 to simplify the code,

First we use nghttp2_option_set_no_recv_client_magic function to
detect nghttp2 v1.0.0.  That function only exists since v1.0.0.

Since nghttp2 v0.7.5, nghttp2 ensures header field ordering, and
validates received header field.  If it found error, RST_STREAM with
PROTOCOL_ERROR is issued.  Since we require v1.0.0, we can utilize
this feature to simplify libcurl code.  This commit does this.

Migration from 0.7 series are done based on nghttp2 migration
document.  For libcurl, we removed the code sending first 24 bytes
client magic.  It is now done by nghttp2 library.
on_invalid_frame_recv callback signature changed, and is updated
accordingly.
2015-05-18 09:33:48 +02:00
Daniel Stenberg
077f12b0ae http2: infof length in on_frame_send() 2015-05-18 09:33:48 +02:00
Daniel Stenberg
d6f1c74330 pipeline: switch some code over to functions
... to "compartmentalize" a bit and make it easier to change behavior
when multiplexing is used instead of good old pipelining.
2015-05-18 09:33:47 +02:00
Daniel Stenberg
7d0df07e48 symbols-in-versions: add CURLOPT_PIPEWAIT 2015-05-18 09:33:47 +02:00
Daniel Stenberg
811443754a CURLOPT_PIPEWAIT: added
By setting this option to 1 libcurl will wait for a connection to reveal
if it is possible to pipeline/multiplex on before it continues.
2015-05-18 09:33:47 +02:00
Daniel Stenberg
df3a970cb4 Curl_http_readwrite_headers: minor code simplification 2015-05-18 09:33:47 +02:00
Daniel Stenberg
193251794a IsPipeliningPossible: fixed for http2 2015-05-18 09:33:47 +02:00
Daniel Stenberg
8b38fcf2f6 http2: bump the h2 buffer size to 32K for speed 2015-05-18 09:33:47 +02:00
Daniel Stenberg
5871affc7a http2: remove the stream from the hash in stream_close callback
... and suddenly things work much better!
2015-05-18 09:33:47 +02:00
Daniel Stenberg
3e8a5d88a5 http2: if there is paused data, do not clear the drain field 2015-05-18 09:33:47 +02:00
Daniel Stenberg
522ca8c035 http2: rename s/data/pausedata 2015-05-18 09:33:47 +02:00
Daniel Stenberg
a66ed407d2 http2: "stream %x" in all outputs to make it easier to search for 2015-05-18 09:33:47 +02:00
Daniel Stenberg
61a94d6f77 http2: Curl_expire() all handles with incoming traffic
... so that they'll get handled next in the multi loop.
2015-05-18 09:33:47 +02:00
Daniel Stenberg
56c362b1a7 http2: don't signal settings change for same values 2015-05-18 09:33:47 +02:00
Daniel Stenberg
72105ebf05 http2: set default concurrency, fix ConnectionExists for multiplex 2015-05-18 09:33:47 +02:00
Daniel Stenberg
38bd6bf0bb bundles: store no/default/pipeline/multiplex
to allow code to act differently on the situation.

Also added some more info message for the connection re-use function to
make it clearer when connections are not re-used.
2015-05-18 09:33:36 +02:00
Daniel Stenberg
be4c8fd1ef http2: lazy init header_recvbuf
It makes us use less memory when not doing HTTP/2 and subsequently also
makes us not have to cleanup HTTP/2 related data when not using HTTP/2!
2015-05-18 08:57:18 +02:00
Daniel Stenberg
783b3c7b42 http2: separate multiplex/pipelining + cleanup memory leaks 2015-05-18 08:57:18 +02:00
Daniel Stenberg
02ec1ced9b CURLMOPT_PIPELINE: bit 1 is for multiplexing 2015-05-18 08:57:18 +02:00
Tatsuhiro Tsujikawa
2ce2f03007 http2: Fix bug that data to be drained are overwritten by pending "paused" data 2015-05-18 08:57:18 +02:00
Tatsuhiro Tsujikawa
d722138f29 http2: Don't call nghttp2_session_mem_recv while it is paused by a stream 2015-05-18 08:57:18 +02:00
Tatsuhiro Tsujikawa
0dc0de0351 http2: Read data left in connection buffer after pause
Previously when we do pause because of out of buffer, we just throw
away unread data in connection buffer.  This just broke protocol
framing, and I saw occasional FRAME_SIZE_ERROR.  This commit fix this
issue by remembering how much data read, and in the next iteration, we
process remaining data.
2015-05-18 08:57:18 +02:00
Tatsuhiro Tsujikawa
d261652d42 http2: Fix streams get stuck
This commit fixes the bug that streams get stuck if stream gets some
DATA, and stream->closed becomes true at the same time.  Previously,
in this condition, after we processed DATA, we are going to try to
read data from underlying transport, but there is no data, and gets
EAGAIN.  There was no code path to evaludate stream->closed.
2015-05-18 08:57:18 +02:00
Daniel Stenberg
74a4bd5ecd http2: store incoming h2 SETTINGS 2015-05-18 08:57:18 +02:00
Daniel Stenberg
591a6933da pipeline: move function to pipeline.c and make static
... as it was only used from there.
2015-05-18 08:57:18 +02:00
Daniel Stenberg
e91aedd840 IsPipeliningPossible: http2 can always "pipeline" (multiplex) 2015-05-18 08:57:18 +02:00
Daniel Stenberg
ee3ad233a2 http2: remove debug logging from on_frame_recv 2015-05-18 08:57:18 +02:00
Daniel Stenberg
70b5b698b0 http2: remove the closed check in http2_recv
With the "drained" functionality we can get here slightly asynchronously
so the stream have have been closed but there is pending data left to
read.
2015-05-18 08:57:18 +02:00
Daniel Stenberg
a28734be09 http2: bump the h2 buffer to 8K 2015-05-18 08:57:18 +02:00
Daniel Stenberg
5252f13dfa http2: Curl_read should not use the single buffer
... as it does for pipelining when we're multiplexing, as we need the
different buffers to store incoming data correctly for all streams.
2015-05-18 08:57:18 +02:00
Daniel Stenberg
153f940198 http2: more debug outputs 2015-05-18 08:57:18 +02:00
Daniel Stenberg
f4b8b39881 http2: leave WAITPERFORM when conn is multiplexed
No need to wait for our "spot" like for pipelining
2015-05-18 08:57:18 +02:00
Daniel Stenberg
01e1bdb10c http2: force "drainage" of streams
... which is necessary since the socket won't be readable but there is
data waiting in the buffer.
2015-05-18 08:57:17 +02:00
Daniel Stenberg
7bbac214f5 http2: move the mem+len pair to the stream struct 2015-05-18 08:57:17 +02:00
Daniel Stenberg
84c6b6561f http2: more stream-oriented data, stream ID 0 is for connections 2015-05-18 08:57:17 +02:00
Daniel Stenberg
2c238ea1fc http2: move lots of state data to the 'stream' struct
... from the connection struct. The stream one being the 'struct HTTP'
which is kept in the SessionHandle struct (easy handle).

lookup streams for incoming frames in the stream hash, hashing is based
on the stream id and we get the SessionHandle for the incoming stream
that way.
2015-05-18 08:57:17 +02:00
Daniel Stenberg
5fe71975e4 HTTP: partial start at fixing up hash-lookups on http2 frame receival 2015-05-18 08:57:17 +02:00
Daniel Stenberg
77f1029ecd http: a stream hash for h2 multiplexing 2015-05-18 08:57:17 +02:00
Daniel Stenberg
7957d2eb92 http: a stream hash for h2 multiplexing 2015-05-18 08:57:17 +02:00
Daniel Stenberg
47caff7bdf http2: debug log when receiving unexpected stream_id 2015-05-18 08:54:54 +02:00
Daniel Stenberg
d6440d7366 http2: move stream_id to the HTTP struct (per-stream) 2015-05-18 08:54:54 +02:00
Daniel Stenberg
f858624052 Curl_http2_setup: only do it once and enable multiplex on the server
Once we know we are HTTP/2 enabled we know the server can multiplex.
2015-05-18 08:54:54 +02:00
Daniel Stenberg
6e6b02f398 http: switch on "pipelining" (multiplexing) for HTTP/2 servers
... and do not blacklist any.
2015-05-18 08:54:54 +02:00
Daniel Stenberg
5fa82ca56f README.pipelining: removed
All the details mentioned here are better documented in man pages
2015-05-15 22:34:12 +02:00
Dan Fandrich
1c01cee601 build: removed bundles.c from make files
This file was removed in commit fd137786
2015-05-14 14:55:48 +02:00
Daniel Stenberg
750d678c0e Curl_conncache_add_conn: fix memory leak on OOM 2015-05-14 14:06:44 +02:00
Daniel Stenberg
a6af3df660 CURLMOPT_MAX_HOST_CONNECTIONS: host = host name + port number 2015-05-12 23:47:01 +02:00
Daniel Stenberg
2a746f6c28 conncache: keep bundles on host+port bases, not only host names
Previously we counted all connections to a specific host name and that
would be used for the CURLMOPT_MAX_HOST_CONNECTIONS check for example,
while servers on different port numbers are normally considered
different "origins" on the web and should thus be considered different
hosts.
2015-05-12 23:40:10 +02:00
Daniel Stenberg
fd137786e5 bundles: merged into conncache.c
All the existing Curl_bundle* functions were only ever used from within
the conncache.c file, so I moved them over and made them static (and
removed the Curl_ prefix).
2015-05-12 23:21:33 +02:00
Daniel Stenberg
b419e7ae0c hostcache: made all host caches use structs, not pointers
This avoids unnecessary dynamic allocs and as this also removed the last
users of *hash_alloc() and *hash_destroy(), those two functions are now
removed.
2015-05-12 09:46:53 +02:00
Daniel Stenberg
d37e0160c2 multi: converted socket hash into non-allocated struct
avoids extra dynamic allocation
2015-05-12 09:28:37 +02:00
Daniel Stenberg
640296c95d connection cache: avoid Curl_hash_alloc()
... by using plain structs instead of pointers for the connection cache,
we can avoid several dynamic allocations that weren't necessary.
2015-05-12 09:15:02 +02:00
Daniel Stenberg
c4d6f9163a proxy: add newline to info message 2015-05-08 15:56:25 +02:00
Patrick Monnerat
c720cd6356 FTP: fix dangling conn->ip_addr dereference on verbose EPSV. 2015-05-08 15:28:48 +02:00
Patrick Monnerat
3377e692ee FTP: Make EPSV use the control IP address rather than the original host.
This ensures an alternate address is not used.
Does not apply to proxy tunnel.
2015-05-08 15:28:48 +02:00
Alessandro Ghedini
5bf472fd39 tool_help: fix formatting for --next option 2015-05-08 14:44:15 +02:00
Egon Eckert
8936a23f51 opts: improved the TCP keepalive examples 2015-05-08 08:27:19 +02:00
Jay Satiro
f010f3e3ca winbuild: Document the option used to statically link the CRT
- Document option RTLIBCFG (runtime library configuration).

Bug: https://github.com/bagder/curl/issues/254
Reported-by: Bert Huijben
2015-05-08 01:09:57 -04:00
Orgad Shaneh
33058a1dc3 netrc: Read in text mode when cygwin
Use text mode when cygwin to eliminate trailing carriage returns.

Bug: https://github.com/bagder/curl/pull/258
2015-05-06 02:34:31 -04:00
Patrick Monnerat
9fcc297ff3 OS400: Add SPNEGO service name options to ILE/RPG binding. 2015-05-05 14:05:41 +02:00
Daniel Stenberg
8a35211f3e curl_multi_info_read.3: fix typo
Reported-by: Liviu Chircu
2015-05-04 23:45:25 +02:00
Daniel Stenberg
fa08362a5f MANUAL: language fix
Reported-by: Fred Stluka
Bug: https://github.com/bagder/curl/issues/255
2015-05-04 14:17:28 +02:00
Alessandro Ghedini
a5e09e9eea gtls: properly retrieve certificate status
Also print the revocation reason if appropriate.
2015-05-04 13:42:45 +02:00
Daniel Stenberg
86bc654532 OpenSSL: conditional check for SSL3_RT_HEADER
The symbol is fairly new.

Reported-by: Kamil Dudka
2015-05-04 13:29:34 +02:00
Daniel Stenberg
690317aae2 openssl: skip trace outputs for ssl_ver == 0
The OpenSSL trace callback is wonderfully undocumented but given a
journey in the source code, it seems the cases were ssl_ver is zero
doesn't follow the same pattern and thus turned out confusing and
misleading. For now, we skip doing any CURLINFO_TEXT logging on those
but keep sending them as CURLINFO_SSL_DATA_OUT/IN.

Also, I added direction to the text info and I edited some functions
slightly.

Bug: https://github.com/bagder/curl/issues/219
Reported-by: Jay Satiro, Ashish Shukla
2015-05-04 12:27:59 +02:00
Marc Hoersken
3c104448d6 schannel.c: Small changes 2015-05-02 22:21:25 +02:00
Marc Hoersken
ae8387b91c schannel.c: Improve code path and readability 2015-05-02 20:14:53 +02:00
Marc Hoersken
d93619ca5d schannel.c: Improve error and return code handling upon aa99a63f03 2015-05-02 20:05:22 +02:00
Chris Araman
aa99a63f03 schannel: fix regression in schannel_recv
https://github.com/bagder/curl/issues/244

Commit 145c263 changed the behavior when Curl_read_plain returns
CURLE_AGAIN. We now handle CURLE_AGAIN and SEC_I_CONTEXT_EXPIRED
correctly.
2015-05-02 18:54:13 +02:00
Marc Hoersken
4bb8bad964 Bug born in changes made several days ago 9a91e80.
Commit: https://github.com/bagder/curl/commit/926cb9f
Reported-by: Ray Satiro
2015-05-01 09:39:34 +02:00
Michael Osipov
b6c9f5b7ae configure: remove missing and make it autogenerate
The missing file has not been autogenerated because a temporary fix was
employed in acinclude.m4 which blocked update. Removed that fix and a recent
version of missing is copied to build root.
2015-04-30 18:40:35 +02:00
Michael Osipov
4335b86a10 acinclude.m4: fix test for default CA cert bundle/path
test(1) on HP-UX requires a single equals sign and fails with two.
Let's use one and make every OS happy.
2015-04-30 18:36:27 +02:00
Daniel Stenberg
3f88d92e92 CONTRIBUTING.md: remove the sourceforge mention
Reported-By: Michael Osipov
2015-04-30 18:35:43 +02:00
Dan Fandrich
32606e4f0b http_negotiate_sspi: added missing data variable 2015-04-30 12:13:49 +02:00
Michael Osipov
693422b79b configure: remove --automake from libtoolize call
That option is not mentioned in the man page of libtoolize 2.4.4.19-fda4.
Moveover, a comment in line 2623 says "--automake is for 1.5 compatibility".

This option is redundant now.
2015-04-30 08:58:09 +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
Michael Osipov
4271695122 configure: remove autogenerated files by autoconf
* install-sh is always regenerated
* mkinstalldirs was already redudant years ago. Automake uses install for
  that. See: http://lists.gnu.org/archive/html/automake/2007-03/msg00015.html
2015-04-30 08:24:53 +02:00
Anders Bakken
b23fda76c1 curl_multi_add_handle: next is already NULL 2015-04-30 08:21:34 +02:00
Jay Satiro
926cb9ff65 schannel: Fix out of bounds array
Bug born in changes made several days ago 9a91e80.

Bug: http://curl.haxx.se/mail/lib-2015-04/0199.html
Reported-by: Brian Chrisman
2015-04-30 01:44:45 -04:00
Jay Satiro
55db5bdff7 docs/libcurl: gitignore libcurl-symbols.3
Bug: http://curl.haxx.se/mail/lib-2015-04/0191.html
Reported-by: Michael Osipov
2015-04-29 13:51:42 -04:00
Viktor Szakats
790d1a4816 lib/makefile.m32: add arch -m32/-m64 to LDFLAGS
This fixes using a multi-target mingw distro to build curl .dll for the
non-default target.
(mirroring the same patch present in src/makefile.m32)
2015-04-29 13:18:17 -04:00
Daniel Stenberg
1c0f70f534 RELEASE-NOTES: synced with cd39b944af
I've not mentioned the bug fixes that were shipped in 7.42.1 from the
7_42 branch.
2015-04-29 08:38:04 +02:00
Daniel Stenberg
cd39b944af THANKS: merged from the 7.42.1 release 2015-04-29 08:25:12 +02:00
Daniel Stenberg
6ba2e88a64 CURLOPT_HEADEROPT: default to separate
Make the HTTP headers separated by default for improved security and
reduced risk for information leakage.

Bug: http://curl.haxx.se/docs/adv_20150429.html
Reported-by: Yehezkel Horowitz, Oren Souroujon
2015-04-28 21:02:37 +02:00
Linus Nielsen
1f8a337e41 docs/libcurl: Corrected a typo in the CURLOPT_PROXY_SERVICE_NAME documentation 2015-04-28 14:47:18 +02:00
Daniel Stenberg
b2ea1bfcd6 hash: simplify Curl_str_key_compare() 2015-04-28 13:10:53 +02:00
Daniel Stenberg
0741271198 dist: ship CURLOPT_PROXY_SERVICE_NAME and CURLOPT_SERVICE_NAME 2015-04-28 09:03:58 +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
Daniel Stenberg
54c394699d http2: unify http_conn variable names to 'c' 2015-04-27 22:54:34 +02:00
Daniel Stenberg
09a31fabe4 ConnectionExists: call it multi-use instead of pipelining
So that it fits HTTP/2 as well
2015-04-27 22:54:34 +02:00
Paul Howarth
d4f62f6c5d nss: fix compilation failure with old versions of NSS
Bug: http://curl.haxx.se/mail/lib-2015-04/0095.html
2015-04-27 15:37:16 +02:00
Daniel Stenberg
1945f99d59 sws: init http2 state properly
It would otherwise cause problems when running tests after 1801 etc.
2015-04-27 08:38:52 +02:00
Daniel Stenberg
b55cb2eef2 curl_easy_getinfo.3: document 'internals' in CURLINFO_TLS_SESSION
... as it was previouly undocumented what the pointer was.
2015-04-27 00:29:18 +02:00
Daniel Stenberg
c0700e3c7f runtests: use a DISABLED.local file too
... and have git ignore that. Allows for a dev to add tests to ignore in
local tests and yet don't obstruct a normal git work flow.
2015-04-26 19:59:13 +02:00
Marc Hoersken
92e754de78 schannel.c: Fix typo introduced with 3447c973d0 2015-04-26 19:57:05 +02:00
Marc Hoersken
9a91e8059b schannel.c: Fix possible SEC_E_BUFFER_TOO_SMALL error
Reported-by: Brian Chrisman
2015-04-26 17:59:01 +02:00
Daniel Stenberg
3447c973d0 schannel: re-indented file to follow curl style better
white space changes only
2015-04-26 17:40:40 +02:00
Daniel Stenberg
cae43a10cb Curl_ossl_init: load builtin modules
To have engine modules work, we must tell openssl to load builtin
modules first.

Bug: https://github.com/bagder/curl/pull/206
2015-04-26 17:26:31 +02:00
Daniel Stenberg
aa8f613e98 configure: follow-up fix for krb5-config
commit 5b66860652 was incomplete so here's a follow-up fix

Reported-by: Dagobert Michelsen
Bug: 5b66860652 (commitcomment-10473445)
2015-04-26 17:04:18 +02:00
Daniel Stenberg
aff153f83a openssl: fix serial number output
The code extracting the cert serial number was broken and didn't display
it properly.

Bug: https://github.com/bagder/curl/issues/235
Reported-by: dkjjr89
2015-04-26 16:36:19 +02:00
Grant Pannell
59f3f92ba6 sasl_sspi: Populate domain from the realm in the challenge
Without this, SSPI based digest auth was broken.

Bug: https://github.com/bagder/curl/pull/141.patch
2015-04-26 16:12:23 +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
Dan Fandrich
f1e0a0aae7 test2039: fixed line endings that caused a test failure 2015-04-25 10:17:46 +02:00
Viktor Szakats
047e6aa05c netrc: add unit tests for 'default' support 2015-04-24 23:57:55 +02:00
Viktor Szakats
48be87e5f0 netrc: support 'default' token
The 'default' token has no argument and means to match _any_ domain.
It must be placed last if there are 'machine <name>' tokens in the same file.

See full description here:
https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-File.html
2015-04-24 23:57:37 +02:00
Daniel Stenberg
49726926c6 ROADMAP.md: extended the HTTP/2 section, reformatted
Elaborated on several of the remaining HTTP/2 parts and made document
use a format that ends up nicer on the web page:
http://curl.haxx.se/dev/roadmap.html
2015-04-24 10:49:31 +02: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
Dan Fandrich
81e25b0e25 README: convert to UTF-8 2015-04-23 00:02: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
Alessandro Ghedini
26cbd7a1d9 curl.1: fix typo 2015-04-22 21:47:32 +02:00
Kamil Dudka
ba4741842e docs: distribute the CURLOPT_PINNEDPUBLICKEY(3) man page, too 2015-04-22 14:52:16 +02:00
Kamil Dudka
27ace9893c tests/unit/.gitignore: hide unit1601 and above, too 2015-04-22 14:20:20 +02:00
Daniel Stenberg
85c45d153b connectionexists: follow-up to fd9d3a1ef1
PROTOPT_CREDSPERREQUEST still needs to be checked even when NTLM is not
enabled.

Mistake-caught-by: Kamil Dudka
2015-04-22 13:59:04 +02:00
Daniel Stenberg
fd9d3a1ef1 connectionexists: fix build without NTLM
Do not access NTLM-specific struct fields when built without NTLM
enabled!

bug: http://curl.haxx.se/?i=231
Reported-by: Patrick Rapin
2015-04-22 13:32:45 +02:00
Daniel Stenberg
d409f094a5 bump: start working toward 7.43.0 2015-04-22 13:32:45 +02: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
22691f849a RELEASE-NOTES: updated for 7.42.0 2015-04-22 07:56:12 +02:00
Daniel Stenberg
00e01fc0a7 THANKS: added contributors from 7.42.0 release notes 2015-04-22 07:56:12 +02:00
Daniel Stenberg
aadda65f5e THANKS-filter: a few more alterations to squash 2015-04-22 07:56:12 +02:00
Daniel Stenberg
7166fd8a60 contrithanks.sh: helper script for maintaining THANKS 2015-04-22 07:56:12 +02:00
Daniel Stenberg
79b9d5f1a4 http_done: close Negotiate connections when done
When doing HTTP requests Negotiate authenticated, the entire connnection
may become authenticated and not just the specific HTTP request which is
otherwise how HTTP works, as Negotiate can basically use NTLM under the
hood. curl was not adhering to this fact but would assume that such
requests would also be authenticated per request.

CVE-2015-3148

Bug: http://curl.haxx.se/docs/adv_20150422B.html
Reported-by: Isaac Boukris
2015-04-21 23:20:37 +02:00
Daniel Stenberg
0583e87ada fix_hostname: zero length host name caused -1 index offset
If a URL is given with a zero-length host name, like in "http://:80" or
just ":80", `fix_hostname()` will index the host name pointer with a -1
offset (as it blindly assumes a non-zero length) and both read and
assign that address.

CVE-2015-3144

Bug: http://curl.haxx.se/docs/adv_20150422D.html
Reported-by: Hanno Böck
2015-04-21 23:20:36 +02:00
Daniel Stenberg
b5f947b8ac cookie: cookie parser out of boundary memory access
The internal libcurl function called sanitize_cookie_path() that cleans
up the path element as given to it from a remote site or when read from
a file, did not properly validate the input. If given a path that
consisted of a single double-quote, libcurl would index a newly
allocated memory area with index -1 and assign a zero to it, thus
destroying heap memory it wasn't supposed to.

CVE-2015-3145

Bug: http://curl.haxx.se/docs/adv_20150422C.html
Reported-by: Hanno Böck
2015-04-21 23:20:36 +02:00
Daniel Stenberg
31be461c6b ConnectionExists: for NTLM re-use, require credentials to match
CVE-2015-3143

Bug: http://curl.haxx.se/docs/adv_20150422A.html
Reported-by: Paras Sethia
2015-04-21 23:20:36 +02:00
byronhe
6088fbce06 openssl: add OPENSSL_NO_SSL3_METHOD check 2015-04-21 15:25:21 -04:00
Daniel Stenberg
cf2d21d86f CURLOPT_HEADERFUNCTION.3: match parameter name in synopsis and desc
Bug: https://github.com/bagder/curl/issues/229
Reported-by: bsammon
2015-04-20 23:40:40 +02:00
Mostyn Bramley-Moore
875a6d9324 configure --with-nss: remove unneeded libs from the fallback 2015-04-20 10:25:07 +02:00
Daniel Stenberg
1b8f9c95b6 contributors.sh: fix help output, filter out (-prefix from names 2015-04-20 10:15:31 +02:00
Daniel Stenberg
9d704b3df9 RELEASE-NOTES: synced with cc0e7ebc3b 2015-04-20 10:05:46 +02:00
Michael Stapelberg
cc0e7ebc3b CURLMOPT_TIMERFUNCTION.3: Clarify, add an example 2015-04-19 23:29:51 +02:00
Viktor Szakáts
3a87bdebd1 vtls/openssl: use https in URLs and a comment typo fixed 2015-04-19 19:52:37 +02:00
Daniel Stenberg
63c64e05a4 curl_version_info.3: fixed the 'protocols' variable type
Reported-by: John Marshall
Bug: https://github.com/bagder/curl/issues/225
2015-04-18 22:46:52 +02:00
Dan Fandrich
1e6d0e06f7 test1423: added missing "file" to server section 2015-04-18 21:12:36 +02:00
Daniel Stenberg
b6e477890f TheArtOfHttpScripting: Multiple URLs + Multiple HTTP methods
... and some minor edits
2015-04-17 23:53:11 +02:00
Daniel Stenberg
2eb02480ef Revert "HTTP: don't abort connections with pending Negotiate authentication"
This reverts commit 5dc68dd609.

Bug: https://github.com/bagder/curl/issues/223
Reported-by: Michael Osipov
2015-04-17 23:23:42 +02:00
Jay Satiro
f70112522f cyassl: Fix include order
Prior to this change CyaSSL's build options could redefine some generic
build symbols.

http://curl.haxx.se/mail/lib-2015-04/0069.html
2015-04-17 15:24:04 -04:00
Kamil Dudka
8dc3bbf0f8 configure --with-nss: drop redundant if statement 2015-04-17 16:43:20 +02:00
Kamil Dudka
67a8bbb51a configure --with-nss=PATH: query pkg-config if available
Bug: https://github.com/bagder/curl/pull/171
2015-04-17 16:43:20 +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
Jay Satiro
05e4137d31 gitignore: Ignore Windows build output directories 2015-04-16 18:24:42 -04:00
Daniel Stenberg
82805b56b9 RELEASE-NOTES: synced with 1ba6e4c88e 2015-04-15 23:21:49 +02:00
Daniel Stenberg
1ba6e4c88e TODO: 17.9 Choose the name of file in braces for complex URLs 2015-04-15 21:13:25 +02:00
Daniel Stenberg
8f78794fd5 TODO: a little caution that maybe not all ideas are still good 2015-04-15 20:56:43 +02:00
Daniel Stenberg
0cbbbbdc31 TODO: 17.8 offer color-coded HTTP header output 2015-04-15 14:29:30 +02:00
Daniel Stenberg
78843afb9f TODO: 17.7 warning when sending binary output to terminal 2015-04-15 14:27:32 +02:00
Daniel Stenberg
ad48b177c3 KNOWN_BUGS: #90 IMAP "SEARCH ALL" truncates output on large boxes 2015-04-15 02:48:20 +02:00
Jay Satiro
9430dd583e cyassl: Add support for TLS extension SNI 2015-04-14 02:05:25 -04:00
Matthew Hall
8df4b5af3f gitignore: ignore test-driver file 2015-04-13 22:25:04 +02:00
Matthew Hall
a471a9f3b6 vtls_openssl: improve PKCS#12 load failure error message 2015-04-13 22:25:04 +02:00
Matthew Hall
27ac643455 vtls_openssl: fix minor typo in PKCS#12 load routine 2015-04-13 22:25:04 +02:00
Matthew Hall
b3175a767d vtls_openssl: improve client certificate load failure error messages 2015-04-13 22:25:04 +02:00
Matthew Hall
58b0a8b059 vtls_openssl: remove ambiguous SSL_CLIENT_CERT_ERR constant 2015-04-13 22:25:04 +02:00
Daniel Stenberg
9e7125a1db BUGS: refer to the github issue tracker now as primary 2015-04-13 16:43:52 +02:00
Daniel Stenberg
7fe172d3b2 firefox-db2pem: fix wildcard to find Firefox default profile
At some point, Firefox has changed and generates different directory
names for the default profile that made this script fail to find them.

Bug: https://github.com/bagder/curl/issues/207
Reported-by: sneakyimp
2015-04-13 15:31:26 +02:00
Jay Satiro
72bea7cc65 cyassl: Include the CyaSSL build config
CyaSSL >= 2.6.0 may have an options.h that was generated during
its build by configure.
2015-04-11 23:58:42 -04:00
Jay Satiro
139141f8d7 build: Generate source prerequisites for Visual Studio in generate.bat
Prior to this change Visual Studio builds could fail due to missing
prerequisites src/tool_hugehelp.c and include/curl/curlbuild.h.

http://curl.haxx.se/mail/lib-2015-04/0034.html
2015-04-11 02:16:59 -04:00
Viktor Szakats
e44155156a lib/makefile.m32: add missing libs to build libcurl.dll
Add 'gdi32' and 'crypt32' Windows implibs to avoid failure
while building libcurl.dll using the mingw compiler.
The same logic is used in 'src/makefile.m32' when
building curl.exe.
2015-04-09 21:34:14 +02:00
Kamil Dudka
992a731116 test142[23]: verify that an empty file is stored on success 2015-04-08 09:43:13 +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
Da-Yoon Chung
a9e46749b2 lib/transfer.c: Remove factor of 8 from sleep time calculation
The factor of 8 is a bytes-to-bits conversion factor, but pkt_size and
rate_bps are both in bytes. When using the rate limiting option, curl
waits 8 times too long, and then transfers very quickly until the
average rate reaches the limit. The average rate follows the limit over
time, but the actual traffic is bursty.

Thanks-to: Benjamin Gilbert
2015-04-07 21:55:23 +02:00
Jay Satiro
c3101ae287 x509asn1: Silence x64 loss-of-data warning on RSA key length assignment
The key length in bits will always fit in an unsigned long so the
loss-of-data warning assigning the result of x64 pointer arithmetic to
an unsigned long is unnecessary.
2015-04-06 17:55:48 +02:00
Jay Satiro
d363c07912 cyassl: Use CYASSL_MAX_ERROR_SZ for error buffer size
Also fix it so that all ERR_error_string calls use an error buffer.
CyaSSL's implementation of ERR_error_string only writes the error when
an error buffer is passed.

http://www.yassl.com/forums/topic599-openssl-compatibility-and-errerrorstring.html
2015-04-06 17:54:14 +02:00
Jay Satiro
a30be951d6 cyassl: Remove 'Connecting to' message from cyassl_connect_step2
Prior to this change libcurl could show multiple 'CyaSSL: Connecting to'
messages since cyassl_connect_step2 is called multiple times, typically.
The message is superfluous even once since libcurl already informs the
user elsewhere in code that it is connecting.
2015-04-05 18:18:11 +02:00
Viktor Szakats
f2a0b2164a checksrc.bat: quotes to support an SRC_DIR with spaces 2015-04-05 18:07:40 +02:00
Daniel Stenberg
81ee1e69fe hostip: fix compiler warnings
introduced in the previous mini-series of 3 commits
2015-04-03 23:41:58 +02:00
Stefan Bühler
846f492053 actually implement CURLOPT_RESOLVE removals
- also log when a CURLOPT_RESOLVE entry couldn't get parsed
2015-04-03 16:46:14 +02:00
Stefan Bühler
b4be97fb67 move Curl_share_lock and ref counting into Curl_fetch_addr 2015-04-03 16:46:14 +02:00
Stefan Bühler
0db831976e fix refreshing of obsolete dns cache entries
- cache entries must be also refreshed when they are in use
- have the cache count as inuse reference too, freeing timestamp == 0 special
  value
- use timestamp == 0 for CURLOPT_RESOLVE entries which don't get refreshed
- remove CURLOPT_RESOLVE special inuse reference (timestamp == 0 will prevent refresh)
- fix Curl_hostcache_clean - CURLOPT_RESOLVE entries don't have a special
  reference anymore, and it would also release non CURLOPT_RESOLVE references
- fix locking in Curl_hostcache_clean
- fix unit1305.c: hash now keeps a reference, need to set inuse = 1
2015-04-03 16:46:14 +02:00
Daniel Stenberg
369430cd17 RELEASE-NOTES: synced with abf6bddc14 2015-04-03 11:03:21 +02:00
Jay Satiro
abf6bddc14 checksrc.bat: Check lib\vtls source 2015-04-03 10:53:31 +02:00
Jay Satiro
f203edc544 cyassl: Set minimum protocol version before CTX callback
This change is to allow the user's CTX callback to change the minimum
protocol version in the CTX without us later overriding it, as we did
prior to this change.
2015-04-03 10:51:58 +02:00
Jay Satiro
e2a9ebb321 build-openssl.bat: Fix mixed line endings
Use LF not CRLF, throughout.  msysgit will only convert a file to CRLF
on checkout if it's not mixed.
2015-04-02 17:21:09 +02:00
Jay Satiro
0b5efa57ad cyassl: Fix certificate load check
SSL_CTX_load_verify_locations can return negative values on fail,
therefore to check for failure we check if load is != 1 (success)
instead of if load is == 0 (failure), the latter being incorrect given
that behavior.
2015-04-02 17:18:42 +02:00
Tatsuhiro Tsujikawa
21e82bd635 http2: Fix missing nghttp2_session_send call in Curl_http2_switched
Previously in Curl_http2_switched, we called nghttp2_session_mem_recv to
parse incoming data which were already received while curl was handling
upgrade.  But we didn't call nghttp2_session_send, and it led to make
curl not send any response to the received frames.  Most likely, we
received SETTINGS from server at this point, so we missed opportunity to
send SETTINGS + ACK.  This commit adds missing nghttp2_session_send call
in Curl_http2_switched to fix this issue.

Bug: https://github.com/bagder/curl/issues/192
Reported-by: Stefan Eissing
2015-04-02 15:19:29 +02:00
Daniel Stenberg
2685041a5c cookie: handle spaces after the name in Set-Cookie
"name =value" is fine and the space should just be skipped.

Updated test 31 to also test for this.

Bug: https://github.com/bagder/curl/issues/195
Reported-by: cromestant
Help-by: Frank Gevaerts
2015-04-01 23:25:29 +02:00
Jay Satiro
b121633402 cyassl: Fix library initialization return value
(Curl_cyassl_init)
- Return 1 on success, 0 in failure.

Prior to this change the fail path returned an incorrect value and the
evaluation to determine whether CyaSSL_Init had succeeded was incorrect.
Ironically that combined with the way curl_global_init tests SSL library
initialization (!Curl_ssl_init()) meant that CyaSSL having been
successfully initialized would be seen as that even though the code path
and return value in Curl_cyassl_init were wrong.
2015-04-01 08:10:58 +02:00
Thomas Ruecker
c84f0250e3 CURLOPT_HTTP200ALIASES.3: Mainly SHOUTcast servers use "ICY 200"
Icecast versions 1.3.0 through 1.3.12 would reply with "ICY 200"
under certain conditions:

    client_wants_icy_headers (connection_t *con)
    {
            const char *val;

            if (!con)
                    return 1;

            val = get_user_agent (con);
            if (!val || !val[0] || strcmp (val, "(null)") == 0)
                    return 1;

            if (con->food.client->use_icy)
                    return 1;
            if (strncasecmp (val, "winamp", 6) == 0)
                    return 1;
            if (strncasecmp (val, "Shoutcast", 9) == 0)
                    return 1;

            return 0;
    }

So mainly if there is no 'user agent' or it is '(null)' or contains
'winamp' or 'Shoutcast'.

No mainstream distribution carries Icecast 1.3.x anymore, after all
it was released in 2002 and superseded by Icecast 2.x.
2015-03-31 23:53:56 +02:00
Dan Fandrich
049fe7fb53 axtls: add timeout within Curl_axtls_connect
This allows test 405 to pass on axTLS.
2015-03-31 02:04:22 +02:00
Jay Satiro
6419aee248 checksrc: Windows-specific input fixes
lib/config-win32ce.h
- Fix whitespace for checksrc compliance.

lib/checksrc.pl
- Remove trailing carriage returns from input.

projects/checksrc.bat
- Ignore tool_hugehelp.c.
2015-03-30 22:39:13 +02:00
Dagobert Michelsen
5b66860652 configure: Use KRB5CONFIG for krb5-config
Allows the user to easier override its path.

Bug: http://curl.haxx.se/bug/view.cgi?id=1486
2015-03-30 14:19:23 +02:00
Daniel Stenberg
787c2ae91b multi: remove_handle: move pending connections
If the handle removed from the multi handle happens to be the one
"owning" the pipeline other transfers will be waiting indefinitely. Now
we move such handles back to connect to have them race (again) for
getting the connection and thus avoid hanging.

Bug: http://curl.haxx.se/bug/view.cgi?id=1465
Reported-by: Jiri Dvorak
2015-03-29 23:49:12 +02:00
Daniel Stenberg
31987c340e KNOWN_BUGS: 89 is bug #1411
Disabling pipelining on multi handle with in-progress pipelined requests
leads to heap corruption and crash
2015-03-29 23:20:15 +02:00
Jay Satiro
fcdc597b1a cyassl: CTX callback cosmetic changes and doc fix
- More descriptive fail message for NO_FILESYSTEM builds.
- Cosmetic changes.
- Change more of CURLOPT_SSL_CTX_* doc to not be OpenSSL specific.
2015-03-28 16:41:51 +01:00
Daniel Stenberg
623d24f3ee RELEASE-NOTES: synced with d2feb71752 2015-03-28 16:33:17 +01:00
Dan Fandrich
ae3c985060 tool_operate: only set SSL options if SSL is enabled 2015-03-28 11:57:16 +01:00
Dan Fandrich
9a743bc5fc runtests.pl: detect WolfSSL as yassl 2015-03-28 00:26:45 +01:00
Kyle L. Huff
d2feb71752 cyassl: add SSL context callback support for CyaSSL
Adds support for CURLOPT_SSL_CTX_FUNCTION when using CyaSSL, and better
handles CyaSSL instances using NO_FILESYSTEM.
2015-03-27 23:32:14 +01:00
Kyle L. Huff
211f1e3c6b cyassl: remove undefined reference to CyaSSL_no_filesystem_verify
CyaSSL_no_filesystem_verify is not (or no longer) defined by cURL or
CyaSSL. This reference causes build errors when compiling with
NO_FILESYSTEM.
2015-03-27 23:31:12 +01:00
Jay Satiro
dab4ff179f build: Fix libcurl.sln erroneous mixed configurations
Prior to this change some Release configurations had an active
configuration assignment to their Debug counterpart.
2015-03-27 23:10:42 +01:00
Jay Satiro
e7a289ebb9 vtls: Don't accept unknown CURLOPT_SSLVERSION values 2015-03-27 09:32:23 +01:00
Jay Satiro
488102fc17 url: Don't accept CURLOPT_SSLVERSION unless USE_SSL is defined 2015-03-27 09:31:30 +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
Daniel Stenberg
318ad8d767 multi: on a request completion, check all CONNECT_PEND transfers
... even if they don't have an associated connection anymore. It could
leave the waiting transfers pending with no active one on the
connection.

Bug: http://curl.haxx.se/bug/view.cgi?id=1465
Reported-by: Jiri Dvorak
2015-03-26 08:14:22 +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
Daniel Stenberg
eb2a6180fb README.http2: refreshed and added TODO items 2015-03-25 12:13:16 +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
5b58bface3 polarssl: called mbedTLS in 1.3.10 and later 2015-03-25 09:19:57 +01:00
Daniel Stenberg
83b29e43cd polarssl: remove dead code
and simplify code by changing if-elses to a switch()

CID 1291706: Logically dead code. Execution cannot reach this statement
2015-03-25 09:01:11 +01:00
Daniel Stenberg
24908c12d7 polarssl: remove superfluous for(;;) loop
"unreachable: Since the loop increment is unreachable, the loop body
will never execute more than once."

Coverity CID 1291707
2015-03-25 08:49:34 +01:00
Daniel Stenberg
4e299192ed Curl_ssl_md5sum: return CURLcode
... since the funciton can fail on OOM. Check this return code.

Coverity CID 1291705.
2015-03-25 08:32:12 +01:00
Jay Satiro
e35f2e61ec cyassl: default to highest possible TLS version
(cyassl_connect_step1)
- Use TLS 1.0-1.2 by default when available.

CyaSSL/wolfSSL >= v3.3.0 supports setting a minimum protocol downgrade
version.

cyassl/cyassl@322f79f
2015-03-25 08:10:24 +01:00
Jay Satiro
d29f8b460c cyassl: Check for invalid length parameter in Curl_cyassl_random 2015-03-25 08:08:12 +01:00
Jay Satiro
ec31962640 cyassl: If wolfSSL then identify as such in version string 2015-03-25 08:08:12 +01:00
Dan Fandrich
aa5808b504 symbols-in-versions: added CURLOPT_PATH_AS_IS 2015-03-24 23:47:02 +01:00
Dan Fandrich
a45146868b testcurl.pl: add the --notes option to supply more info about a build
Support for notes has been in place for a while, but it required
being added to the setup file manually.
2015-03-24 23:47:01 +01:00
Dan Fandrich
35648f2e79 curl_memory: make curl_memory.h the second-last header file loaded
This header file must be included after all header files except
memdebug.h, as it does similar memory function redefinitions and can be
similarly affected by conflicting definitions in system or dependent
library headers.
2015-03-24 23:47:01 +01:00
Daniel Stenberg
ac2827ac09 openssl: do the OCSP work-around for libressl too
I tested with libressl git master now (v2.1.4-27-g34bf96c) and it seems to
still require the work-around for stapling to work.
2015-03-24 23:39:52 +01:00
Daniel Stenberg
bd9ac3cff2 openssl: verifystatus: only use the OCSP work-around <= 1.0.2a
URL: http://curl.haxx.se/mail/lib-2015-03/0205.html
Reported-by: Alessandro Ghedini
2015-03-24 23:06:37 +01:00
Daniel Stenberg
7e6ca87a72 openssl: adapt to ASN1/X509 things gone opaque in 1.1 2015-03-24 22:59:33 +01:00
Jay Satiro
9edf28e12d curl_easy_setopt.3: Fix misspelling in CURLOPT_PATH_AS_IS description 2015-03-24 21:48:15 +01:00
Viktor Szakáts
bbd0dd3fe2 CURLOPT_HTTPHEADER.3: fix typo in recent commit 2015-03-24 21:48:02 +01:00
Viktor Szakáts
e438a9e2f0 CURLOPT_PATH_AS_IS.3: add type 'long' to prototype 2015-03-24 21:46:07 +01:00
Dan Fandrich
56ae66d518 vtls: fix compile with --disable-crypto-auth but with SSL
This is a strange combination of options, but is allowed.
2015-03-24 21:41:22 +01:00
Patrick Monnerat
ff4a4dd92e os400: define new options in ILE/RPG binding. 2015-03-24 12:18:31 +01:00
Daniel Stenberg
ab6e6edb9e RELEASE-NOTES: synced with f687860936 2015-03-24 11:15:47 +01:00
Daniel Stenberg
f687860936 curl_easy_setopt.3: Add CURLOPT_PATH_AS_IS 2015-03-24 11:06:38 +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
Yamada Yasuharu
ecc4940df2 curl_easy_recv/send: make them work with the multi interface
By making sure Curl_getconnectinfo() uses the correct connection cache
to find the last connection.
2015-03-23 22:46:58 +01:00
Daniel Stenberg
4b02b84897 http2: move the init too for when its actually needed
... it would otherwise lead to memory leakage if we never actually do
the switch.
2015-03-23 10:26:04 +01:00
Dan Fandrich
145c4692ff dict: rename byte to avoid compiler shadowed declaration warning
This conflicted with a WolfSSL typedef.
2015-03-23 10:16:10 +01:00
Dan Fandrich
430006c5e2 cyassl: include version.h to ensure the version macros are defined 2015-03-23 10:10:03 +01:00
Dan Fandrich
148207e2d7 test1513: eliminated race condition in test run
It seems that some systems (e.g. fairly consistently in some recent
Solaris autobuilds) would manage to get to the connect phase before the
progress callback was called, resulting in a CURLE_COULDNT_CONNECT
error. Reworked the test to point at a test server that never returns a
full result so the progress callback always gets a chance to be called
before the transfer can complete in some other way.
2015-03-22 00:03:44 +01:00
Nick Zitzmann
7f5a170442 darwinsssl: add support for TLS False Start
TLS False Start support requires iOS 7.0 or later, or OS X 10.9 or later.
2015-03-21 12:22:56 -05:00
Daniel Stenberg
ed429b72d7 gtls: add check of return code
Coverity CID 1291167 pointed out that 'rc' was received but never used when
gnutls_credentials_set() was used. Added return code check now.
2015-03-21 16:53:43 +01:00
Daniel Stenberg
fea13a17d8 gtls: dereferencing NULL pointer
Coverity CID 1291165 pointed out 'chainp' could be dereferenced when
NULL if gnutls_certificate_get_peers() had previously failed.
2015-03-21 16:53:23 +01:00
Daniel Stenberg
5f6f9e8b59 gtls: avoid uninitialized variable.
Coverity CID 1291166 pointed out that we could read this variable
uninitialized.
2015-03-21 16:53:09 +01:00
Dan Fandrich
f9251a5c86 tests/certs: rebuild certificates with modified key usage bits
The certificates were missing the digitalSignature and keyAgreement
usage types, of which at least digitalSignature was checked by CyaSSL.
This caused the test server in test 310 (among others) to fail the
startup verification and therefore run (see
http://curl.haxx.se/mail/lib-2014-07/0303.html).
2015-03-21 16:33:58 +01:00
Dan Fandrich
38c304a58f tests/certs: added make target to rebuild certificates
The certificate generation scripts were also updated to better match the
format of the certificates currently checked in.
2015-03-21 16:33:58 +01:00
Daniel Stenberg
9cd4d6518f x509asn1: add /* fallthrough */ in switch() case 2015-03-21 16:29:58 +01:00
Daniel Stenberg
e6917d3b77 x509asn1: minor edit to unconfuse Coverity
CID 1202732 warns on the previous use, although I cannot fine any
problems with it. I'm doing this change only to make the code use a more
familiar approach to accomplish the same thing.
2015-03-21 16:21:01 +01:00
Dagobert Michelsen
57dc2f7e40 testcurl: Allow '=' in values given on command line 2015-03-21 15:57:08 +01:00
Daniel Stenberg
b734518371 nss: error: unused variable 'connssl' 2015-03-21 15:47:03 +01:00
Dan Fandrich
61ff197a27 test938: added missing closing tags 2015-03-21 01:27:44 +01:00
Dan Fandrich
6779c50e26 cyassl: use new library version macro when available 2015-03-20 23:49:53 +01:00
Alessandro Ghedini
1f651d1d4d curl: add --false-start option 2015-03-20 20:14:35 +01:00
Alessandro Ghedini
185914fd31 nss: add support for TLS False Start 2015-03-20 20:14:35 +01:00
Alessandro Ghedini
4dcd25e138 url: add CURLOPT_SSL_FALSESTART option
This option can be used to enable/disable TLS False Start defined in the RFC
draft-bmoeller-tls-falsestart.
2015-03-20 20:14:33 +01:00
Alessandro Ghedini
a332922a52 gtls: implement CURLOPT_CERTINFO 2015-03-20 19:03:53 +01:00
Alessandro Ghedini
8854f8d45a openssl: try to avoid accessing OCSP structs when possible 2015-03-20 15:36:05 +01:00
Daniel Stenberg
9e8f9dbdd3 CURLOPT_URL.3: spelling!
Reported-by: Frank Gevaerts
2015-03-20 13:49:45 +01:00
Daniel Stenberg
620e0b23c8 CURLOPT_URL.3: Added "SECURITY CONCERNS" 2015-03-20 12:14:40 +01:00
Daniel Stenberg
2b7ac4e710 CURLOPT_HTTPHEADER.3: add a "SECURITY CONCERNS" section 2015-03-20 12:03:09 +01:00
Dan Fandrich
7868dc7103 cyassl: detect the library as renamed wolfssl
This change was made in CyaSSL/WolfSSL ver. 3.4.0
2015-03-19 23:51:40 +01:00
Daniel Stenberg
abfab1786e HTTP: don't switch to HTTP/2 from 1.1 until we get the 101
We prematurely changed protocol handler to HTTP/2 which made things very
slow (and wrong).

Reported-by: Stefan Eissing
Bug: https://github.com/bagder/curl/issues/169
2015-03-19 13:44:18 +01:00
Dan Fandrich
9e66d3f4d3 axtls: version 1.5.2 now requires that config.h be manually included 2015-03-19 10:11:17 +01:00
Daniel Stenberg
1977ff811d metalink: fix resource leak in OOM
Coverity CID 1288826
2015-03-19 09:08:08 +01:00
Dan Fandrich
8ecfaad2cc docs/libcurl: clean up libcurl-symbols.3 2015-03-18 23:54:36 +01:00
Dan Fandrich
431c5261d2 docs/libcurl: check that all options with man pages are referenced
If a man page exists in the opts/ directory, it must also be referenced
either in curl_easy_setopt.3 or curl_multi_setopt.3
2015-03-18 23:44:45 +01:00
Dan Fandrich
d260a0aeeb curl_easy_setopt.3: added a few missing options 2015-03-18 23:20:49 +01:00
Kamil Dudka
e3fbdc7c8a nss: explicitly tell NSS to disable NPN/ALPN
... if disabled at libcurl level.  Otherwise, we would allow to
negotiate NPN despite curl was invoked with the --no-npn option.
2015-03-18 19:43:14 +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
7e16aa936f RELEASE-NOTES: synced with e539f01567 2015-03-18 08:37:54 +01:00
Christian Weisgerber
e539f01567 docs/libcurl: make portability fix
Using $< in a non-suffix rule context is a GNU make idiom.  This bug was
introduced in 7.41.0.
2015-03-18 08:31:06 +01:00
Dan Fandrich
252e9acd50 checksrc: Fix whitelist on out-of-tree builds 2015-03-17 23:26:48 +01:00
Stefan Bühler
4d6e079dd2 Curl_sh_entry: remove unused 'timestamp' 2015-03-17 16:29:36 +01:00
Daniel Stenberg
ef1c3b4648 HTTP: don't use Expect: headers when on HTTP/2
Reported-by: Stefan Eissing
Bug: https://github.com/bagder/curl/issues/169
2015-03-17 15:09:34 +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
Daniel Stenberg
a6b8fe2a5f checksrc: use space before paren in "return (expr);" 2015-03-17 13:05:01 +01:00
Daniel Stenberg
3dbe12a1e9 CONTRIBUTE: refer to git log instead of deprecated CHANGES file 2015-03-17 09:09:41 +01:00
Daniel Stenberg
40914fd544 CURLOPT_*.3: more examples and edits 2015-03-17 08:57:31 +01:00
Daniel Stenberg
8c41f368f5 CURLOPT_*.3: added lots of small example sections 2015-03-17 08:03:46 +01:00
Daniel Stenberg
6105029b23 CURLOPT_PRIVATE.3: provide an example 2015-03-16 23:56:11 +01:00
Daniel Stenberg
9c518a7d95 CURLOPT_*TIMEOUT.3: provide examples 2015-03-16 23:51:22 +01:00
Daniel Stenberg
8644a88202 CURLOPT_USERAGENT.3: added an example 2015-03-16 23:41:45 +01:00
Daniel Stenberg
76afe14584 CURLOPT_STDERR.3: added an example 2015-03-16 23:40:52 +01:00
Daniel Stenberg
fe02d132e2 curl_easy_perform.3: remove superfluous close brace from example 2015-03-16 23:28:23 +01:00
Daniel Stenberg
0f4a03cbb6 free: instead of Curl_safefree()
Since we just started make use of free(NULL) in order to simplify code,
this change takes it a step further and:

- converts lots of Curl_safefree() calls to good old free()
- makes Curl_safefree() not check the pointer before free()

The (new) rule of thumb is: if you really want a function call that
frees a pointer and then assigns it to NULL, then use Curl_safefree().
But we will prefer just using free() from now on.
2015-03-16 15:01:15 +01:00
Markus Elfring
9e661601fe Bug #149: Deletion of unnecessary checks before a few calls of cURL functions
The following functions return immediately if a null pointer was passed.
* Curl_cookie_cleanup
* curl_formfree

It is therefore not needed that a function caller repeats a corresponding check.

This issue was fixed by using the software Coccinelle 1.0.0-rc24.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2015-03-16 12:13:56 +01:00
Markus Elfring
29c655c0a6 Bug #149: Deletion of unnecessary checks before calls of the function "free"
The function "free" is documented in the way that no action shall occur for
a passed null pointer. It is therefore not needed that a function caller
repeats a corresponding check.
http://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first

This issue was fixed by using the software Coccinelle 1.0.0-rc24.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2015-03-16 12:13:56 +01:00
Jay Satiro
059b3a5770 connect: Fix happy eyeballs logic for IPv4-only builds
Bug: https://github.com/bagder/curl/pull/168

(trynextip)
- Don't try the "other" protocol family unless IPv6 is available. In an
IPv4-only build the other family can only be IPv6 which is unavailable.

This change essentially stops IPv4-only builds from attempting the
"happy eyeballs" secondary parallel connection that is supposed to be
used by the "other" address family.

Prior to this change in IPv4-only builds that secondary parallel
connection attempt could be erroneously used by the same family (IPv4)
which caused a bug where every address after the first for a host could
be tried twice, often in parallel. This change fixes that bug. An
example of the bug is shown below.

Assume MTEST resolves to 3 addresses 127.0.0.2, 127.0.0.3 and 127.0.0.4:

* STATE: INIT => CONNECT handle 0x64f4b0; line 1046 (connection #-5000)
* Rebuilt URL to: http://MTEST/
* Added connection 0. The cache now contains 1 members
* STATE: CONNECT => WAITRESOLVE handle 0x64f4b0; line 1083
(connection #0)
*   Trying 127.0.0.2...
* STATE: WAITRESOLVE => WAITCONNECT handle 0x64f4b0; line 1163
(connection #0)
*   Trying 127.0.0.3...
* connect to 127.0.0.2 port 80 failed: Connection refused
*   Trying 127.0.0.3...
* connect to 127.0.0.3 port 80 failed: Connection refused
*   Trying 127.0.0.4...
* connect to 127.0.0.3 port 80 failed: Connection refused
*   Trying 127.0.0.4...
* connect to 127.0.0.4 port 80 failed: Connection refused
* connect to 127.0.0.4 port 80 failed: Connection refused
* Failed to connect to MTEST port 80: Connection refused
* Closing connection 0
* The cache now contains 0 members
* Expire cleared
curl: (7) Failed to connect to MTEST port 80: Connection refused

The bug was born in commit bagder/curl@2d435c7.
2015-03-16 12:07:59 +01:00
Daniel Stenberg
918e040953 mksymbolsmanpage.pl: use std header and generate better nroff header 2015-03-15 23:23:20 +01:00
Frank Meier
9063a7f853 closesocket: call multi socket cb on close even with custom close
In function Curl_closesocket() in connect.c the call to
Curl_multi_closed() was wrongly omitted if a socket close function
(CURLOPT_CLOSESOCKETFUNCTION) is registered.

That would lead to not removing the socket from the internal hash table
and not calling the multi socket callback appropriately.

Bug: http://curl.haxx.se/bug/view.cgi?id=1493
2015-03-15 13:26:03 +01:00
Tobias Stoeckmann
851c29269b hostip: Fix signal race in Curl_resolv_timeout.
A signal handler for SIGALRM is installed in Curl_resolv_timeout. It is
configured to interrupt system calls and uses siglongjmp to return into
the function if alarm() goes off.

The signal handler is installed before curl_jmpenv is initialized.
This means that an already installed alarm timer could trigger the
newly installed signal handler, leading to undefined behavior when it
accesses the uninitialized curl_jmpenv.

Even if there is no previously installed alarm available, the code in
Curl_resolv_timeout itself installs an alarm before the environment is
fully set up. If the process is sent into suspend right after that, the
signal handler could be called too early as in previous scenario.

To fix this, the signal handler should only be installed and the alarm
timer only be set after sigsetjmp has been called.
2015-03-14 18:24:11 +01:00
Daniel Stenberg
0cf649d9cc http2: detect prematures close without data transfered
... by using the regular Curl_http_done() method which checks for
that. This makes test 1801 fail consistently with error 56 (which seems
fine) to that test is also updated here.

Reported-by: Ben Darnell
Bug: https://github.com/bagder/curl/issues/166
2015-03-14 18:19:51 +01:00
Dan Fandrich
0911b96399 test320: Expect the Host header to be the first header
Required for the test to work after a5d994941c.
2015-03-13 22:37:23 +01:00
Daniel Stenberg
983ccdcead RELEASE-NOTES: synced with 186e46d88d 2015-03-12 23:40:38 +01:00
Daniel Stenberg
186e46d88d openssl: use colons properly in the ciphers list
While the previous string worked, this is the documented format.

Reported-by: Richard Moore
2015-03-12 23:29:46 +01:00
Daniel Stenberg
0d1060f21e openssl: sort the ciphers on strength
This makes curl pick better (stronger) ciphers by default. The strongest
available ciphers are fine according to the HTTP/2 spec so an OpenSSL
built curl is no longer rejected by string HTTP/2 servers.

Bug: http://curl.haxx.se/bug/view.cgi?id=1487
2015-03-12 23:16:28 +01:00
Fabian Keil
6d3260af64 test203[0-3]: Expect the Host header to be the first header
Required for the tests to work after a5d994941c.
2015-03-12 16:06:11 +01:00
Daniel Stenberg
1d3f1a80d0 openssl: show the cipher selection to use 2015-03-12 15:53:45 +01:00
Daniel Stenberg
a5d994941c http: always send Host: header as first header
...after the method line:

 "Since the Host field-value is critical information for handling a
 request, a user agent SHOULD generate Host as the first header field
 following the request-line." / RFC 7230 section 5.4

Additionally, this will also make libcurl ignore multiple specified
custom Host: headers and only use the first one. Test 1121 has been
updated accordingly

Bug: http://curl.haxx.se/bug/view.cgi?id=1491
Reported-by: Rainer Canavan
2015-03-12 12:15:24 +01:00
Alexander Pepper
143acd6222 mk-ca-bundle bugfix: Don't report SHA1 numbers with "-q".
Also unified printing to STDERR by creating the helper method "report".
2015-03-11 14:47:41 +01:00
Daniel Stenberg
852d35b6ea proxy: re-use proxy connections (regression)
When checking for a connection to re-use, a proxy-using request must
check for and use a proxy connection and not one based on the host
name!

Added test 1421 to verify

Bug: http://curl.haxx.se/bug/view.cgi?id=1492
2015-03-11 11:54:22 +01:00
Jay Satiro
f39b1c0801 memanalyze.pl: handle free(NULL) 2015-03-10 22:05:46 +01:00
Jay Satiro
e424a1b3e7 .travis.yml: Change CI make test to make test-full
- Change the continuous integration script to use 'make test-full'
instead of just 'make test' so that the diagnostic log output is
printed to stdout when a test fails.

- Change the continuous integration script to use
'./configure --enable-debug' instead of just './configure' so that the
memory analyzer will work during testing.

Prior to this change Travis used its default C test script:
./configure && make && make test
2015-03-10 20:37:17 +01:00
Alessandro Ghedini
fa895f2aa2 gtls: correctly align certificate status verification messages 2015-03-10 15:48:34 +01:00
Alessandro Ghedini
a6a264ef2c gtls: don't print double newline after certificate dates 2015-03-10 15:20:03 +01:00
Alessandro Ghedini
3a757fddbb gtls: print negotiated TLS version and full cipher suite name
Instead of priting cipher and MAC algorithms names separately, print the
whole cipher suite string which also includes the key exchange algorithm,
along with the negotiated TLS version.
2015-03-10 15:18:14 +01:00
Daniel Stenberg
d9973eaeb8 gtls: fix compiler warnings 2015-03-10 15:16:59 +01:00
Alessandro Ghedini
5a1614cecd gtls: add support for CURLOPT_CAPATH 2015-03-10 15:03:54 +01:00
stopiccot
0f24df6e54 MacOSX-Framework: use @rpath instead of @executable_path
Bug: https://github.com/bagder/curl/pull/157
2015-03-09 23:39:27 +01:00
Daniel Stenberg
e662ddff49 RELEASE-NOTES: synced with c19349951 2015-03-09 11:12:54 +01:00
Daniel Stenberg
c19349951d multi: fix *getsock() with CONNECT
The code used some happy eyeballs logic even _after_ CONNECT has been
sent to a proxy, while the happy eyeball phase is already (should be)
over by then.

This is solved by splitting the multi state into two separate states
introducing the new SENDPROTOCONNECT state.

Bug: http://curl.haxx.se/mail/lib-2015-01/0170.html
Reported-by: Peter Laser
2015-03-07 19:19:22 +01:00
Daniel Stenberg
9da14a96ab conncontrol: only log changes to the connection bit 2015-03-07 19:18:49 +01:00
Daniel Stenberg
00ea0e7db0 http2: use CURL_HTTP_VERSION_* symbols instead of NPN_*
Since they already exist and will make comparing easier
2015-03-07 11:10:30 +01:00
Daniel Stenberg
df28af8f39 http2: make the info-message about receiving HTTP2 headers debug-only 2015-03-07 10:55:37 +01:00
Alessandro Ghedini
44ffe27056 urldata: remove unused asked_for_h2 field 2015-03-07 10:36:10 +01:00
Alessandro Ghedini
adb4e41a1a polarssl: make it possible to enable ALPN/NPN without HTTP2 2015-03-07 10:36:10 +01:00
Alessandro Ghedini
42bc45be8e nss: make it possible to enable ALPN/NPN without HTTP2 2015-03-07 10:36:10 +01:00
Alessandro Ghedini
870a67e01f gtls: make it possible to enable ALPN/NPN without HTTP2 2015-03-07 10:36:10 +01:00
Alessandro Ghedini
2e9494b15d openssl: make it possible to enable ALPN/NPN without HTTP2 2015-03-07 10:36:10 +01:00
Daniel Stenberg
3ac3331e14 metalink: add some error checks
malloc() and strdup() calls without checking return codes.

Reported-by: Markus Elfring
Bug: https://github.com/bagder/curl/issues/150
2015-03-06 23:14:25 +01:00
Daniel Stenberg
163d29826d curl_easy_setopt.3: added CURLOPT_SSL_VERIFYSTATUS
Reported-by: Jonathan Cardoso
2015-03-06 17:07:28 +01:00
Daniel Stenberg
042526c19f urldata: fix gnutls build 2015-03-06 10:13:40 +01:00
Steve Holme
9fa1abe9fe openssl: Removed use of USE_SSLEAY from the Visual Studio project files
In addition to commit 709cf76f6b, removed the USE_SSLEAY preprocessor
variable from the Visual Studio project files as it isn't required
anymore.
2015-03-05 20:47:14 +00:00
Daniel Stenberg
492dfca65d multi: fix memory-leak on timeout (regression)
Since 1342a96ecf, a timeout detected in the multi state machine didn't
necesarily clear everything up, like formpost data.

Bug: https://github.com/bagder/curl/issues/147
Reported-by: Michel Promonet
Patched-by: Michel Promonet
2015-03-05 15:43:38 +01:00
Daniel Stenberg
64736dd1be configure: follow-up fix from 709cf76f6
OpenSSL handling was a little broken.
2015-03-05 15:43:38 +01:00
Daniel Stenberg
709cf76f6b openssl: remove all uses of USE_SSLEAY
SSLeay was the name of the library that was subsequently turned into
OpenSSL many moons ago (1999). curl does not work with the old SSLeay
library since years. This is now reflected by only using USE_OPENSSL in
code that depends on OpenSSL.
2015-03-05 10:57:52 +01:00
Sergei Nikulov
1a62b6e68c cmake: handle build definitions CURLDEBUG/DEBUGBUILD
Acked-by: Brad King
2015-03-05 09:26:08 +01:00
Daniel Stenberg
ae8235571f FAQ: 4.21 Why is there a HTTP/1.1 in my HTTP/2 request? 2015-03-04 18:24:46 +01:00
Daniel Stenberg
ac4d08b5e2 symbols.pl: handle '-' in the deprecated field
... which otherwise made the script skip the _LAST define for some
symbols.

Reported-by: Jeroen Ooms
Bug: http://curl.haxx.se/mail/lib-2015-03/0052.html
2015-03-04 08:36:38 +01:00
Daniel Stenberg
6bba85d500 curl.1: fix "The the" typo
Reported-by: Jon Seymour
2015-03-04 07:29:06 +01:00
Daniel Stenberg
8aabbf5f8c vtls: use curl_printf.h all over
No need to use _MPRINTF_REPLACE internally.
2015-03-03 23:17:43 +01:00
Daniel Stenberg
dcf23b0cfe tool: use ENABLE_CURLX_PRINTF instead of _MPRINTF_REPLACE 2015-03-03 23:08:02 +01:00
Daniel Stenberg
af838b7d7b tool_writeenv: remove _MPRINTF_REPLACE define, it wasn't used 2015-03-03 23:00:54 +01:00
Sergei Nikulov
43eb8b2874 libtest: fixed linker errors on msvc
Bug: https://github.com/bagder/curl/pull/144
2015-03-03 14:33:11 +01:00
Daniel Stenberg
df5578a7a3 mprintf.h: remove #ifdef CURLDEBUG
... and as a consequence, introduce curl_printf.h with that re-define
magic instead and make all libcurl code use that instead.
2015-03-03 12:36:18 +01:00
Daniel Stenberg
f2108ec34c tool_getpass: remove unused curl/mprintf.h include 2015-03-03 12:09:25 +01:00
Daniel Stenberg
a318e04419 CONTRIBUTING.md: file for advice on github 2015-03-03 00:38:41 +01:00
Viktor Szakáts
1cb227c1f1 BINDINGS: add link to Harbour bindings
And UTF8-fix a few names
2015-03-02 17:43:06 +01:00
Daniel Stenberg
f3f7d37c1d CURLOPT_HEADERFUNCTION.3: typo in error code name
Reported-by: Jonathan Cardoso
2015-03-02 17:25:39 +01:00
Daniel Stenberg
ca04681c3b BINDINGS: tclcurl moved
Reporte-by: Steve Havelka
2015-03-02 08:51:14 +01:00
Jay Satiro
e349a1bf74 opts: Fix pipelining examples 2015-03-02 08:38:43 +01:00
Jay Satiro
70523c690b curl_multi_setopt.3: Link to CURLMOPT_MAXCONNECTS 2015-03-02 08:38:30 +01:00
Daniel Stenberg
17abfd5a4b CONTRIBUTE: the new more github-friendly attitude! 2015-03-01 23:39:14 +01:00
Steve Holme
f6864697c3 RELEASE-NOTES: Synced with 921d195187 2015-02-28 11:20:59 +00:00
Kamil Dudka
921d195187 tool: wrap lines longer than 79 columns
... to avoid a build failure when configured with --enable-debug
2015-02-28 10:54:59 +01:00
Tatsuhiro Tsujikawa
48b5374e65 http2: Return error if stream was closed with other than NO_ERROR
Previously, we just ignored error code passed to
on_stream_close_callback and just return 0 (success) after stream
closure even if stream was reset with error.  This patch records error
code in on_stream_close_callback, and return -1 and use CURLE_HTTP2
error code on abnormal stream closure.
2015-02-27 21:17:27 +00:00
Steve Holme
c715fa0b60 tool: Updated the warnf() function to use the GlobalConfig structure
As the 'error' and 'mute' options are now part of the GlobalConfig,
rather than per Operation, updated the warnf() function to use this
structure rather than the OperationConfig.
2015-02-27 21:05:52 +00:00
Steve Holme
adf27bf60f build: Removed DataExecutionPrevention directive from VC9+ project files
Removed the DataExecutionPrevention directive from the project files for
Visual Studio 2008 and above. The XML value in the VC9 project files was
set to "0" (Default) whilst the VC10+ project files contained an empty
XML element.
2015-02-26 20:58:02 +00:00
Steve Holme
e71bcb659c build: Use default RandomizedBaseAddress directive in VC9+ project files
Visual Studio 2008 introduced support for the address space layout
randomization (ASLR) feature of Windows Vista. However, upgrading the
VC8 project files to VC9 and above disabled this feature.

Removed the RandomizedBaseAddress directive to enabled the default
setting (/DYNAMICBASE). Note: This doesn't appear to have any negative
impact when compiled and ran on Windows XP.
2015-02-26 20:57:19 +00:00
Steve Holme
0d04e859e1 build: Added support to Generate.bat for files in the upcoming vauth folder 2015-02-26 20:47:23 +00:00
Daniel Stenberg
bc3a44aebc http2: return recv error on unexpected EOF
Pointed-out-by: Tatsuhiro Tsujikawa
Bug: http://curl.haxx.se/bug/view.cgi?id=1487
2015-02-25 13:51:21 +01:00
Kamil Dudka
1514b718e3 dist: add symbol-scan.pl to the tarball
... in order to make test1135 succeed
2015-02-25 12:13:21 +01:00
Daniel Stenberg
b9c190ba77 http2: move lots of verbose output to be debug-only 2015-02-25 11:45:46 +01:00
Kamil Dudka
e47b8306db curl-config.in: eliminate double quotes around CURL_CA_BUNDLE
Otherwise it expands to:

    echo ""/etc/pki/tls/certs/ca-bundle.crt""

Detected by ShellCheck:

    curl-config:74:16: warning: The double quotes around this do
    nothing.  Remove or escape them. [SC2140]
2015-02-25 10:23:07 +01:00
Kamil Dudka
4909f7c795 nss: do not skip Curl_nss_seed() if data is NULL
In that case, we only skip writing the error message for failed NSS
initialization (while still returning the correct error code).
2015-02-25 10:23:07 +01:00
Kamil Dudka
7a1538d9cc nss: improve error handling in Curl_nss_random()
The vtls layer now checks the return value, so it is no longer necessary
to abort if a random number cannot be provided by NSS.  This also fixes
the following Coverity report:

Error: FORWARD_NULL (CWE-476):
lib/vtls/nss.c:1918: var_compare_op: Comparing "data" to null implies that "data" might be null.
lib/vtls/nss.c:1923: var_deref_model: Passing null pointer "data" to "Curl_failf", which dereferences it.
lib/sendf.c:154:3: deref_parm: Directly dereferencing parameter "data".
2015-02-25 10:23:06 +01:00
Daniel Stenberg
0409a7d969 RELEASE-PROCEDURE: add some more future release dates
... and remove some old ones
2015-02-25 10:05:41 +01:00
Daniel Stenberg
becff7da56 sws: timeout idle CONNECT connections 2015-02-25 09:54:30 +01:00
Daniel Stenberg
4aa9bb6b13 bump: start working toward 7.42.0 2015-02-25 09:08:13 +01:00
Daniel Stenberg
ff837422ee THANKS: added contributors from the 7.41.0 RELEASE-NOTES 2015-02-25 08:34:06 +01:00
Daniel Stenberg
2e880e29bf RELEASE-NOTES: sync with ffc2aeec6e (7.41.0 release time!) 2015-02-25 08:30:27 +01:00
Marc Hoersken
ffc2aeec6e Revert "telnet.c: fix handling of 0 being returned from custom read function"
This reverts commit 03fa576833.
2015-02-25 00:16:10 +01:00
Marc Hoersken
b3bcdaf01a telnet.c: fix invalid use of custom read function if not being set
obj_count can be 1 if the custom read function is set or the stdin
handle is a reference to a pipe. Since the pipe should be handled
using the PeekNamedPipe-check below, the custom read function should
only be used if it is actually enabled.
2015-02-25 00:01:14 +01:00
Marc Hoersken
03fa576833 telnet.c: fix handling of 0 being returned from custom read function
According to [1]: "Returning 0 will signal end-of-file to the library
and cause it to stop the current transfer."
This change makes the Windows telnet code handle this case accordingly.

 [1] http://curl.haxx.se/libcurl/c/CURLOPT_READFUNCTION.html
2015-02-24 23:59:06 +01:00
Daniel Stenberg
0c050662b7 sws: stop logging about TPC_NODELAY nonsense 2015-02-24 11:51:22 +01:00
Daniel Stenberg
da39f380a4 lib530: make it less timing sensible
... by making sure the first request is completed before doing the
remainder.
2015-02-24 11:50:19 +01:00
Kamil Dudka
e08a12dab1 connect: wait for IPv4 connection attempts
... even if the last IPv6 connection attempt has failed.

Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1187531#c4
2015-02-23 13:32:28 +01:00
Kamil Dudka
92835ca5d8 connect: avoid skipping an IPv4 address
... in case the protocol versions are mixed in a DNS response
(IPv6 -> IPv4 -> IPv6).

Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1187531#c3
2015-02-23 13:31:01 +01:00
Daniel Stenberg
5d87b1f22c RELEASE-NOTES: synced with 5e4395eab8 2015-02-23 08:05:41 +01:00
Daniel Stenberg
5e4395eab8 ROADMAP: curl_easy_setopt.3 has already been split up
Remove cmake as marked for removal. It is in much better state now.
2015-02-20 23:32:48 +01:00
Daniel Stenberg
689061e3f2 ROADMAP: extend the HTTP/2 stuff, remove SPDY 2015-02-20 23:29:19 +01:00
Julian Ospald
90314100e0 configure: allow both --with-ca-bundle and --with-ca-path
SSL_CTX_load_verify_locations by default (and if given non-Null
parameters) searches the CAfile first and falls back to CApath.  This
allows for CAfile to be a basis (e.g. installed by the package manager)
and CApath to be a user configured directory.

This wasn't reflected by the previous configure constraint which this
patch fixes.

Bug: https://github.com/bagder/curl/pull/139
2015-02-20 16:30:04 +01:00
Ben Boeckel
20112ed846 cmake: install the dll file to the correct directory 2015-02-20 14:17:32 +01:00
Alessandro Ghedini
63b4b8c7bd nss: fix NPN/ALPN protocol negotiation
Correctly check for memcmp() return value (it returns 0 if the strings match).

This is not really important, since curl is going to use http/1.1 anyway, but
it's still a bug I guess.
2015-02-19 23:09:12 +01:00
Alessandro Ghedini
633b3895d7 polarssl: fix ALPN protocol negotiation
Correctly check for strncmp() return value (it returns 0 if the strings
match).
2015-02-19 23:07:40 +01:00
Sergei Nikulov
b723ec9905 CMake: Fix generation of tool_hugehelp.c on windows
Use "cmake -E echo" instead of "echo".

Reviewed-by: Brad King <brad.king@kitware.com>
2015-02-19 20:11:20 +01:00
Sergei Nikulov
ec80b1f414 CMake: fix winsock2 detection on windows
Set CMAKE_REQUIRED_DEFINITIONS to include definitions needed to get
the winsock2 API from windows.h.  Simplify the order of checks to
avoid extra conditions.

Use check_include_file instead of check_include_file_concat to look
for OpenSSL headers.  They do not need to participate in a sequence
of dependent system headers.  Also they may cause winsock.h to be
included before ws2tcpip.h, causing the latter to not be detected
in the sequence.

Reviewed-by: Brad King <brad.king@kitware.com>
2015-02-19 20:11:04 +01:00
Alessandro Ghedini
676ac46ff5 gtls: fix build with HTTP2 2015-02-19 19:00:51 +01:00
Steve Holme
31c8f8ac11 Makefile.vc6: Corrected typos in rename of darwinssl.obj 2015-02-16 00:35:16 +00:00
Nick Zitzmann
b1c7fc050b By request, change the name of "curl_darwinssl.[ch]" to "darwinssl.[ch]" 2015-02-15 17:11:01 -06:00
Steve Holme
fce3f8f487 RELEASE-NOTES: Synced with 6f89f86c3d 2015-02-14 22:24:07 +00:00
Steve Holme
6f89f86c3d tests/README: Updated to reflect email test ranges 2015-02-14 22:22:01 +00:00
Alessandro Ghedini
49655a6822 curl.1: --cert-status is also supported by OpenSSL now 2015-02-14 20:30:32 +00:00
Steve Holme
1385199e80 build: Removed Visual Studio SuppressStartupBanner directive for VC8+
Visual Studio 2005 and above defaults to disabling the startup banner
for the Compiler, Linker and MIDL tools (with /NOLOGO). As such there
is no need to explicitly set the SuppressStartupBanner directive, as
this is a leftover from the VC7 and VC7.1 projects being upgraded to
VC8 and above.
2015-02-14 20:26:03 +00:00
Kamil Dudka
aba2c4dca2 openssl: fix a compile-time warning
lib/vtls/openssl.c:1450:7: warning: extra tokens at end of #endif directive
2015-02-12 08:39:19 +01:00
Steve Holme
c1878e8f52 openssl: Use OPENSSL_IS_BORINGSSL for BoringSSL detection
For consistency with other conditionally compiled code in openssl.c,
use OPENSSL_IS_BORINGSSL rather than HAVE_BORINGSSL and try to use
HAVE_BORINGSSL outside of openssl.c when the OpenSSL header files are
not included.
2015-02-11 21:03:23 +00:00
Patrick Monnerat
ab85ac5eda ftp: accept all 2xx responses to the PORT command 2015-02-11 19:51:57 +01:00
Steve Holme
d771b44e53 openssl: Disable OCSP in old versions of OpenSSL
Versions of OpenSSL prior to v0.9.8h do not support the necessary
functions for OCSP stapling.
2015-02-09 21:01:39 +00:00
Tatsuhiro Tsujikawa
7eebf9a3fb http2: Fix bug that associated stream canceled on PUSH_PROMISE
Previously we don't ignore PUSH_PROMISE header fields in on_header
callback.  It makes header values mixed with following HEADERS,
resulting protocol error.
2015-02-09 15:52:56 +01:00
Jay Satiro
20c727ec4c polarssl: Fix exclusive SSL protocol version options
Prior to this change the options for exclusive SSL protocol versions did
not actually set the protocol exclusive.

http://curl.haxx.se/mail/lib-2015-01/0002.html
Reported-by: Dan Fandrich
2015-02-09 10:39:17 +01:00
Jay Satiro
9956ef2d33 gskit: Fix exclusive SSLv3 option 2015-02-09 10:38:46 +01:00
Daniel Stenberg
0daf1ef729 curl.1: clarify that -X is used for all requests
Reported-by: Jon Seymour
2015-02-09 10:33:54 +01:00
Daniel Stenberg
499024d208 curl.1: add warning when using -H and redirects 2015-02-08 00:05:55 +01:00
Steve Holme
761d5166af schannel: Removed curl_ prefix from source files
Removed the curl_ prefix from the schannel source files as discussed
with Marc and Daniel at FOSDEM.
2015-02-07 21:34:33 +00:00
Daniel Stenberg
05792d6936 md5: use axTLS's own MD5 functions when available 2015-02-06 14:36:25 +01:00
Daniel Stenberg
2a15e594ef MD(4|5): make the MD4_* and MD5_* functions static 2015-02-06 14:26:32 +01:00
Daniel Stenberg
d557da5d79 axtls: fix conversion from size_t to int warning 2015-02-06 14:26:32 +01:00
Steve Holme
600ccb2237 ftp: Use 'CURLcode result' for curl result codes 2015-02-05 20:31:12 +00:00
Daniel Stenberg
45b9b62de4 openssl: SSL_SESSION->ssl_version no longer exist
The struct went private in 1.0.2 so we cannot read the version number
from there anymore. Use SSL_version() instead!

Reported-by: Gisle Vanem
Bug: http://curl.haxx.se/mail/lib-2015-02/0034.html
2015-02-05 11:57:33 +01:00
Dan Fandrich
d37b58274d unit1600: Fix compilation when NTLM is disabled 2015-02-04 22:59:14 +01:00
Daniel Stenberg
0d41c3e46b MD5: fix compiler warnings and code style nits 2015-02-04 08:09:06 +01:00
Daniel Stenberg
57d6d253a1 MD5: replace implementation
The previous one was "encumbered" by RSA Inc - to avoid the licensing
restrictions it has being replaced. This is the initial import,
inserting the md5.c and md5.h files from
http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5

Code-by: Alexander Peslyak
2015-02-04 08:09:06 +01:00
Daniel Stenberg
7f1d76f7ee MD4: fix compiler warnings and code style nits 2015-02-04 08:09:06 +01:00
Daniel Stenberg
211d5329f4 MD4: replace implementation
The previous one was "encumbered" by RSA Inc - to avoid the licensing
restrictions it has being replaced. This is the initial import,
inserting the md4.c and md4.h files from
http://openwall.info/wiki/people/solar/software/public-domain-source-code/md4

Code-by: Alexander Peslyak
2015-02-04 08:09:05 +01:00
Steve Holme
cfc6d460cb telnet: Prefer 'CURLcode result' for curl result codes 2015-02-04 00:09:31 +00:00
Steve Holme
0ebe2c15d1 hostasyn: Prefer 'CURLcode result' for curl result codes 2015-02-04 00:07:39 +00:00
Steve Holme
28c9e1edf4 schannel: Prefer 'CURLcode result' for curl result codes 2015-02-04 00:07:16 +00:00
Daniel Stenberg
b3cbf4500d unit1601: MD5 unit tests 2015-02-03 23:05:55 +01:00
Daniel Stenberg
83bb07027d unit1600: unit test for Curl_ntlm_core_mk_nt_hash 2015-02-03 21:03:11 +01:00
Daniel Stenberg
6b68aa989c unit1600: NTLM unit test 2015-02-03 20:37:44 +01:00
Daniel Stenberg
8f027aa0bf tests/README: add a new range, clean up some language 2015-02-03 10:46:39 +01:00
Jay Satiro
ac100f1624 opts: CURLOPT_CAINFO availability depends on SSL engine 2015-02-03 08:41:25 +01:00
Daniel Stenberg
f91a7bc992 getpass: protect include with proper #ifdef
Reported-by: Tamir
2015-02-03 07:57:54 +01:00
Daniel Stenberg
859a82a85c getpass_r: read from stdin, not stdout!
The file number used was wrong. This bug was introduced over 10 years
ago, proving this function isn't used much...

Bug: http://curl.haxx.se/bug/view.cgi?id=1476
Reported-by: Tamir
2015-02-03 00:30:45 +01:00
Daniel Stenberg
8f369c53cf test1135: verify the CURL_EXTERN order in header files 2015-02-02 23:32:38 +01:00
Daniel Stenberg
6f494c5e34 Makefile.am: fix 'make distcheck'
... by removing generated files from the *_DIST variable [*] and instead
generate them with a .dist suffix, since that is then handled and put
into the release archive by our generic dist-hook.

[*] = 'make distcheck' fails with non-existing files listed there
2015-02-02 23:11:44 +01:00
Steve Holme
0a7182f6ad curl_sasl.c: More code policing
Better use of 80 character line limit, comment corrections and line
spacing preferences.
2015-02-02 16:50:39 +00:00
Daniel Stenberg
ae9963776a libcurl-symbols: first basic shot for autogenerated docs 2015-02-02 15:38:54 +01:00
Daniel Stenberg
7b5348415f FAQ: minor edit of 3.22 2015-02-02 15:38:29 +01:00
Steve Holme
c49e228916 build: Added removal of Visual Studio project files
Added the removal of the locally generated project files so one
may revert to a clean repository.
2015-02-02 12:43:04 +00:00
Steve Holme
957fcd9049 build: Renamed top level Visual Studio solution files
In preparation for adding the test suite and examples projects renamed
the top level "all" solution files to better describe what they are.

This will also enable us to use "curl" rather than "curlsrc" for the
command line tool solution and project files, which will simplify some
of the configuration.
2015-02-02 12:43:03 +00:00
Steve Holme
f826bf37ea build: Enabled DEBUGBUILD in Visual Studio debug builds
Defined the DEBUGBUILD pre-processor variable to allow extra logging,
which is particularly useful in debug builds, as we use this and Visual
Studio typically uses _DEBUG.

We could define DEBUBBUILD, in curl_setup.h, when _MSC_VER and _DEBUG is
defined but that would also affect the makefile based builds which we
probably don't want to do.
2015-02-02 12:43:02 +00:00
Steve Holme
564b7b6dd0 build: Removed unused Visual Studio bscmake settings 2015-02-02 12:43:00 +00:00
Daniel Stenberg
ca51ac4017 CURLOPT_HTTP_VERSION.3: CURL_HTTP_VERSION_2_0 added in 7.33.0
And modify the text to refer to HTTP 2 as it isn't called "2.0".

Reported-By: Michael Wallner
2015-02-02 13:17:20 +01:00
Marc Hoersken
4161624e94 TODO: moved WinSSL/SChannel todo items into docs 2015-01-31 12:30:11 +01:00
Michael Kaufmann
04f246f8c7 CURLOPT_SEEKFUNCTION.3: also when server closes a connection 2015-01-29 22:34:21 +01:00
Steve Holme
8ca3b05624 curl_sasl.c: Fixed compilation warning when cryptography is disabled
curl_sasl.c:1506: warning: unused variable 'chlg'
2015-01-29 11:48:11 +00:00
Steve Holme
6fdc8651bd curl_sasl.c: Fixed compilation warning when verbose debug output disabled
curl_sasl.c:1317: warning: unused parameter 'conn'
2015-01-28 22:48:01 +00:00
Steve Holme
8cc70db2db ntlm_core: Use own odd parity function when crypto engine doesn't have one 2015-01-28 22:34:53 +00:00
Steve Holme
c469369b86 ntlm_core: Prefer sizeof(key) rather than hard coded sizes 2015-01-28 22:34:52 +00:00
Steve Holme
58e39b4da5 ntlm_core: Added consistent comments to DES functions 2015-01-28 22:34:51 +00:00
Steve Holme
300876a7a6 des: Added Curl_des_set_odd_parity()
Added Curl_des_set_odd_parity() for use when cryptography engines
don't include this functionality.
2015-01-28 22:34:49 +00:00
Steve Holme
ef782d726e tests: Grouped SMTP SASL EXTERNAL tests with other SMTP tests 2015-01-28 19:55:06 +00:00
Steve Holme
26d4e0ad4e tests: Grouped POP3 SASL EXTERNAL tests with other POP3 tests 2015-01-28 19:51:15 +00:00
Steve Holme
e3558a551b tests: Grouped IMAP SASL EXTERNAL tests with other IMAP tests 2015-01-28 19:50:34 +00:00
Steve Holme
595a66ce0f sasl: Minor code policing and grammar corrections 2015-01-28 19:23:37 +00:00
Gisle Vanem
3cc9e9383b ldap: build with BoringSSL 2015-01-28 14:22:11 +01:00
Daniel Stenberg
9d964e5477 security: avoid compiler warning
Possible access to uninitialised memory '&nread' at line 140 of
lib/security.c in function 'ftp_send_command'.

Reported-by: Rich Burridge
2015-01-28 10:10:59 +01:00
Daniel Stenberg
153e9c0278 runtests: identify BoringSSL and libressl 2015-01-28 10:10:59 +01:00
Patrick Monnerat
980ba2202c docs: cite SASL external authentication. 2015-01-27 19:10:18 +01:00
Patrick Monnerat
7b2012f262 sasl: remove XOAUTH2 from default enabled authentication mechanism. 2015-01-27 18:08:18 +01:00
Patrick Monnerat
ed9a4b9fc4 test: add test cases for sasl external authentication (imap/pop3/smtp). 2015-01-27 18:03:56 +01:00
Patrick Monnerat
fe79f20957 imap: remove automatic password setting: it breaks external sasl authentication 2015-01-27 17:34:40 +01:00
Patrick Monnerat
0d24f64473 sasl: implement EXTERNAL authentication mechanism.
Its use is only enabled by explicit requirement in URL (;AUTH=EXTERNAL) and
by not setting the password.
2015-01-27 17:24:55 +01:00
Steve Holme
e1bb13c09f openssl: Fixed Curl_ossl_cert_status_request() not returning FALSE
Modified the Curl_ossl_cert_status_request() function to return FALSE
when built with BoringSSL or when OpenSSL is missing the necessary TLS
extensions.
2015-01-27 12:53:41 +00:00
Steve Holme
a268a804b7 openssl: Fixed compilation errors when OpenSSL built with 'no-tlsext'
Fixed the build of openssl.c when OpenSSL is built without the necessary
TLS extensions for OCSP stapling.

Reported-by: John E. Malmberg
2015-01-27 12:47:48 +00:00
Brad Spencer
5691325440 curl_setup: Disable SMB/CIFS support when HTTP only 2015-01-26 18:48:44 +00:00
Steve Holme
db6bcbd83f RELEASE-NOTES: Synced with 37824498a3 2015-01-23 07:57:09 +00:00
Daniel Stenberg
37824498a3 configure: remove detection of the old yassl emulation API
... as that is ancient history and not used.
2015-01-22 23:53:52 +01:00
Daniel Stenberg
23c6f0a344 OCSP stapling: disabled when build with BoringSSL 2015-01-22 23:34:43 +01:00
Alessandro Ghedini
d1cf5d5706 openssl: add support for the Certificate Status Request TLS extension
Also known as "status_request" or OCSP stapling, defined in RFC6066
section 8.

Thanks-to: Joe Mason
- for the work-around for the OpenSSL bug.
2015-01-22 23:25:23 +01:00
Daniel Stenberg
e888e30476 BoringSSL: fix build for non-configure builds
HAVE_BORINGSSL gets defined now by configure and should be defined by
other build systems in case a BoringSSL build is desired.
2015-01-22 23:04:10 +01:00
Daniel Stenberg
3d5648f9ee configure: fix BoringSSL detection and detect libresssl 2015-01-22 22:52:53 +01:00
Steve Holme
12e45b8462 curl_sasl: Reinstate the sasl_ prefix for locally scoped functions
Commit 7a8b2885e2 made some functions static and removed the public
Curl_ prefix. Unfortunately, it also removed the sasl_ prefix, which
is the naming convention we use in this source file.
2015-01-22 21:32:41 +00:00
Steve Holme
c260c9fad3 curl_sasl: Minor code policing following recent commits 2015-01-22 21:08:18 +00:00
John Malmberg
731e6a6662 openvms: Handle openssl/0.8.9zb version parsing
packages/vms/gnv_link_curl.com was assuming only a single letter suffix
in the openssl version.  That assumption has been fixed for 7.40.
2015-01-22 17:00:25 +01:00
Daniel Stenberg
eb748f159a BoringSSL: detected by configure, switches off NTLM 2015-01-22 16:39:01 +01:00
Daniel Stenberg
d6c4695dcd BoringSSL: no PKCS12 support nor ERR_remove_state 2015-01-22 16:39:01 +01:00
Leith Bade
261208d432 BoringSSL: fix build 2015-01-22 16:39:01 +01:00
Steve Holme
795f013006 curl_sasl.c: chlglen is not used when cryptography is disabled 2015-01-20 19:28:54 +00:00
Steve Holme
71f8fdee81 curl_sasl.c: Fixed compilation warning when cyptography is disabled
curl_sasl.c:1453: warning C4101: 'serverdata' : unreferenced local
                  variable
2015-01-20 19:25:43 +00:00
Steve Holme
6005b0d99c curl_sasl.c: Fixed compilation error when USE_WINDOWS_SSPI defined
curl_sasl.c:1221: error C2065: 'mechtable' : undeclared identifier

This error could also happen for non-SSPI builds when cryptography is
disabled (CURL_DISABLE_CRYPTO_AUTH is defined).
2015-01-20 19:24:47 +00:00
Patrick Monnerat
7a8b2885e2 SASL: make some procedures local-scoped 2015-01-20 18:17:55 +01:00
Patrick Monnerat
79543caf90 SASL: common state engine for imap/pop3/smtp 2015-01-20 17:33:05 +01:00
Patrick Monnerat
e1ea18f90e SASL: common URL option and auth capabilities decoders for all protocols 2015-01-20 15:27:25 +01:00
Patrick Monnerat
5f09cbcdbd IMAP/POP3/SMTP: use a per-connection sub-structure for SASL parameters. 2015-01-20 14:14:26 +01:00
Daniel Stenberg
960b04e137 ipv6: enclose AF_INET6 uses with proper #ifdefs for ipv6
Reported-by: Chris Young
2015-01-20 09:03:55 +01:00
Chris Young
089783c838 timeval: typecast for better type (on Amiga)
There is an issue with conflicting "struct timeval" definitions with
certain AmigaOS releases and C libraries, depending on what gets
included when.  It's a minor difference - the OS one is unsigned,
whereas the common structure has signed elements.  If the OS one ends up
getting defined, this causes a timing calculation error in curl.

It's easy enough to resolve this at the curl end, by casting the
potentially errorneous calculation to a signed long.
2015-01-20 08:53:14 +01:00
Daniel Stenberg
be57f689b0 openssl: do public key pinning check independently
... of the other cert verification checks so that you can set verifyhost
and verifypeer to FALSE and still check the public key.

Bug: http://curl.haxx.se/bug/view.cgi?id=1471
Reported-by: Kyle J. McKay
2015-01-19 23:20:13 +01:00
Patrick Monnerat
fca58f6212 OS400: CURLOPT_SSL_VERIFYSTATUS for ILE/RPG too. 2015-01-19 13:52:40 +01:00
Steve Holme
2cc571f9e3 ldap: Renamed the CURL_LDAP_WIN definition to USE_WIN32_LDAP
For consistency with other USE_WIN32_ defines as well as the
USE_OPENLDAP define.
2015-01-18 20:52:43 +00:00
Steve Holme
1cbc8fd3d1 http_negotiate: Use dynamic buffer for SPN generation
Use a dynamicly allocated buffer for the temporary SPN variable similar
to how the SASL GSS-API code does, rather than using a fixed buffer of
2048 characters.
2015-01-18 15:45:12 +00:00
Steve Holme
9c4fa400cf sasl_gssapi: Make Curl_sasl_build_gssapi_spn() public 2015-01-18 15:42:26 +00:00
Steve Holme
b9fd757d03 sasl_gssapi: Fixed memory leak with local SPN variable 2015-01-18 15:40:07 +00:00
Daniel Stenberg
3a9419f65a http_negotiate.c: unused variable 'ret' 2015-01-17 23:14:40 +01:00
Steve Holme
1d25acb038 gskit.h: Code policing of function pointer arguments 2015-01-17 17:02:01 +00:00
Steve Holme
5d5c78b47f vtls: Removed unimplemented overrides of curlssl_close_all()
Carrying on from commit 037cd0d991, removed the following unimplemented
instances of curlssl_close_all():

Curl_axtls_close_all()
Curl_darwinssl_close_all()
Curl_cyassl_close_all()
Curl_gskit_close_all()
Curl_gtls_close_all()
Curl_nss_close_all()
Curl_polarssl_close_all()
2015-01-17 16:41:03 +00:00
Steve Holme
8bb3443a21 vtls: Separate the SSL backend definition from the API setup
Slight code cleanup as the SSL backend #define is mixed up with the API
function setup.
2015-01-17 15:38:22 +00:00
Steve Holme
30ef1a0779 vtls: Fixed compilation errors when SSL not used
Fixed the following warning and error from commit 3af90a6e19 when SSL
is not being used:

url.c:2004: warning C4013: 'Curl_ssl_cert_status_request' undefined;
            assuming extern returning int

error LNK2019: unresolved external symbol Curl_ssl_cert_status_request
               referenced in function Curl_setopt
2015-01-17 15:16:07 +00:00
Steve Holme
81b98dafa1 http_negotiate: Added empty decoded challenge message info text 2015-01-17 14:58:36 +00:00
Steve Holme
47438daa60 http_negotiate: Return CURLcode in Curl_input_negotiate() instead of int 2015-01-17 14:57:17 +00:00
Steve Holme
36e6404228 http_negotiate_sspi: Prefer use of 'attrs' for context attributes
Use the same variable name as other areas of SSPI code.
2015-01-17 13:28:44 +00:00
Steve Holme
930be07067 http_negotiate_sspi: Use correct return type for QuerySecurityPackageInfo()
Use the SECURITY_STATUS typedef rather than a unsigned long for the
QuerySecurityPackageInfo() return and rename the variable as per other
areas of SSPI code.
2015-01-17 13:28:03 +00:00
Steve Holme
30eb6bbdc9 http_negotiate_sspi: Use 'CURLcode result' for CURL result code 2015-01-17 13:15:09 +00:00
Steve Holme
a2f8887b79 curl_endian: Fixed build when 64-bit integers are not supported (Part 2)
Missed Curl_read64_be() in commit bb12d44471 :(
2015-01-16 23:01:27 +00:00
Daniel Stenberg
b2c01f02d5 CURLOPT_SSL_VERIFYSTATUS.3: mention it is added in version 7.41.0 2015-01-16 23:41:50 +01:00
Daniel Stenberg
c807ce73ed curlver.h: next release is 7.41.0 due to the changes 2015-01-16 23:36:50 +01:00
Daniel Stenberg
af8928a23b RELEASE-NOTES: mention the new OCSP stapling options, bump version 2015-01-16 23:36:02 +01:00
Daniel Stenberg
14a6cfaddb opts: add CURLOPT_SSL_VERIFYSTATUS* to docs/Makefile 2015-01-16 23:34:28 +01:00
Daniel Stenberg
0b1f37e77c help: add --cert-status to --help output 2015-01-16 23:23:29 +01:00
Daniel Stenberg
a4065ebf1c copyright years: after OCSP stapling changes 2015-01-16 23:23:29 +01:00
Alessandro Ghedini
bd0c3b3c66 curl: add --cert-status option
This enables the CURLOPT_SSL_VERIFYSTATUS functionality.
2015-01-16 23:23:29 +01:00
Alessandro Ghedini
f46c6fbee0 nss: add support for the Certificate Status Request TLS extension
Also known as "status_request" or OCSP stapling, defined in RFC6066 section 8.

This requires NSS 3.15 or higher.
2015-01-16 23:23:29 +01:00
Alessandro Ghedini
f13669a375 gtls: add support for the Certificate Status Request TLS extension
Also known as "status_request" or OCSP stapling, defined in RFC6066 section 8.

This requires GnuTLS 3.1.3 or higher to build, however it's recommended to use
at least GnuTLS 3.3.11 since previous versions had a bug that caused the OCSP
response verfication to fail even on valid responses.
2015-01-16 23:23:29 +01:00
Alessandro Ghedini
3af90a6e19 url: add CURLOPT_SSL_VERIFYSTATUS option
This option can be used to enable/disable certificate status verification using
the "Certificate Status Request" TLS extension defined in RFC6066 section 8.

This also adds the CURLE_SSL_INVALIDCERTSTATUS error, to be used when the
certificate status verification fails, and the Curl_ssl_cert_status_request()
function, used to check whether the SSL backend supports the status_request
extension.
2015-01-16 23:23:29 +01:00
Daniel Stenberg
5e113a18c5 TheArtOfHttpScripting: skip the date at the top, we have git 2015-01-16 23:23:29 +01:00
Daniel Stenberg
5940e06f01 TheArtOfHttpScripting: phrase it TLS lib agnostic 2015-01-16 23:23:29 +01:00
Steve Holme
5c73cdef62 TODO: Added some SMB ideas 2015-01-16 22:22:28 +00:00
Steve Holme
251a349055 RELEASE-NOTES: Synced with 5f09947d28 2015-01-16 21:52:21 +00:00
Steve Holme
5f09947d28 build-openssl.bat: Added check for Perl installation 2015-01-16 21:15:52 +00:00
Steve Holme
224cf1c274 checksrc.bat: Better detection of Perl installation 2015-01-16 21:14:22 +00:00
Steve Holme
bb12d44471 curl_endian: Fixed build when 64-bit integers are not supported
Bug: http://curl.haxx.se/mail/lib-2015-01/0094.html
Reported-by: John E. Malmberg
2015-01-16 12:31:24 +00:00
Yun SangHo
bcf07f8a4b curl.h: remove extra space 2015-01-15 23:41:32 +01:00
Daniel Stenberg
cc28bc472e Curl_pretransfer: reset expected transfer sizes
Reported-by: Mohammad AlSaleh
Bug: http://curl.haxx.se/mail/lib-2015-01/0065.html
2015-01-14 23:31:57 +01:00
Marc Hoersken
e9834808e9 curl_schannel.c: mark session as removed from cache if not freed
If the session is still used by active SSL/TLS connections, it
cannot be closed yet. Thus we mark the session as not being cached
any longer so that the reference counting mechanism in
Curl_schannel_shutdown is used to close and free the session.

Reported-by: Jean-Francois Durand
2015-01-12 21:56:05 +01:00
Steve Holme
710c38d7a4 RELEASE-NOTES: Synced with d21b66835f 2015-01-09 22:20:35 +00:00
Guenter Knauf
d21b66835f Merge pull request #134 from vszakats/mingw-m64
add -m64 CFLAGS when targeting mingw64, add -m32/-m64 to LDFLAGS
2015-01-09 22:03:12 +01:00
Guenter Knauf
4e58589b0e Merge pull request #136 from vszakats/mingw-allow-custom-cflags
mingw build: allow to pass custom CFLAGS
2015-01-09 22:02:23 +01:00
Daniel Stenberg
e6b4b4b66d NSS: fix compiler error when built http2-enabled 2015-01-09 21:55:52 +01:00
Steve Holme
355bf01c82 gssapi: Remove need for duplicated GSS_C_NT_HOSTBASED_SERVICE definitions
Better code reuse and consistency in calls to gss_import_name().
2015-01-09 20:37:47 +00:00
Viktor Szakats
b4f13a4952 mingw build: allow to pass custom CFLAGS 2015-01-09 21:03:54 +01:00
Daniel Stenberg
99e71e6a84 FTP: if EPSV fails on IPV6 connections, bail out
... instead of trying PASV, since PASV can't work with IPv6.

Reported-by: Vojtěch Král
2015-01-08 22:32:37 +01:00
Daniel Stenberg
9a452ba3a1 FTP: fix IPv6 host using link-local address
... and make sure we can connect the data connection to a host name that
is longer than 48 bytes.

Also simplifies the code somewhat by re-using the original host name
more, as it is likely still in the DNS cache.

Original-Patch-by: Vojtěch Král
Bug: http://curl.haxx.se/bug/view.cgi?id=1468
2015-01-08 22:32:37 +01:00
Sam Schanken
659d252b6f winbuild: Added option to build with c-ares
Added support for a WITH_CARES option to be used when invoking nmake
via Makefile.vc. This option enables linking against both the DLL and
static versions of the c-ares libraries, as well as the debug and
release varients, depending on the value of DEBUG. The USE_ARES
preprocessor symbol is also defined.
2015-01-08 21:12:43 +00:00
Guenter Knauf
c712fe01a9 NetWare build: added TLS-SRP enabled build. 2015-01-08 21:40:35 +01:00
Steve Holme
5c0e66d632 sasl_gssapi: Fixed build on NetBSD with built-in GSS-API
Bug: http://curl.haxx.se/bug/view.cgi?id=1469
Reported-by: Thomas Klausner
2015-01-08 19:36:58 +00:00
Viktor Szakats
acc8089bc2 add -m64 clags when targeting mingw64, add -m32/-m64 to LDFLAGS 2015-01-08 18:19:03 +01:00
Daniel Stenberg
34636fa47e bump: start working towards 7.40.1 2015-01-08 10:00:28 +01:00
Daniel Stenberg
003076e17c THANKS: 14 new contributors from the 7.40.0 release notes 2015-01-08 09:57:19 +01:00
907 changed files with 35836 additions and 20009 deletions

61
.gitignore vendored
View File

@@ -1,48 +1,51 @@
.deps *.asc
.libs
*.lib
*.pdb
*.dll *.dll
*.exe *.exe
*.obj
*.asc
.*.swp
Debug
Release
*.exp *.exp
*.la
*.lib
*.lo
*.o
*.obj
*.pdb
*~
.*.swp
.cproject
.deps
.dirstamp
.libs
.project
.settings
/build/
/builds/
CHANGES.dist
Debug
INSTALL
Makefile Makefile
Makefile.in Makefile.in
Release
TAGS
aclocal.m4 aclocal.m4
aclocal.m4.bak
autom4te.cache autom4te.cache
compile
config.cache config.cache
config.guess config.guess
config.log config.log
config.status config.status
config.sub config.sub
configure configure
depcomp
libtool
ltmain.sh
compile
curl-config
libcurl.pc
missing
curl-*.tar.gz
curl-*.tar.bz2 curl-*.tar.bz2
curl-*.tar.gz
curl-*.tar.lzma curl-*.tar.lzma
curl-*.zip curl-*.zip
INSTALL curl-config
depcomp
install-sh install-sh
*.o libcurl.pc
*.lo libtool
*.la ltmain.sh
missing
mkinstalldirs mkinstalldirs
tags tags
TAGS test-driver
*~
aclocal.m4.bak
CHANGES.dist
.project
.cproject
.settings
.dirstamp

View File

@@ -1,8 +1,20 @@
os:
- linux
- osx
sudo: false
language: c language: c
install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update > /dev/null; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install openssl libidn rtmpdump libssh2 c-ares libmetalink libressl nghttp2; fi
before_script: before_script:
- ./buildconf - ./buildconf
script: ./configure --enable-debug && make && make test-full
compiler: compiler:
- clang - clang
- gcc - gcc

14
CHANGES
View File

@@ -1,15 +1,7 @@
_ _ ____ _ See http://curl.haxx.se/changes.html for the edited and human readable online
___| | | | _ \| | version of what has changed over the years in different curl releases.
/ __| | | | |_) | |
| (__| |_| | _ <| |___
\___|\___/|_| \_\_____|
Changelog Generate a CHANGES file like the one present in evey release like this:
This file no longer holds the changelog. Now you can generate it yourself
like this:
$ git log --pretty=fuller --no-color --date=short --decorate=full | \ $ git log --pretty=fuller --no-color --date=short --decorate=full | \
./log2changes.pl ./log2changes.pl
The older, manually edited, changelog is found in git named CHANGES.0

View File

@@ -139,7 +139,7 @@ int main(void)
rc = gethostbyname_r(address, &h, &hdata); rc = gethostbyname_r(address, &h, &hdata);
#elif defined(HAVE_GETHOSTBYNAME_R_5) || \ #elif defined(HAVE_GETHOSTBYNAME_R_5) || \
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT)
rc = gethostbyname_r(address, &h, buffer, 8192, 0, &h_errnop); rc = gethostbyname_r(address, &h, buffer, 8192, &h_errnop);
(void)hp; /* not used for test */ (void)hp; /* not used for test */
#elif defined(HAVE_GETHOSTBYNAME_R_6) || \ #elif defined(HAVE_GETHOSTBYNAME_R_6) || \
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT) defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)

View File

@@ -155,7 +155,7 @@ message(STATUS "LDFLAGS: ${_GSS_LIB_FLAGS}")
set(GSS_FLAVOUR "MIT") set(GSS_FLAVOUR "MIT")
else() else()
# prevent compiling the header - just check if we can include it # prevent compiling the header - just check if we can include it
set(CMAKE_REQUIRED_DEFINITIONS "-D__ROKEN_H__") set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D__ROKEN_H__")
check_include_file( "roken.h" _GSS_HAVE_ROKEN_H) check_include_file( "roken.h" _GSS_HAVE_ROKEN_H)
check_include_file( "heimdal/roken.h" _GSS_HAVE_HEIMDAL_ROKEN_H) check_include_file( "heimdal/roken.h" _GSS_HAVE_HEIMDAL_ROKEN_H)

View File

@@ -10,8 +10,8 @@ endmacro(add_header_include)
set(signature_call_conv) set(signature_call_conv)
if(HAVE_WINDOWS_H) if(HAVE_WINDOWS_H)
add_header_include(HAVE_WINDOWS_H "windows.h")
add_header_include(HAVE_WINSOCK2_H "winsock2.h") add_header_include(HAVE_WINSOCK2_H "winsock2.h")
add_header_include(HAVE_WINDOWS_H "windows.h")
add_header_include(HAVE_WINSOCK_H "winsock.h") add_header_include(HAVE_WINSOCK_H "winsock.h")
set(_source_epilogue set(_source_epilogue
"${_source_epilogue}\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif") "${_source_epilogue}\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif")

View File

@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___ # | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____| # \___|\___/|_| \_\_____|
# #
# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. # Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
# #
# This software is licensed as described in the file COPYING, which # This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms # you should have received as part of this distribution. The terms
@@ -76,6 +76,24 @@ option(BUILD_CURL_TESTS "Set to ON to build cURL tests." ON)
option(CURL_STATICLIB "Set to ON to build libcurl with static linking." OFF) option(CURL_STATICLIB "Set to ON to build libcurl with static linking." OFF)
option(ENABLE_ARES "Set to ON to enable c-ares support" OFF) option(ENABLE_ARES "Set to ON to enable c-ares support" OFF)
option(ENABLE_THREADED_RESOLVER "Set to ON to enable POSIX threaded DNS lookup" OFF) option(ENABLE_THREADED_RESOLVER "Set to ON to enable POSIX threaded DNS lookup" OFF)
option(ENABLE_DEBUG "Set to ON to enable curl debug features" OFF)
option(ENABLE_CURLDEBUG "Set to ON to build with TrackMemory feature enabled" OFF)
if (ENABLE_DEBUG)
# DEBUGBUILD will be defined only for Debug builds
if(NOT CMAKE_VERSION VERSION_LESS 3.0)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:Debug>:DEBUGBUILD>)
else()
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUGBUILD)
endif()
set(ENABLE_CURLDEBUG ON)
endif()
if (ENABLE_CURLDEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS CURLDEBUG)
endif()
# initialize CURL_LIBS # initialize CURL_LIBS
set(CURL_LIBS "") set(CURL_LIBS "")
@@ -104,10 +122,10 @@ endif()
option(CURL_HIDDEN_SYMBOLS "Set to ON to hide libcurl internal symbols (=hide all symbols that aren't officially external)." ON) option(CURL_HIDDEN_SYMBOLS "Set to ON to hide libcurl internal symbols (=hide all symbols that aren't officially external)." ON)
mark_as_advanced(CURL_HIDDEN_SYMBOLS) mark_as_advanced(CURL_HIDDEN_SYMBOLS)
# IF(WIN32) IF(WIN32)
# OPTION(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without openssl" ON) OPTION(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without openssl" ON)
# MARK_AS_ADVANCED(CURL_WINDOWS_SSPI) MARK_AS_ADVANCED(CURL_WINDOWS_SSPI)
# ENDIF() ENDIF()
option(HTTP_ONLY "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)" OFF) option(HTTP_ONLY "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)" OFF)
mark_as_advanced(HTTP_ONLY) mark_as_advanced(HTTP_ONLY)
@@ -168,7 +186,7 @@ option(DISABLED_THREADSAFE "Set to explicitly specify we don't want to use threa
mark_as_advanced(DISABLED_THREADSAFE) mark_as_advanced(DISABLED_THREADSAFE)
option(ENABLE_IPV6 "Define if you want to enable IPv6 support" ON) option(ENABLE_IPV6 "Define if you want to enable IPv6 support" ON)
mark_as_advanced(ENABLE_IPV6) mark_as_advanced(ENABLE_IPV6)
if(ENABLE_IPV6) if(ENABLE_IPV6 AND NOT WIN32)
include(CheckStructHasMember) include(CheckStructHasMember)
check_struct_has_member("struct sockaddr_in6" sin6_addr "netinet/in.h" check_struct_has_member("struct sockaddr_in6" sin6_addr "netinet/in.h"
HAVE_SOCKADDR_IN6_SIN6_ADDR) HAVE_SOCKADDR_IN6_SIN6_ADDR)
@@ -238,6 +256,7 @@ include (CheckCSourceCompiles)
# On windows preload settings # On windows preload settings
if(WIN32) if(WIN32)
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_WINSOCKAPI_")
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Platforms/WindowsCache.cmake) include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Platforms/WindowsCache.cmake)
endif(WIN32) endif(WIN32)
@@ -279,7 +298,6 @@ endif()
option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON) option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON)
mark_as_advanced(CMAKE_USE_OPENSSL) mark_as_advanced(CMAKE_USE_OPENSSL)
set(USE_SSLEAY OFF)
set(USE_OPENSSL OFF) set(USE_OPENSSL OFF)
set(HAVE_LIBCRYPTO OFF) set(HAVE_LIBCRYPTO OFF)
set(HAVE_LIBSSL OFF) set(HAVE_LIBSSL OFF)
@@ -288,32 +306,31 @@ if(CMAKE_USE_OPENSSL)
find_package(OpenSSL) find_package(OpenSSL)
if(OPENSSL_FOUND) if(OPENSSL_FOUND)
list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES}) list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES})
set(USE_SSLEAY ON)
set(USE_OPENSSL ON) set(USE_OPENSSL ON)
set(HAVE_LIBCRYPTO ON) set(HAVE_LIBCRYPTO ON)
set(HAVE_LIBSSL ON) set(HAVE_LIBSSL ON)
include_directories(${OPENSSL_INCLUDE_DIR}) include_directories(${OPENSSL_INCLUDE_DIR})
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
check_include_file_concat("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H) check_include_file("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H)
check_include_file_concat("openssl/engine.h" HAVE_OPENSSL_ENGINE_H) check_include_file("openssl/engine.h" HAVE_OPENSSL_ENGINE_H)
check_include_file_concat("openssl/err.h" HAVE_OPENSSL_ERR_H) check_include_file("openssl/err.h" HAVE_OPENSSL_ERR_H)
check_include_file_concat("openssl/pem.h" HAVE_OPENSSL_PEM_H) check_include_file("openssl/pem.h" HAVE_OPENSSL_PEM_H)
check_include_file_concat("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H) check_include_file("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H)
check_include_file_concat("openssl/rsa.h" HAVE_OPENSSL_RSA_H) check_include_file("openssl/rsa.h" HAVE_OPENSSL_RSA_H)
check_include_file_concat("openssl/ssl.h" HAVE_OPENSSL_SSL_H) check_include_file("openssl/ssl.h" HAVE_OPENSSL_SSL_H)
check_include_file_concat("openssl/x509.h" HAVE_OPENSSL_X509_H) check_include_file("openssl/x509.h" HAVE_OPENSSL_X509_H)
check_include_file_concat("openssl/rand.h" HAVE_OPENSSL_RAND_H) check_include_file("openssl/rand.h" HAVE_OPENSSL_RAND_H)
endif() endif()
endif() endif()
if(NOT CURL_DISABLE_LDAP) if(NOT CURL_DISABLE_LDAP)
if(WIN32) if(WIN32)
option(CURL_LDAP_WIN "Use Windows LDAP implementation" ON) option(USE_WIN32_LDAP "Use Windows LDAP implementation" ON)
if(CURL_LDAP_WIN) if(USE_WIN32_LDAP)
check_library_exists("wldap32" cldap_open "" HAVE_WLDAP32) check_library_exists("wldap32" cldap_open "" HAVE_WLDAP32)
if(NOT HAVE_WLDAP32) if(NOT HAVE_WLDAP32)
set(CURL_LDAP_WIN OFF) set(USE_WIN32_LDAP OFF)
endif() endif()
endif() endif()
endif() endif()
@@ -323,12 +340,12 @@ if(NOT CURL_DISABLE_LDAP)
set(CMAKE_LDAP_LIB "ldap" CACHE STRING "Name or full path to ldap library") set(CMAKE_LDAP_LIB "ldap" CACHE STRING "Name or full path to ldap library")
set(CMAKE_LBER_LIB "lber" CACHE STRING "Name or full path to lber library") set(CMAKE_LBER_LIB "lber" CACHE STRING "Name or full path to lber library")
if(CMAKE_USE_OPENLDAP AND CURL_LDAP_WIN) if(CMAKE_USE_OPENLDAP AND USE_WIN32_LDAP)
message(FATAL_ERROR "Cannot use CURL_LDAP_WIN and CMAKE_USE_OPENLDAP at the same time") message(FATAL_ERROR "Cannot use USE_WIN32_LDAP and CMAKE_USE_OPENLDAP at the same time")
endif() endif()
# Now that we know, we're not using windows LDAP... # Now that we know, we're not using windows LDAP...
if(NOT CURL_LDAP_WIN) if(NOT USE_WIN32_LDAP)
# Check for LDAP # Check for LDAP
set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES})
check_library_exists_concat(${CMAKE_LDAP_LIB} ldap_init HAVE_LIBLDAP) check_library_exists_concat(${CMAKE_LDAP_LIB} ldap_init HAVE_LIBLDAP)
@@ -338,9 +355,10 @@ if(NOT CURL_DISABLE_LDAP)
check_include_file_concat("winber.h" HAVE_WINBER_H) check_include_file_concat("winber.h" HAVE_WINBER_H)
endif() endif()
set(CMAKE_REQUIRED_INCLUDES_BAK ${CMAKE_REQUIRED_INCLUDES})
set(CMAKE_LDAP_INCLUDE_DIR "" CACHE STRING "Path to LDAP include directory") set(CMAKE_LDAP_INCLUDE_DIR "" CACHE STRING "Path to LDAP include directory")
if(CMAKE_LDAP_INCLUDE_DIR) if(CMAKE_LDAP_INCLUDE_DIR)
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_LDAP_INCLUDE_DIR}) list(APPEND CMAKE_REQUIRED_INCLUDES ${CMAKE_LDAP_INCLUDE_DIR})
endif() endif()
check_include_file_concat("ldap.h" HAVE_LDAP_H) check_include_file_concat("ldap.h" HAVE_LDAP_H)
check_include_file_concat("lber.h" HAVE_LBER_H) check_include_file_concat("lber.h" HAVE_LBER_H)
@@ -348,9 +366,11 @@ if(NOT CURL_DISABLE_LDAP)
if(NOT HAVE_LDAP_H) if(NOT HAVE_LDAP_H)
message(STATUS "LDAP_H not found CURL_DISABLE_LDAP set ON") message(STATUS "LDAP_H not found CURL_DISABLE_LDAP set ON")
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE) set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_BAK}) #LDAP includes won't be used
elseif(NOT HAVE_LIBLDAP) elseif(NOT HAVE_LIBLDAP)
message(STATUS "LDAP library '${CMAKE_LDAP_LIB}' not found CURL_DISABLE_LDAP set ON") message(STATUS "LDAP library '${CMAKE_LDAP_LIB}' not found CURL_DISABLE_LDAP set ON")
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE) set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_BAK}) #LDAP includes won't be used
else() else()
if(CMAKE_USE_OPENLDAP) if(CMAKE_USE_OPENLDAP)
set(USE_OPENLDAP ON) set(USE_OPENLDAP ON)
@@ -384,7 +404,7 @@ if(NOT CURL_DISABLE_LDAP)
return 0; return 0;
}" }"
) )
set(CMAKE_REQUIRED_DEFINITIONS "-DLDAP_DEPRECATED=1" "-DWIN32_LEAN_AND_MEAN") set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -DLDAP_DEPRECATED=1")
list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LDAP_LIB}) list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LDAP_LIB})
if(HAVE_LIBLBER) if(HAVE_LIBLBER)
list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LBER_LIB}) list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LBER_LIB})
@@ -431,6 +451,7 @@ if(CURL_ZLIB)
set(HAVE_LIBZ ON) set(HAVE_LIBZ ON)
list(APPEND CURL_LIBS ${ZLIB_LIBRARIES}) list(APPEND CURL_LIBS ${ZLIB_LIBRARIES})
include_directories(${ZLIB_INCLUDE_DIRS}) include_directories(${ZLIB_INCLUDE_DIRS})
list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
endif() endif()
endif() endif()
@@ -446,7 +467,7 @@ if(CMAKE_USE_LIBSSH2)
if(LIBSSH2_FOUND) if(LIBSSH2_FOUND)
list(APPEND CURL_LIBS ${LIBSSH2_LIBRARY}) list(APPEND CURL_LIBS ${LIBSSH2_LIBRARY})
set(CMAKE_REQUIRED_LIBRARIES ${LIBSSH2_LIBRARY}) set(CMAKE_REQUIRED_LIBRARIES ${LIBSSH2_LIBRARY})
set(CMAKE_REQUIRED_INCLUDES "${LIBSSH2_INCLUDE_DIR}") list(APPEND CMAKE_REQUIRED_INCLUDES "${LIBSSH2_INCLUDE_DIR}")
include_directories("${LIBSSH2_INCLUDE_DIR}") include_directories("${LIBSSH2_INCLUDE_DIR}")
set(HAVE_LIBSSH2 ON) set(HAVE_LIBSSH2 ON)
set(USE_LIBSSH2 ON) set(USE_LIBSSH2 ON)
@@ -474,12 +495,12 @@ mark_as_advanced(CMAKE_USE_GSSAPI)
if(CMAKE_USE_GSSAPI) if(CMAKE_USE_GSSAPI)
find_package(GSS) find_package(GSS)
set(HAVE_GSS_API ${GSS_FOUND}) set(HAVE_GSSAPI ${GSS_FOUND})
if(GSS_FOUND) if(GSS_FOUND)
message(STATUS "Found ${GSS_FLAVOUR} GSSAPI version: \"${GSS_VERSION}\"") message(STATUS "Found ${GSS_FLAVOUR} GSSAPI version: \"${GSS_VERSION}\"")
set(CMAKE_REQUIRED_INCLUDES ${GSS_INCLUDE_DIR}) list(APPEND CMAKE_REQUIRED_INCLUDES ${GSS_INCLUDE_DIRECTORIES})
check_include_file_concat("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H) check_include_file_concat("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H)
check_include_file_concat("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H) check_include_file_concat("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H)
check_include_file_concat("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H) check_include_file_concat("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H)
@@ -515,7 +536,7 @@ if(CMAKE_USE_GSSAPI)
endif() endif()
include_directories(${GSS_INCLUDE_DIR}) include_directories(${GSS_INCLUDE_DIRECTORIES})
link_directories(${GSS_LINK_DIRECTORIES}) link_directories(${GSS_LINK_DIRECTORIES})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GSS_COMPILER_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GSS_COMPILER_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GSS_LINKER_FLAGS}") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GSS_LINKER_FLAGS}")
@@ -535,17 +556,28 @@ else()
unset(USE_UNIX_SOCKETS CACHE) unset(USE_UNIX_SOCKETS CACHE)
endif() endif()
# Check for header files # Check for header files
if(NOT UNIX)
check_include_file_concat("ws2tcpip.h" HAVE_WS2TCPIP_H)
check_include_file_concat("winsock2.h" HAVE_WINSOCK2_H)
endif(NOT UNIX)
check_include_file_concat("stdio.h" HAVE_STDIO_H)
if(NOT UNIX) if(NOT UNIX)
check_include_file_concat("windows.h" HAVE_WINDOWS_H) check_include_file_concat("windows.h" HAVE_WINDOWS_H)
check_include_file_concat("winsock.h" HAVE_WINSOCK_H) check_include_file_concat("winsock.h" HAVE_WINSOCK_H)
check_include_file_concat("ws2tcpip.h" HAVE_WS2TCPIP_H)
check_include_file_concat("winsock2.h" HAVE_WINSOCK2_H)
if(CURL_WINDOWS_SSPI)
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -DSECURITY_WIN32")
check_include_file_concat("sspi.h" HAVE_SSPI_H)
if(HAVE_SSPI_H)
check_include_file_concat("schannel.h" HAVE_SCHANNEL_H)
set(USE_WINDOWS_SSPI ON)
if(HAVE_SCHANNEL_H)
set(USE_SCHANNEL ON)
set(SSL_ENABLED ON)
endif()
endif()
endif()
endif(NOT UNIX) endif(NOT UNIX)
check_include_file_concat("stdio.h" HAVE_STDIO_H)
check_include_file_concat("inttypes.h" HAVE_INTTYPES_H) check_include_file_concat("inttypes.h" HAVE_INTTYPES_H)
check_include_file_concat("sys/filio.h" HAVE_SYS_FILIO_H) check_include_file_concat("sys/filio.h" HAVE_SYS_FILIO_H)
check_include_file_concat("sys/ioctl.h" HAVE_SYS_IOCTL_H) check_include_file_concat("sys/ioctl.h" HAVE_SYS_IOCTL_H)
@@ -737,7 +769,6 @@ if(CMAKE_USE_OPENSSL)
HAVE_CRYPTO_CLEANUP_ALL_EX_DATA) HAVE_CRYPTO_CLEANUP_ALL_EX_DATA)
if(HAVE_LIBCRYPTO AND HAVE_LIBSSL) if(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
set(USE_OPENSSL 1) set(USE_OPENSSL 1)
set(USE_SSLEAY 1)
endif(HAVE_LIBCRYPTO AND HAVE_LIBSSL) endif(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
endif(CMAKE_USE_OPENSSL) endif(CMAKE_USE_OPENSSL)
check_symbol_exists(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R) check_symbol_exists(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R)
@@ -1032,12 +1063,12 @@ _add_if("AsynchDNS" USE_ARES OR USE_THREADS_POSIX)
_add_if("IDN" HAVE_LIBIDN) _add_if("IDN" HAVE_LIBIDN)
# TODO SSP1 (WinSSL) check is missing # TODO SSP1 (WinSSL) check is missing
_add_if("SSPI" USE_WINDOWS_SSPI) _add_if("SSPI" USE_WINDOWS_SSPI)
_add_if("GSS-API" HAVE_GSS_API) _add_if("GSS-API" HAVE_GSSAPI)
# TODO SSP1 missing for SPNEGO # TODO SSP1 missing for SPNEGO
_add_if("SPNEGO" NOT CURL_DISABLE_CRYPTO_AUTH AND _add_if("SPNEGO" NOT CURL_DISABLE_CRYPTO_AUTH AND
(HAVE_GSS_API OR USE_WINDOWS_SSPI)) (HAVE_GSSAPI OR USE_WINDOWS_SSPI))
_add_if("Kerberos" NOT CURL_DISABLE_CRYPTO_AUTH AND _add_if("Kerberos" NOT CURL_DISABLE_CRYPTO_AUTH AND
(HAVE_GSS_API OR USE_WINDOWS_SSPI)) (HAVE_GSSAPI OR USE_WINDOWS_SSPI))
# NTLM support requires crypto function adaptions from various SSL libs # NTLM support requires crypto function adaptions from various SSL libs
# TODO alternative SSL libs tests for SSP1, GNUTLS, NSS, DARWINSSL # TODO alternative SSL libs tests for SSP1, GNUTLS, NSS, DARWINSSL
if(NOT CURL_DISABLE_CRYPTO_AUTH AND (USE_OPENSSL OR if(NOT CURL_DISABLE_CRYPTO_AUTH AND (USE_OPENSSL OR
@@ -1122,7 +1153,7 @@ set(VERSIONNUM "${CURL_VERSION_NUM}")
# Finally generate a "curl-config" matching this config # Finally generate a "curl-config" matching this config
configure_file("${CURL_SOURCE_DIR}/curl-config.in" configure_file("${CURL_SOURCE_DIR}/curl-config.in"
"${CURL_BINARY_DIR}/curl-config" @ONLY) "${CURL_BINARY_DIR}/curl-config" @ONLY)
install(FILES "${CMAKE_BINARY_DIR}/curl-config" install(FILES "${CURL_BINARY_DIR}/curl-config"
DESTINATION bin DESTINATION bin
PERMISSIONS PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE OWNER_READ OWNER_WRITE OWNER_EXECUTE
@@ -1132,7 +1163,7 @@ install(FILES "${CMAKE_BINARY_DIR}/curl-config"
# Finally generate a pkg-config file matching this config # Finally generate a pkg-config file matching this config
configure_file("${CURL_SOURCE_DIR}/libcurl.pc.in" configure_file("${CURL_SOURCE_DIR}/libcurl.pc.in"
"${CURL_BINARY_DIR}/libcurl.pc" @ONLY) "${CURL_BINARY_DIR}/libcurl.pc" @ONLY)
install(FILES "${CMAKE_BINARY_DIR}/libcurl.pc" install(FILES "${CURL_BINARY_DIR}/libcurl.pc"
DESTINATION lib/pkgconfig) DESTINATION lib/pkgconfig)
# This needs to be run very last so other parts of the scripts can take advantage of this. # This needs to be run very last so other parts of the scripts can take advantage of this.

25
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,25 @@
How to contribute to curl
=========================
Join the community
------------------
1. Click 'watch' on the github repo
2. Subscribe to the suitable [mailing lists](http://curl.haxx.se/mail/)
Read [docs/CONTRIBUTE](docs/CONTRIBUTE)
---------------------------------------
Send your suggestions using one of these methods:
-------------------------------------------------
1. in a mail to the mailing list
2. as a pull request on github
3. as an issue on github
/ The cURL team!

View File

@@ -65,7 +65,7 @@ else
ARCHES64='-arch x86_64' ARCHES64='-arch x86_64'
#We "know" that 10.4 and earlier do not support 64bit #We "know" that 10.4 and earlier do not support 64bit
OLD_SDK64=`ls $SDK_PATH|egrep -v "10.[0-4]"|head -1` OLD_SDK64=`ls $SDK_PATH|egrep -v "10.[0-4]"|head -1`
NEW_SDK64=`ls -r $SDK_PATH|egrep -v "10.[0-4]"|head -1` NEW_SDK64=`ls -r $SDK_PATH|egrep -v "10.[0-4][^0-9]" | head -1`
if test $USE_OLD -gt 0 if test $USE_OLD -gt 0
then then
SDK64=$OLD_SDK64 SDK64=$OLD_SDK64
@@ -94,7 +94,7 @@ if test ! -z $SDK32; then
rm -r libcurl.framework rm -r libcurl.framework
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Resources mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Resources
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl
/usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/${FRAMEWORK_VERSION}/Resources/Info.plist /usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/${FRAMEWORK_VERSION}/Resources/Info.plist
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
cp include/curl/*.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl cp include/curl/*.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
@@ -121,7 +121,7 @@ if test ! -z $SDK32; then
echo "----Appending 64 bit framework to 32 bit framework..." echo "----Appending 64 bit framework to 32 bit framework..."
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
cp libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 cp libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl32
pwd pwd
lipo libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 -create -output libcurl.framework/${FRAMEWORK_VERSION}/libcurl lipo libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 -create -output libcurl.framework/${FRAMEWORK_VERSION}/libcurl

View File

@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___ # | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____| # \___|\___/|_| \_\_____|
# #
# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. # Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
# #
# This software is licensed as described in the file COPYING, which # This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms # you should have received as part of this distribution. The terms
@@ -30,101 +30,113 @@ CMAKE_DIST = CMakeLists.txt CMake/CMakeConfigurableFile.in \
include/curl/curlbuild.h.cmake CMake/Macros.cmake include/curl/curlbuild.h.cmake CMake/Macros.cmake
VC6_LIBTMPL = projects/Windows/VC6/lib/libcurl.tmpl VC6_LIBTMPL = projects/Windows/VC6/lib/libcurl.tmpl
VC6_LIBDSP = projects/Windows/VC6/lib/libcurl.dsp VC6_LIBDSP = projects/Windows/VC6/lib/libcurl.dsp.dist
VC6_LIBDSP_DEPS = $(VC6_LIBTMPL) Makefile.am lib/Makefile.inc VC6_LIBDSP_DEPS = $(VC6_LIBTMPL) Makefile.am lib/Makefile.inc
VC6_SRCTMPL = projects/Windows/VC6/src/curlsrc.tmpl VC6_SRCTMPL = projects/Windows/VC6/src/curl.tmpl
VC6_SRCDSP = projects/Windows/VC6/src/curlsrc.dsp VC6_SRCDSP = projects/Windows/VC6/src/curl.dsp.dist
VC6_SRCDSP_DEPS = $(VC6_SRCTMPL) Makefile.am src/Makefile.inc VC6_SRCDSP_DEPS = $(VC6_SRCTMPL) Makefile.am src/Makefile.inc
VC7_LIBTMPL = projects/Windows/VC7/lib/libcurl.tmpl VC7_LIBTMPL = projects/Windows/VC7/lib/libcurl.tmpl
VC7_LIBVCPROJ = projects/Windows/VC7/lib/libcurl.vcproj VC7_LIBVCPROJ = projects/Windows/VC7/lib/libcurl.vcproj.dist
VC7_LIBVCPROJ_DEPS = $(VC7_LIBTMPL) Makefile.am lib/Makefile.inc VC7_LIBVCPROJ_DEPS = $(VC7_LIBTMPL) Makefile.am lib/Makefile.inc
VC7_SRCTMPL = projects/Windows/VC7/src/curlsrc.tmpl VC7_SRCTMPL = projects/Windows/VC7/src/curl.tmpl
VC7_SRCVCPROJ = projects/Windows/VC7/src/curlsrc.vcproj VC7_SRCVCPROJ = projects/Windows/VC7/src/curl.vcproj.dist
VC7_SRCVCPROJ_DEPS = $(VC7_SRCTMPL) Makefile.am src/Makefile.inc VC7_SRCVCPROJ_DEPS = $(VC7_SRCTMPL) Makefile.am src/Makefile.inc
VC71_LIBTMPL = projects/Windows/VC7.1/lib/libcurl.tmpl VC71_LIBTMPL = projects/Windows/VC7.1/lib/libcurl.tmpl
VC71_LIBVCPROJ = projects/Windows/VC7.1/lib/libcurl.vcproj VC71_LIBVCPROJ = projects/Windows/VC7.1/lib/libcurl.vcproj.dist
VC71_LIBVCPROJ_DEPS = $(VC71_LIBTMPL) Makefile.am lib/Makefile.inc VC71_LIBVCPROJ_DEPS = $(VC71_LIBTMPL) Makefile.am lib/Makefile.inc
VC71_SRCTMPL = projects/Windows/VC7.1/src/curlsrc.tmpl VC71_SRCTMPL = projects/Windows/VC7.1/src/curl.tmpl
VC71_SRCVCPROJ = projects/Windows/VC7.1/src/curlsrc.vcproj VC71_SRCVCPROJ = projects/Windows/VC7.1/src/curl.vcproj.dist
VC71_SRCVCPROJ_DEPS = $(VC71_SRCTMPL) Makefile.am src/Makefile.inc VC71_SRCVCPROJ_DEPS = $(VC71_SRCTMPL) Makefile.am src/Makefile.inc
VC8_LIBTMPL = projects/Windows/VC8/lib/libcurl.tmpl VC8_LIBTMPL = projects/Windows/VC8/lib/libcurl.tmpl
VC8_LIBVCPROJ = projects/Windows/VC8/lib/libcurl.vcproj VC8_LIBVCPROJ = projects/Windows/VC8/lib/libcurl.vcproj.dist
VC8_LIBVCPROJ_DEPS = $(VC8_LIBTMPL) Makefile.am lib/Makefile.inc VC8_LIBVCPROJ_DEPS = $(VC8_LIBTMPL) Makefile.am lib/Makefile.inc
VC8_SRCTMPL = projects/Windows/VC8/src/curlsrc.tmpl VC8_SRCTMPL = projects/Windows/VC8/src/curl.tmpl
VC8_SRCVCPROJ = projects/Windows/VC8/src/curlsrc.vcproj VC8_SRCVCPROJ = projects/Windows/VC8/src/curl.vcproj.dist
VC8_SRCVCPROJ_DEPS = $(VC8_SRCTMPL) Makefile.am src/Makefile.inc VC8_SRCVCPROJ_DEPS = $(VC8_SRCTMPL) Makefile.am src/Makefile.inc
VC9_LIBTMPL = projects/Windows/VC9/lib/libcurl.tmpl VC9_LIBTMPL = projects/Windows/VC9/lib/libcurl.tmpl
VC9_LIBVCPROJ = projects/Windows/VC9/lib/libcurl.vcproj VC9_LIBVCPROJ = projects/Windows/VC9/lib/libcurl.vcproj.dist
VC9_LIBVCPROJ_DEPS = $(VC9_LIBTMPL) Makefile.am lib/Makefile.inc VC9_LIBVCPROJ_DEPS = $(VC9_LIBTMPL) Makefile.am lib/Makefile.inc
VC9_SRCTMPL = projects/Windows/VC9/src/curlsrc.tmpl VC9_SRCTMPL = projects/Windows/VC9/src/curl.tmpl
VC9_SRCVCPROJ = projects/Windows/VC9/src/curlsrc.vcproj VC9_SRCVCPROJ = projects/Windows/VC9/src/curl.vcproj.dist
VC9_SRCVCPROJ_DEPS = $(VC9_SRCTMPL) Makefile.am src/Makefile.inc VC9_SRCVCPROJ_DEPS = $(VC9_SRCTMPL) Makefile.am src/Makefile.inc
VC10_LIBTMPL = projects/Windows/VC10/lib/libcurl.tmpl VC10_LIBTMPL = projects/Windows/VC10/lib/libcurl.tmpl
VC10_LIBVCXPROJ = projects/Windows/VC10/lib/libcurl.vcxproj VC10_LIBVCXPROJ = projects/Windows/VC10/lib/libcurl.vcxproj.dist
VC10_LIBVCXPROJ_DEPS = $(VC10_LIBTMPL) Makefile.am lib/Makefile.inc VC10_LIBVCXPROJ_DEPS = $(VC10_LIBTMPL) Makefile.am lib/Makefile.inc
VC10_SRCTMPL = projects/Windows/VC10/src/curlsrc.tmpl VC10_SRCTMPL = projects/Windows/VC10/src/curl.tmpl
VC10_SRCVCXPROJ = projects/Windows/VC10/src/curlsrc.vcxproj VC10_SRCVCXPROJ = projects/Windows/VC10/src/curl.vcxproj.dist
VC10_SRCVCXPROJ_DEPS = $(VC10_SRCTMPL) Makefile.am src/Makefile.inc VC10_SRCVCXPROJ_DEPS = $(VC10_SRCTMPL) Makefile.am src/Makefile.inc
VC11_LIBTMPL = projects/Windows/VC11/lib/libcurl.tmpl VC11_LIBTMPL = projects/Windows/VC11/lib/libcurl.tmpl
VC11_LIBVCXPROJ = projects/Windows/VC11/lib/libcurl.vcxproj VC11_LIBVCXPROJ = projects/Windows/VC11/lib/libcurl.vcxproj.dist
VC11_LIBVCXPROJ_DEPS = $(VC11_LIBTMPL) Makefile.am lib/Makefile.inc VC11_LIBVCXPROJ_DEPS = $(VC11_LIBTMPL) Makefile.am lib/Makefile.inc
VC11_SRCTMPL = projects/Windows/VC11/src/curlsrc.tmpl VC11_SRCTMPL = projects/Windows/VC11/src/curl.tmpl
VC11_SRCVCXPROJ = projects/Windows/VC11/src/curlsrc.vcxproj VC11_SRCVCXPROJ = projects/Windows/VC11/src/curl.vcxproj.dist
VC11_SRCVCXPROJ_DEPS = $(VC11_SRCTMPL) Makefile.am src/Makefile.inc VC11_SRCVCXPROJ_DEPS = $(VC11_SRCTMPL) Makefile.am src/Makefile.inc
VC12_LIBTMPL = projects/Windows/VC12/lib/libcurl.tmpl VC12_LIBTMPL = projects/Windows/VC12/lib/libcurl.tmpl
VC12_LIBVCXPROJ = projects/Windows/VC12/lib/libcurl.vcxproj VC12_LIBVCXPROJ = projects/Windows/VC12/lib/libcurl.vcxproj.dist
VC12_LIBVCXPROJ_DEPS = $(VC12_LIBTMPL) Makefile.am lib/Makefile.inc VC12_LIBVCXPROJ_DEPS = $(VC12_LIBTMPL) Makefile.am lib/Makefile.inc
VC12_SRCTMPL = projects/Windows/VC12/src/curlsrc.tmpl VC12_SRCTMPL = projects/Windows/VC12/src/curl.tmpl
VC12_SRCVCXPROJ = projects/Windows/VC12/src/curlsrc.vcxproj VC12_SRCVCXPROJ = projects/Windows/VC12/src/curl.vcxproj.dist
VC12_SRCVCXPROJ_DEPS = $(VC12_SRCTMPL) Makefile.am src/Makefile.inc VC12_SRCVCXPROJ_DEPS = $(VC12_SRCTMPL) Makefile.am src/Makefile.inc
VC14_LIBTMPL = projects/Windows/VC14/lib/libcurl.tmpl
VC14_LIBVCXPROJ = projects/Windows/VC14/lib/libcurl.vcxproj.dist
VC14_LIBVCXPROJ_DEPS = $(VC14_LIBTMPL) Makefile.am lib/Makefile.inc
VC14_SRCTMPL = projects/Windows/VC14/src/curl.tmpl
VC14_SRCVCXPROJ = projects/Windows/VC14/src/curl.vcxproj.dist
VC14_SRCVCXPROJ_DEPS = $(VC14_SRCTMPL) Makefile.am src/Makefile.inc
VC_DIST = projects/README \ VC_DIST = projects/README \
projects/build-openssl.bat \ projects/build-openssl.bat \
projects/build-wolfssl.bat \
projects/checksrc.bat \ projects/checksrc.bat \
projects/Windows/VC6/curl.dsw \ projects/Windows/VC6/curl-all.dsw \
projects/Windows/VC6/lib/libcurl.dsw $(VC6_LIBDSP) \ projects/Windows/VC6/lib/libcurl.dsw \
projects/Windows/VC6/src/curlsrc.dsw $(VC6_SRCDSP) \ projects/Windows/VC6/src/curl.dsw \
projects/Windows/VC7/curl.sln \ projects/Windows/VC7/curl-all.sln \
projects/Windows/VC7/lib/libcurl.sln $(VC7_LIBVCPROJ) \ projects/Windows/VC7/lib/libcurl.sln \
projects/Windows/VC7/src/curlsrc.sln $(VC7_SRCVCPROJ) \ projects/Windows/VC7/src/curl.sln \
projects/Windows/VC7.1/curl.sln \ projects/Windows/VC7.1/curl-all.sln \
projects/Windows/VC7.1/lib/libcurl.sln $(VC71_LIBVCPROJ) \ projects/Windows/VC7.1/lib/libcurl.sln \
projects/Windows/VC7.1/src/curlsrc.sln $(VC71_SRCVCPROJ) \ projects/Windows/VC7.1/src/curl.sln \
projects/Windows/VC8/curl.sln \ projects/Windows/VC8/curl-all.sln \
projects/Windows/VC8/lib/libcurl.sln $(VC8_LIBVCPROJ) \ projects/Windows/VC8/lib/libcurl.sln \
projects/Windows/VC8/src/curlsrc.sln $(VC8_SRCVCPROJ) \ projects/Windows/VC8/src/curl.sln \
projects/Windows/VC9/curl.sln \ projects/Windows/VC9/curl-all.sln \
projects/Windows/VC9/lib/libcurl.sln $(VC9_LIBVCPROJ) \ projects/Windows/VC9/lib/libcurl.sln \
projects/Windows/VC9/src/curlsrc.sln $(VC9_SRCVCPROJ) \ projects/Windows/VC9/src/curl.sln \
projects/Windows/VC10/curl.sln \ projects/Windows/VC10/curl-all.sln \
projects/Windows/VC10/lib/libcurl.sln $(VC10_LIBVCXPROJ) \ projects/Windows/VC10/lib/libcurl.sln \
projects/Windows/VC10/src/curlsrc.sln $(VC10_SRCVCXPROJ) \ projects/Windows/VC10/src/curl.sln \
projects/Windows/VC11/curl.sln \ projects/Windows/VC11/curl-all.sln \
projects/Windows/VC11/lib/libcurl.sln $(VC11_LIBVCXPROJ) \ projects/Windows/VC11/lib/libcurl.sln \
projects/Windows/VC11/src/curlsrc.sln $(VC11_SRCVCXPROJ) \ projects/Windows/VC11/src/curl.sln \
projects/Windows/VC12/curl.sln \ projects/Windows/VC12/curl-all.sln \
projects/Windows/VC12/lib/libcurl.sln $(VC12_LIBVCXPROJ) \ projects/Windows/VC12/lib/libcurl.sln \
projects/Windows/VC12/src/curlsrc.sln $(VC12_SRCVCXPROJ) projects/Windows/VC12/src/curl.sln \
projects/Windows/VC14/curl-all.sln \
projects/Windows/VC14/lib/libcurl.sln \
projects/Windows/VC14/src/curl.sln
WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat \ WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat \
winbuild/MakefileBuild.vc winbuild/Makefile.vc \ winbuild/MakefileBuild.vc winbuild/Makefile.vc \
winbuild/Makefile.msvc.names winbuild/Makefile.msvc.names
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \ EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework \ RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework scripts/zsh.pl \
$(CMAKE_DIST) $(VC_DIST) $(WINBUILD_DIST) lib/libcurl.vers.in $(CMAKE_DIST) $(VC_DIST) $(WINBUILD_DIST) lib/libcurl.vers.in
CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \
$(VC71_LIBVCPROJ) $(VC71_SRCVCPROJ) $(VC8_LIBVCPROJ) $(VC8_SRCVCPROJ) \ $(VC71_LIBVCPROJ) $(VC71_SRCVCPROJ) $(VC8_LIBVCPROJ) $(VC8_SRCVCPROJ) \
$(VC9_LIBVCPROJ) $(VC9_SRCVCPROJ) $(VC10_LIBVCXPROJ) $(VC10_SRCVCXPROJ) \ $(VC9_LIBVCPROJ) $(VC9_SRCVCPROJ) $(VC10_LIBVCXPROJ) $(VC10_SRCVCXPROJ) \
$(VC11_LIBVCXPROJ) $(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ) $(VC11_LIBVCXPROJ) $(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ) \
$(VC14_LIBVCXPROJ) $(VC14_SRCVCXPROJ)
bin_SCRIPTS = curl-config bin_SCRIPTS = curl-config
@@ -153,7 +165,7 @@ html:
pdf: pdf:
cd docs; make pdf cd docs; make pdf
check: test examples check: test examples check-docs
if CROSSCOMPILING if CROSSCOMPILING
test-full: test test-full: test
@@ -181,6 +193,9 @@ endif
examples: examples:
@(cd docs/examples; $(MAKE) check) @(cd docs/examples; $(MAKE) check)
check-docs:
@(cd docs/libcurl; $(MAKE) check)
# This is a hook to have 'make clean' also clean up the docs and the tests # This is a hook to have 'make clean' also clean up the docs and the tests
# dir. The extra check for the Makefiles being present is necessary because # dir. The extra check for the Makefiles being present is necessary because
# 'make distcheck' will make clean first in these directories _before_ it runs # 'make distcheck' will make clean first in these directories _before_ it runs
@@ -266,7 +281,7 @@ vc-ide: $(VC6_LIBDSP_DEPS) $(VC6_SRCDSP_DEPS) $(VC7_LIBVCPROJ_DEPS) \
$(VC8_LIBVCPROJ_DEPS) $(VC8_SRCVCPROJ_DEPS) $(VC9_LIBVCPROJ_DEPS) \ $(VC8_LIBVCPROJ_DEPS) $(VC8_SRCVCPROJ_DEPS) $(VC9_LIBVCPROJ_DEPS) \
$(VC9_SRCVCPROJ_DEPS) $(VC10_LIBVCXPROJ_DEPS) $(VC10_SRCVCXPROJ_DEPS) \ $(VC9_SRCVCPROJ_DEPS) $(VC10_LIBVCXPROJ_DEPS) $(VC10_SRCVCXPROJ_DEPS) \
$(VC11_LIBVCXPROJ_DEPS) $(VC11_SRCVCXPROJ_DEPS) $(VC12_LIBVCXPROJ_DEPS) \ $(VC11_LIBVCXPROJ_DEPS) $(VC11_SRCVCXPROJ_DEPS) $(VC12_LIBVCXPROJ_DEPS) \
$(VC12_SRCVCXPROJ_DEPS) $(VC12_SRCVCXPROJ_DEPS) $(VC14_LIBVCXPROJ_DEPS) $(VC14_SRCVCXPROJ_DEPS)
@(win32_lib_srcs='$(LIB_CFILES)'; \ @(win32_lib_srcs='$(LIB_CFILES)'; \
win32_lib_hdrs='$(LIB_HFILES) config-win32.h'; \ win32_lib_hdrs='$(LIB_HFILES) config-win32.h'; \
win32_lib_rc='$(LIB_RCFILES)'; \ win32_lib_rc='$(LIB_RCFILES)'; \
@@ -527,4 +542,22 @@ function gen_element(type, dir, file)\
-v src_rc="$$win32_src_rc" \ -v src_rc="$$win32_src_rc" \
-v src_x_srcs="$$sorted_src_x_srcs" \ -v src_x_srcs="$$sorted_src_x_srcs" \
-v src_x_hdrs="$$sorted_src_x_hdrs" \ -v src_x_hdrs="$$sorted_src_x_hdrs" \
"$$awk_code" $(srcdir)/$(VC12_SRCTMPL) > $(VC12_SRCVCXPROJ) || { exit 1; };) "$$awk_code" $(srcdir)/$(VC12_SRCTMPL) > $(VC12_SRCVCXPROJ) || { exit 1; }; \
\
echo "generating '$(VC14_LIBVCXPROJ)'"; \
awk -v proj_type=vcxproj \
-v lib_srcs="$$sorted_lib_srcs" \
-v lib_hdrs="$$sorted_lib_hdrs" \
-v lib_rc="$$win32_lib_rc" \
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
"$$awk_code" $(srcdir)/$(VC14_LIBTMPL) > $(VC14_LIBVCXPROJ) || { exit 1; }; \
\
echo "generating '$(VC14_SRCVCXPROJ)'"; \
awk -v proj_type=vcxproj \
-v src_srcs="$$sorted_src_srcs" \
-v src_hdrs="$$sorted_src_hdrs" \
-v src_rc="$$win32_src_rc" \
-v src_x_srcs="$$sorted_src_x_srcs" \
-v src_x_hdrs="$$sorted_src_x_hdrs" \
"$$awk_code" $(srcdir)/$(VC14_SRCTMPL) > $(VC14_SRCVCXPROJ) || { exit 1; };)

View File

@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___ # | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____| # \___|\___/|_| \_\_____|
# #
# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. # Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
# #
# This software is licensed as described in the file COPYING, which # This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms # you should have received as part of this distribution. The terms
@@ -566,6 +566,17 @@ src/Makefile.vc12: src/Makefile.vc6
@echo "generate $@" @echo "generate $@"
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc12/g" -e "s/VC6/VC12/g" src/Makefile.vc6 > src/Makefile.vc12 @sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc12/g" -e "s/VC6/VC12/g" src/Makefile.vc6 > src/Makefile.vc12
# VC14 makefiles are for use with VS2015
vc14: lib/Makefile.vc14 src/Makefile.vc14
lib/Makefile.vc14: lib/Makefile.vc6
@echo "generate $@"
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc14/g" -e "s/VC6/VC14/g" lib/Makefile.vc6 > lib/Makefile.vc14
src/Makefile.vc14: src/Makefile.vc6
@echo "generate $@"
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc14/g" -e "s/VC6/VC14/g" src/Makefile.vc6 > src/Makefile.vc14
ca-bundle: lib/mk-ca-bundle.pl ca-bundle: lib/mk-ca-bundle.pl
@echo "generate a fresh ca-bundle.crt" @echo "generate a fresh ca-bundle.crt"
@perl $< -b -l -u lib/ca-bundle.crt @perl $< -b -l -u lib/ca-bundle.crt

4
README
View File

@@ -38,12 +38,12 @@ GIT
To download the very latest source off the GIT server do this: To download the very latest source off the GIT server do this:
git clone git://github.com/bagder/curl.git git clone https://github.com/bagder/curl.git
(you'll get a directory named curl created, filled with the source code) (you'll get a directory named curl created, filled with the source code)
NOTICE NOTICE
Curl contains pieces of source code that is Copyright (c) 1998, 1999 Curl contains pieces of source code that is Copyright (c) 1998, 1999
Kungliga Tekniska H<EFBFBD>gskolan. This notice is included here to comply with the Kungliga Tekniska Högskolan. This notice is included here to comply with the
distribution terms. distribution terms.

View File

@@ -1,146 +1,73 @@
Curl and libcurl 7.40.0 Curl and libcurl 7.46.0
Public curl releases: 143 Public curl releases: 150
Command line options: 162 Command line options: 177
curl_easy_setopt() options: 208 curl_easy_setopt() options: 221
Public functions in libcurl: 58 Public functions in libcurl: 61
Contributors: 1219 Contributors: 1322
This release includes the following changes: This release includes the following changes:
o http_digest: Added support for Windows SSPI based authentication o configure: build silently by default
o version info: Added Kerberos V5 to the supported features o cookies: Add support for Publix Suffix List with libpsl
o Makefile: Added VC targets for WinIDN o vtls: added support for mbedTLS [7]
o config-win32: Introduce build targets for VS2012+ o Added CURLOPT_STREAM_DEPENDS [8]
o SSL: Add PEM format support for public key pinning o Added CURLOPT_STREAM_DEPENDS_E [9]
o smtp: Added support for the conversion of Unix newlines during mail send [8] o Added CURLOPT_STREAM_WEIGHT [10]
o smb: Added initial support for the SMB/CIFS protocol o Added CURLFORM_CONTENTLEN [14]
o Added support for HTTP over unix domain sockets, via o oauth2: Added support for OAUTHBEARER SASL mechanism to IMAP, POP3 and SNMP
CURLOPT_UNIX_SOCKET_PATH and --unix-socket
o sasl: Added support for GSS-API based Kerberos V5 authentication
This release includes the following bugfixes: This release includes the following bugfixes:
o darwinssl: fix session ID keys to only reuse identical sessions [18] o des: Fix header conditional for Curl_des_set_odd_parity
o url-parsing: reject CRLFs within URLs [19] o ntlm: get rid of unconditional use of long long [1]
o OS400: Adjust specific support to last release o CURLOPT_CERTINFO.3: fix reference to CURLINFO_CERTINFO
o THANKS: Remove duplicate names o docs: CURLINFO_LASTSOCKET => CURLINFO_ACTIVESOCKET [2]
o url.c: Fixed compilation warning o http2: Fix http2_recv to return -1 if recv returned -1
o ssh: Fixed build on platforms where R_OK is not defined [1] o curl_global_init_mem: set function pointers before doing init
o tool_strdup.c: include the tool strdup.h o ntlm: error out without 64bit support as the code needs it [1]
o build: Fixed Visual Studio project file generation of strdup.[c|h] o openssl: Fix set up of pkcs12 certificate verification chain
o curl_easy_setopt.3: add CURLOPT_PINNEDPUBLICKEY [2] o acinclude: remove PKGCONFIG override [3]
o curl.1: show zone index use in a URL o test1531: case the size to fix the test on non-largefile builds
o mk-ca-bundle.vbs: switch to new certdata.txt url o fread_func: move callback pointer from set to state struct [4]
o Makefile.dist: Added some missing SSPI configurations o test1601: fix compilation with --enable-debug and --disable-crypto-auth
o build: Fixed no NTLM support for email when CURL_DISABLE_HTTP is defined o http2: Don't pass unitialized name+len pairs to nghttp2_submit_request [5]
o SSH: use the port number as well for known_known checks [3] o curlbuild.h: Fix non-configure compiling to mips and sh4 targets
o libssh2: detect features based on version, not configure checks o tool: Generate easysrc with last cache linked-list [6]
o http2: Deal with HTTP/2 data inside Upgrade response header buffer [4] o cmake: Fix for add_subdirectory(curl) use-case
o multi: removed Curl_multi_set_easy_connection o vtls: fix compiler warning for TLS backends without sha256
o symbol-scan.pl: do not require autotools o build: fix for MSDOS/djgpp
o cmake: add ENABLE_THREADED_RESOLVER, rename ARES o checksrc: add crude // detection
o cmake: build libhostname for test suite o http2: on_frame_recv: trust the conn/data input
o cmake: fix HAVE_GETHOSTNAME definition o ftp: allow CURLOPT_IGNORE_CONTENT_LENGTH to ignore size [11]
o tests: fix libhostname visibility o polarssl/mbedtls: fix name space pollution
o tests: fix memleak in server/resolve.c o build: Fix mingw ssl gdi32 order [12]
o vtls.h: Fixed compiler warning when compiled without SSL o build: Fix support for PKG_CONFIG
o CMake: Restore order-dependent header checks o MacOSX-Framework: sdk regex fix for sdk 10.10 and later
o CMake: Restore order-dependent library checks o socks: Fix incorrect port numbers in failed connect messages
o tool: Removed krb4 from the supported features o curl.1: -E: s/private certificate/client certificate
o http2: Don't send Upgrade headers when we already do HTTP/2 o curl.h: s/HTTPPOST_/CURL_HTTPOST_ [13]
o examples: Don't call select() to sleep on windows [6] o curl_formadd: support >2GB files on windows [14]
o win32: Updated some legacy APIs to use the newer extended versions [5] o http redirects: %-encode bytes outside of ascii range [15]
o easy.c: Fixed compilation warning when no verbose string support o rawstr: Speed up Curl_raw_toupper by 40%
o connect.c: Fixed compilation warning when no verbose string support o curl_ntlm_core: fix 2 curl_off_t constant overflows.
o build: in Makefile.m32 pass -F flag to windres o getinfo: CURLINFO_ACTIVESOCKET: fix bad socket value
o build: in Makefile.m32 add -m32 flag for 32bit o tftp tests: verify sent options too
o multi: when leaving for timeout, close accordingly o imap: Don't call imap_atom() when no mailbox specified in LIST command
o CMake: Simplify if() conditions on check result variables o imap: Fixed double quote in LIST command when mailbox contains spaces
o build: in Makefile.m32 try to detect 64bit target o imap: Don't check for continuation when executing a CUSTOMREQUEST [16]
o multi: inform about closed sockets before they are closed o acinclude: Remove check for 16-bit curl_off_t
o multi-uv.c: close the file handle after download o BoringSSL: Work with stricter BIO_get_mem_data() [17]
o examples: Wait recommended 100ms when no file descriptors are ready o cmake: Add missing feature macros in config header [18]
o ntlm: Split the SSPI based messaging code from the native messaging code o sasl_sspi: fixed unicode build for digest authentication [19]
o cmake: fix NTLM detection when CURL_DISABLE_HTTP defined o sasl_sspi: fix identity memory leak in digest authentication
o cmake: add Kerberos to the supported feature o unit1602: Fixed failure in torture test
o CURLOPT_POSTFIELDS.3: mention the COPYPOSTFIELDS option o unit1603: Added unit tests for hash functions
o http: Disable pipelining for HTTP/2 and upgraded connections o vtls/openssl: remove unused traces of yassl ifdefs
o ntlm: Fixed static'ness of local decode function o openssl: remove #ifdefs for < 0.9.7 support
o sasl: Reduced the need for two sets of NTLM messaging functions o typecheck-gcc.h: add some missing options
o multi.c: Fixed compilation warnings when no verbose string support o curl: mark two more options strings for --libcurl output
o select.c: fix compilation for VxWorks [7] o openssl: Free modules on cleanup [20]
o multi-single.c: switch to use curl_multi_wait
o curl_multi_wait.3: clarify numfds being used if not NULL
o http.c: Fixed compilation warnings from features being disabled
o NSS: enable the CAPATH option [9]
o docs: Fix FAILONERROR typos
o HTTP: don't abort connections with pending Negotiate authentication
o HTTP: Free (proxy)userpwd for NTLM/Negotiate after sending a request
o http_perhapsrewind: don't abort CONNECT requests
o build: updated dependencies in makefiles
o multi.c: Fixed compilation warning
o ftp.c: Fixed compilation warnings when proxy support disabled
o get_url_file_name: Fixed crash on OOM on debug build
o cookie.c: Refactored cleanup code to simplify
o OS400: enable NTLM authentication
o ntlm: Use Windows Crypt API
o http2: avoid logging neg "failure" if h2 was not requested
o schannel_recv: return the correct code [10]
o VC build: added sspi define for winssl-zlib builds
o Curl_client_write(): chop long data, convert data only once
o openldap: do not ignore Curl_client_write() return code
o ldap: check Curl_client_write() return codes
o parsedate.c: Fixed compilation warning
o url.c: Fixed compilation warning when USE_NTLM is not defined
o ntlm_wb_response: fix "statement not reached" [11]
o telnet: fix "cast increases required alignment of target type"
o smtp: Fixed dot stuffing when EOL characters at end of input buffers [12]
o ntlm: Allow NTLM2Session messages when USE_NTRESPONSES manually defined
o ntlm: Disable NTLM v2 when 64-bit integers are not supported
o ntlm: Use short integer when decoding 16-bit values
o ftp.c: Fixed compilation warning when no verbose string support
o synctime.c: fixed timeserver URLs
o mk-ca-bundle.pl: restored forced run again
o ntlm: Fixed return code for bad type-2 Target Info
o curl_schannel.c: Data may be available before connection shutdown
o curl_schannel: Improvements to memory re-allocation strategy [13]
o darwinssl: aprintf() to allocate the session key
o tool_util.c: Use GetTickCount64 if it is available
o lib: Fixed multiple code analysis warnings if SAL are available
o tool_binmode.c: Explicitly ignore the return code of setmode
o tool_urlglob.c: Silence warning C6293: Ill-defined for-loop
o opts: Warn CURLOPT_TIMEOUT overrides when set after CURLOPT_TIMEOUT_MS
o SFTP: work-around servers that return zero size on STAT [14]
o connect: singleipconnect(): properly try other address families after failure
o IPV6: address scope != scope id [15]
o parseurlandfillconn(): fix improper non-numeric scope_id stripping [16]
o secureserver.pl: make OpenSSL CApath and cert absolute path values
o secureserver.pl: update Windows detection and fix path conversion
o secureserver.pl: clean up formatting of config and fix verbose output
o tests: Added Windows support using Cygwin-based OpenSSH
o sockfilt.c: use non-Ex functions that are available before WinXP
o VMS: Updates for 0740-0D1220
o openssl: warn for SRP set if SSLv3 is used, not for TLS version
o openssl: make it compile against openssl 1.1.0-DEV master branch
o openssl: fix SSL/TLS versions in verbose output
o curl: show size of inhibited data when using -v
o build: Removed WIN32 definition from the Visual Studio projects
o build: Removed WIN64 definition from the libcurl Visual Studio projects
o vtls: Use bool for Curl_ssl_getsessionid() return type
o sockfilt.c: Replace 100ms sleep with thread throttle
o sockfilt.c: Reduce the number of individual memory allocations
o vtls: Don't set cert info count until memory allocation is successful
o nss: Don't ignore Curl_ssl_init_certinfo() OOM failure
o nss: Don't ignore Curl_extract_certinfo() OOM failure
o vtls: Fixed compilation warning and an ignored return code
o sockfilt.c: Fixed compilation warnings
o darwinssl: Fixed compilation warning
o vtls: Use '(void) arg' for unused parameters
o sepheaders.c: Fixed resource leak on failure
o lib1900.c: Fixed cppcheck error [17]
o ldap: Fixed Unicode connection details in Win32 initialsation / bind calls
o ldap: Fixed Unicode DN, attributes and filter in Win32 search calls
This release includes the following known bugs: This release includes the following known bugs:
@@ -149,35 +76,35 @@ This release includes the following known bugs:
This release would not have looked like this without help, code, reports and This release would not have looked like this without help, code, reports and
advice from friends like these: advice from friends like these:
Andrey Labunets, Anthon Pang, Bill Nagel, Brad Harder, Brad King, Carlo Wood, Anders Bakken, Dan Fandrich, Daniel Hwang, Daniel Stenberg, Dmitry S. Baikov,
Christian Hägele, Dan Fandrich, Daniel Stenberg, Dave Reisner, Frank Gevaerts, Douglas Creager, Erik Johansson, Gisle Vanem, Javier G. Sogo, John Levon,
Gisle Vanem, Guenter Knauf, Jan Ehrhardt, Johan Lantz, John E. Malmberg, Jonas Minnberg, Justin Ehlert, Kamil Dudka, Kang Lin, Kurt Fankhauser,
Jon Spencer, Julien Nabet, Kamil Dudka, Kyle J. McKay, Lucas Pardue, Lauri Kasanen, Marcel Raad, Patrick Monnerat, Rainer Jung, Ray Satiro,
Marc Hesse, Marc Hoersken, Marc Renault, Michael Osipov, Nick Zitzmann, Richard Hosking, Sebastian Pohlschmidt, Stefan Bühler, Steve Holme,
Nobuhiro Ban, Patrick Monnerat, Peter Wu, Ray Satiro, Sam Hurst, Svyatoslav Mishyn, Tatsuhiro Tsujikawa, Tim Rühsen, xiangbin li,
Stefan Bühler, Stefan Neis, Steve Holme, Tae Hyoung Ahn, Tatsuhiro Tsujikawa, (28 contributors)
Tomasz Kojm, Tor Arntsen, Waldek Kozba, Warren Menzer
Thanks! (and sorry if I forgot to mention someone) Thanks! (and sorry if I forgot to mention someone)
References to bug reports and discussions on issues: References to bug reports and discussions on issues:
[1] = http://curl.haxx.se/mail/lib-2014-11/0035.html [1] = http://curl.haxx.se/bug/?i=478
[2] = http://curl.haxx.se/mail/lib-2014-11/0078.html [2] = http://curl.haxx.se/bug/?i=479
[3] = http://curl.haxx.se/bug/view.cgi?id=1448 [3] = http://curl.haxx.se/mail/lib-2015-10/0035.html
[4] = https://github.com/tatsuhiro-t/nghttp2/issues/103 [4] = http://curl.haxx.se/bug/?i=346
[5] = http://sourceforge.net/p/curl/feature-requests/82/ [5] = http://curl.haxx.se/bug/?i=493
[6] = http://curl.haxx.se/mail/lib-2014-11/0221.html [6] = http://curl.haxx.se/bug/?i=452
[7] = http://curl.haxx.se/bug/view.cgi?id=1455 [7] = http://curl.haxx.se/bug/?i=496
[8] = http://curl.haxx.se/bug/view.cgi?id=1456 [8] = http://curl.haxx.se/libcurl/c/CURLOPT_STREAM_DEPENDS.html
[9] = http://curl.haxx.se/bug/view.cgi?id=1457 [9] = http://curl.haxx.se/libcurl/c/CURLOPT_STREAM_DEPENDS_E.html
[10] = http://curl.haxx.se/bug/view.cgi?id=1462 [10] = http://curl.haxx.se/libcurl/c/CURLOPT_STREAM_WEIGHT.html
[11] = http://curl.haxx.se/mail/lib-2014-12/0089.html [11] = http://curl.haxx.se/bug/?i=480
[12] = http://curl.haxx.se/bug/view.cgi?id=1456 [12] = https://github.com/bagder/curl/pull/501
[13] = http://curl.haxx.se/bug/view.cgi?id=1450 [13] = http://curl.haxx.se/bug/?i=506
[14] = http://curl.haxx.se/mail/lib-2014-12/0103.html [14] = http://curl.haxx.se/bug/?i=425
[15] = http://curl.haxx.se/bug/view.cgi?id=1451 [15] = http://curl.haxx.se/bug/?i=473
[16] = http://curl.haxx.se/bug/view.cgi?id=1449 [16] = http://curl.haxx.se/bug/?i=486
[17] = https://github.com/bagder/curl/pull/133 [17] = http://curl.haxx.se/bug/?i=524
[18] = http://curl.haxx.se/docs/adv_20150108A.html [18] = http://curl.haxx.se/bug/?i=523
[19] = http://curl.haxx.se/docs/adv_20150108B.html [19] = http://curl.haxx.se/bug/?i=525
[20] = http://curl.haxx.se/bug/?i=526

View File

@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___ # | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____| # \___|\___/|_| \_\_____|
# #
# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. # Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
# #
# This software is licensed as described in the file COPYING, which # This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms # you should have received as part of this distribution. The terms
@@ -1851,8 +1851,10 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC], [
AC_REQUIRE([AC_HEADER_TIME])dnl AC_REQUIRE([AC_HEADER_TIME])dnl
AC_CHECK_HEADERS(sys/types.h sys/time.h time.h) AC_CHECK_HEADERS(sys/types.h sys/time.h time.h)
AC_MSG_CHECKING([for monotonic clock_gettime]) AC_MSG_CHECKING([for monotonic clock_gettime])
AC_COMPILE_IFELSE([ #
AC_LANG_PROGRAM([[ if test "x$dontwant_rt" == "xno" ; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#ifdef HAVE_SYS_TYPES_H #ifdef HAVE_SYS_TYPES_H
#include <sys/types.h> #include <sys/types.h>
#endif #endif
@@ -1866,17 +1868,18 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC], [
#include <time.h> #include <time.h>
#endif #endif
#endif #endif
]],[[ ]],[[
struct timespec ts; struct timespec ts;
(void)clock_gettime(CLOCK_MONOTONIC, &ts); (void)clock_gettime(CLOCK_MONOTONIC, &ts);
]]) ]])
],[ ],[
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
ac_cv_func_clock_gettime="yes" ac_cv_func_clock_gettime="yes"
],[ ],[
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
ac_cv_func_clock_gettime="no" ac_cv_func_clock_gettime="no"
]) ])
fi
dnl Definition of HAVE_CLOCK_GETTIME_MONOTONIC is intentionally postponed dnl Definition of HAVE_CLOCK_GETTIME_MONOTONIC is intentionally postponed
dnl until library linking and run-time checks for clock_gettime succeed. dnl until library linking and run-time checks for clock_gettime succeed.
]) ])
@@ -2452,23 +2455,6 @@ AC_DEFUN([CURL_CHECK_FUNC_SELECT], [
]) ])
# This is only a temporary fix. This macro is here to replace the broken one
# delivered by the automake project (including the 1.9.6 release). As soon as
# they ship a working version we SHOULD remove this work-around.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
test x"${MISSING+set}" = xset || MISSING="\${SHELL} \"$am_aux_dir/missing\""
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
AC_MSG_WARN([`missing' script is too old or missing])
fi
])
dnl CURL_VERIFY_RUNTIMELIBS dnl CURL_VERIFY_RUNTIMELIBS
dnl ------------------------------------------------- dnl -------------------------------------------------
dnl Verify that the shared libs found so far can be used when running dnl Verify that the shared libs found so far can be used when running
@@ -2607,15 +2593,16 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
if test "x$want_ca" != "xno" -a "x$want_ca" != "xunset" -a \ if test "x$want_ca" != "xno" -a "x$want_ca" != "xunset" -a \
"x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
dnl both given dnl both given
AC_MSG_ERROR([Can't specify both --with-ca-bundle and --with-ca-path.]) ca="$want_ca"
capath="$want_capath"
elif test "x$want_ca" != "xno" -a "x$want_ca" != "xunset"; then elif test "x$want_ca" != "xno" -a "x$want_ca" != "xunset"; then
dnl --with-ca-bundle given dnl --with-ca-bundle given
ca="$want_ca" ca="$want_ca"
capath="no" capath="no"
elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
dnl --with-ca-path given dnl --with-ca-path given
if test "x$OPENSSL_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then if test "x$OPENSSL_ENABLED" != "x1" -a "x$GNUTLS_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then
AC_MSG_ERROR([--with-ca-path only works with openSSL or PolarSSL]) AC_MSG_ERROR([--with-ca-path only works with OpenSSL, GnuTLS or PolarSSL])
fi fi
capath="$want_capath" capath="$want_capath"
ca="no" ca="no"
@@ -2669,11 +2656,13 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
AC_DEFINE_UNQUOTED(CURL_CA_BUNDLE, "$ca", [Location of default ca bundle]) AC_DEFINE_UNQUOTED(CURL_CA_BUNDLE, "$ca", [Location of default ca bundle])
AC_SUBST(CURL_CA_BUNDLE) AC_SUBST(CURL_CA_BUNDLE)
AC_MSG_RESULT([$ca]) AC_MSG_RESULT([$ca])
elif test "x$capath" != "xno"; then fi
if test "x$capath" != "xno"; then
CURL_CA_PATH="\"$capath\"" CURL_CA_PATH="\"$capath\""
AC_DEFINE_UNQUOTED(CURL_CA_PATH, "$capath", [Location of default ca path]) AC_DEFINE_UNQUOTED(CURL_CA_PATH, "$capath", [Location of default ca path])
AC_MSG_RESULT([$capath (capath)]) AC_MSG_RESULT([$capath (capath)])
else fi
if test "x$ca" = "xno" && test "x$capath" = "xno"; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
fi fi
]) ])
@@ -2848,7 +2837,6 @@ AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [
# #
x_LP64_long="" x_LP64_long=""
x_LP32_long="" x_LP32_long=""
x_LP16_long=""
# #
if test "$ac_cv_sizeof_long" -eq "8" && if test "$ac_cv_sizeof_long" -eq "8" &&
test "$ac_cv_sizeof_voidp" -ge "8"; then test "$ac_cv_sizeof_voidp" -ge "8"; then
@@ -2856,9 +2844,6 @@ AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [
elif test "$ac_cv_sizeof_long" -eq "4" && elif test "$ac_cv_sizeof_long" -eq "4" &&
test "$ac_cv_sizeof_voidp" -ge "4"; then test "$ac_cv_sizeof_voidp" -ge "4"; then
x_LP32_long="long" x_LP32_long="long"
elif test "$ac_cv_sizeof_long" -eq "2" &&
test "$ac_cv_sizeof_voidp" -ge "2"; then
x_LP16_long="long"
fi fi
# #
dnl DO_CURL_OFF_T_CHECK results are stored in next 3 vars dnl DO_CURL_OFF_T_CHECK results are stored in next 3 vars
@@ -2892,17 +2877,6 @@ AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [
done done
AC_MSG_RESULT([$curl_typeof_curl_off_t]) AC_MSG_RESULT([$curl_typeof_curl_off_t])
fi fi
if test "$curl_typeof_curl_off_t" = "unknown"; then
AC_MSG_CHECKING([for 16-bit curl_off_t data type])
for t2 in \
"$x_LP16_long" \
'int16_t' \
'__int16' \
'int' ; do
DO_CURL_OFF_T_CHECK([$t2], [2])
done
AC_MSG_RESULT([$curl_typeof_curl_off_t])
fi
if test "$curl_typeof_curl_off_t" = "unknown"; then if test "$curl_typeof_curl_off_t" = "unknown"; then
AC_MSG_ERROR([cannot find data type for curl_off_t.]) AC_MSG_ERROR([cannot find data type for curl_off_t.])
fi fi
@@ -3063,12 +3037,14 @@ dnl Optionally PKG_CONFIG_LIBDIR may be given as $pcdir.
dnl dnl
AC_DEFUN([CURL_CHECK_PKGCONFIG], [ AC_DEFUN([CURL_CHECK_PKGCONFIG], [
if test -n "$PKG_CONFIG"; then
PKGCONFIG="$PKG_CONFIG"
else
AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no],
[$PATH:/usr/bin:/usr/local/bin])
fi
PKGCONFIG="no" if test "x$PKGCONFIG" != "xno"; then
AC_PATH_TOOL( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
if test x$PKGCONFIG != xno; then
AC_MSG_CHECKING([for $1 options with pkg-config]) AC_MSG_CHECKING([for $1 options with pkg-config])
dnl ask pkg-config about $1 dnl ask pkg-config about $1
itexists=`CURL_EXPORT_PCDIR([$2]) dnl itexists=`CURL_EXPORT_PCDIR([$2]) dnl

19
appveyor.yml Normal file
View File

@@ -0,0 +1,19 @@
version: 7.45.0.{build}
environment:
matrix:
- PRJ_GEN: "Visual Studio 11 2012 Win64"
BDIR: msvc2012
PRJ_CFG: Release
- PRJ_GEN: "Visual Studio 12 2013 Win64"
BDIR: msvc2013
PRJ_CFG: Release
- PRJ_GEN: "Visual Studio 14 2015 Win64"
BDIR: msvc2015
PRJ_CFG: Release
build_script:
- mkdir build.%BDIR%
- cd build.%BDIR%
- cmake .. -G"%PRJ_GEN%"
- cmake --build . --config %PRJ_CFG% --clean-first

View File

@@ -318,6 +318,8 @@ for fname in .deps \
ltsugar.m4 \ ltsugar.m4 \
ltversion.m4 \ ltversion.m4 \
lt~obsolete.m4 \ lt~obsolete.m4 \
missing \
install-sh \
stamp-h1 \ stamp-h1 \
stamp-h2 \ stamp-h2 \
stamp-h3 ; do stamp-h3 ; do
@@ -329,7 +331,7 @@ done
# #
echo "buildconf: running libtoolize" echo "buildconf: running libtoolize"
${libtoolize} --copy --automake --force || die "libtoolize command failed" ${libtoolize} --copy --force || die "libtoolize command failed"
# When using libtool 1.5.X (X < 26) we copy libtool.m4 to our local m4 # When using libtool 1.5.X (X < 26) we copy libtool.m4 to our local m4
# subdirectory and this local copy is patched to fix some warnings that # subdirectory and this local copy is patched to fix some warnings that

View File

@@ -1,38 +1,352 @@
@echo off @echo off
REM rem ***************************************************************************
REM rem * _ _ ____ _
REM This batch file must be used to set up a git tree to build on rem * Project ___| | | | _ \| |
REM systems where there is no autotools support (i.e. Microsoft). rem * / __| | | | |_) | |
REM rem * | (__| |_| | _ <| |___
REM This file is not included nor needed for curl's release rem * \___|\___/|_| \_\_____|
REM archives, neither for curl's daily snapshot archives. rem *
rem * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
rem *
rem * This software is licensed as described in the file COPYING, which
rem * you should have received as part of this distribution. The terms
rem * are also available at http://curl.haxx.se/docs/copyright.html.
rem *
rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
rem * copies of the Software, and permit persons to whom the Software is
rem * furnished to do so, under the terms of the COPYING file.
rem *
rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
rem * KIND, either express or implied.
rem *
rem ***************************************************************************
if exist GIT-INFO goto start_doing rem NOTES
ECHO ERROR: This file shall only be used with a curl git tree checkout. rem
goto end_all rem This batch file must be used to set up a git tree to build on systems where
:start_doing rem there is no autotools support (i.e. DOS and Windows).
rem
rem This file is not included or required for curl's release archives or daily
rem snapshot archives.
REM create tool_hugehelp.c :begin
if not exist src\tool_hugehelp.c.cvs goto end_hugehelp_c rem Set our variables
copy /Y src\tool_hugehelp.c.cvs src\tool_hugehelp.c if "%OS%" == "Windows_NT" setlocal
:end_hugehelp_c set MODE=GENERATE
REM create Makefile rem Switch to this batch file's directory
if not exist Makefile.dist goto end_makefile cd /d "%~0\.." 1>NUL 2>&1
copy /Y Makefile.dist Makefile
:end_makefile
REM create curlbuild.h rem Check we are running from a curl git repository
if not exist include\curl\curlbuild.h.dist goto end_curlbuild_h if not exist GIT-INFO goto norepo
copy /Y include\curl\curlbuild.h.dist include\curl\curlbuild.h
:end_curlbuild_h
REM setup c-ares git tree rem Detect programs. HAVE_<PROGNAME>
if not exist ares\buildconf.bat goto end_c_ares rem When not found the variable is set undefined. The undefined pattern
cd ares rem allows for statements like "if not defined HAVE_PERL (command)"
call buildconf.bat groff --version <NUL 1>NUL 2>&1
cd .. if errorlevel 1 (set HAVE_GROFF=) else (set HAVE_GROFF=Y)
:end_c_ares nroff --version <NUL 1>NUL 2>&1
if errorlevel 1 (set HAVE_NROFF=) else (set HAVE_NROFF=Y)
perl --version <NUL 1>NUL 2>&1
if errorlevel 1 (set HAVE_PERL=) else (set HAVE_PERL=Y)
gzip --version <NUL 1>NUL 2>&1
if errorlevel 1 (set HAVE_GZIP=) else (set HAVE_GZIP=Y)
:end_all :parseArgs
if "%~1" == "" goto start
if /i "%~1" == "-clean" (
set MODE=CLEAN
) else if /i "%~1" == "-?" (
goto syntax
) else if /i "%~1" == "-h" (
goto syntax
) else if /i "%~1" == "-help" (
goto syntax
) else (
goto unknown
)
shift & goto parseArgs
:start
if "%MODE%" == "GENERATE" (
echo.
echo Generating prerequisite files
call :generate
if errorlevel 4 goto nogencurlbuild
if errorlevel 3 goto nogenhugehelp
if errorlevel 2 goto nogenmakefile
if errorlevel 1 goto warning
) else (
echo.
echo Removing prerequisite files
call :clean
if errorlevel 3 goto nocleancurlbuild
if errorlevel 2 goto nocleanhugehelp
if errorlevel 1 goto nocleanmakefile
)
goto success
rem Main generate function.
rem
rem Returns:
rem
rem 0 - success
rem 1 - success with simplified tool_hugehelp.c
rem 2 - failed to generate Makefile
rem 3 - failed to generate tool_hugehelp.c
rem 4 - failed to generate curlbuild.h
rem
:generate
if "%OS%" == "Windows_NT" setlocal
set BASIC_HUGEHELP=0
rem Create Makefile
echo * %CD%\Makefile
if exist Makefile.dist (
copy /Y Makefile.dist Makefile 1>NUL 2>&1
if errorlevel 1 (
if "%OS%" == "Windows_NT" endlocal
exit /B 2
)
)
rem Create tool_hugehelp.c
echo * %CD%\src\tool_hugehelp.c
call :genHugeHelp
if errorlevel 2 (
if "%OS%" == "Windows_NT" endlocal
exit /B 3
)
if errorlevel 1 (
set BASIC_HUGEHELP=1
)
cmd /c exit 0
rem Create curlbuild.h
echo * %CD%\include\curl\curlbuild.h
if exist include\curl\curlbuild.h.dist (
copy /Y include\curl\curlbuild.h.dist include\curl\curlbuild.h 1>NUL 2>&1
if errorlevel 1 (
if "%OS%" == "Windows_NT" endlocal
exit /B 4
)
)
rem Setup c-ares git tree
if exist ares\buildconf.bat (
echo.
echo Configuring c-ares build environment
cd ares
call buildconf.bat
cd ..
)
if "%BASIC_HUGEHELP%" == "1" (
if "%OS%" == "Windows_NT" endlocal
exit /B 1
)
if "%OS%" == "Windows_NT" endlocal
exit /B 0
rem Main clean function.
rem
rem Returns:
rem
rem 0 - success
rem 1 - failed to clean Makefile
rem 2 - failed to clean tool_hugehelp.c
rem 3 - failed to clean curlbuild.h
rem
:clean
rem Remove Makefile
echo * %CD%\Makefile
if exist Makefile (
del Makefile 2>NUL
if exist Makefile (
exit /B 1
)
)
rem Remove tool_hugehelp.c
echo * %CD%\src\tool_hugehelp.c
if exist src\tool_hugehelp.c (
del src\tool_hugehelp.c 2>NUL
if exist src\tool_hugehelp.c (
exit /B 2
)
)
rem Remove curlbuild.h
echo * %CD%\include\curl\curlbuild.h
if exist include\curl\curlbuild.h (
del include\curl\curlbuild.h 2>NUL
if exist include\curl\curlbuild.h (
exit /B 3
)
)
exit /B
rem Function to generate src\tool_hugehelp.c
rem
rem Returns:
rem
rem 0 - full tool_hugehelp.c generated
rem 1 - simplified tool_hugehelp.c
rem 2 - failure
rem
:genHugeHelp
if "%OS%" == "Windows_NT" setlocal
set LC_ALL=C
set ROFFCMD=
set BASIC=1
if defined HAVE_PERL (
if defined HAVE_GROFF (
set ROFFCMD=groff -mtty-char -Tascii -P-c -man
) else if defined HAVE_NROFF (
set ROFFCMD=nroff -c -Tascii -man
)
)
if defined ROFFCMD (
echo #include "tool_setup.h"> src\tool_hugehelp.c
echo #include "tool_hugehelp.h">> src\tool_hugehelp.c
if defined HAVE_GZIP (
echo #ifndef HAVE_LIBZ>> src\tool_hugehelp.c
)
%ROFFCMD% docs\curl.1 2>NUL | perl src\mkhelp.pl docs\MANUAL >> src\tool_hugehelp.c
if defined HAVE_GZIP (
echo #else>> src\tool_hugehelp.c
%ROFFCMD% docs\curl.1 2>NUL | perl src\mkhelp.pl -c docs\MANUAL >> src\tool_hugehelp.c
echo #endif /^* HAVE_LIBZ ^*/>> src\tool_hugehelp.c
)
set BASIC=0
) else (
if exist src\tool_hugehelp.c.cvs (
copy /Y src\tool_hugehelp.c.cvs src\tool_hugehelp.c 1>NUL 2>&1
) else (
echo #include "tool_setup.h"> src\tool_hugehelp.c
echo #include "tool_hugehelp.hd">> src\tool_hugehelp.c
echo.>> src\tool_hugehelp.c
echo void hugehelp(void^)>> src\tool_hugehelp.c
echo {>> src\tool_hugehelp.c
echo #ifdef USE_MANUAL>> src\tool_hugehelp.c
echo fputs("Built-in manual not included\n", stdout^);>> src\tool_hugehelp.c
echo #endif>> src\tool_hugehelp.c
echo }>> src\tool_hugehelp.c
)
)
findstr "/C:void hugehelp(void)" src\tool_hugehelp.c 1>NUL 2>&1
if errorlevel 1 (
if "%OS%" == "Windows_NT" endlocal
exit /B 2
)
if "%BASIC%" == "1" (
if "%OS%" == "Windows_NT" endlocal
exit /B 1
)
if "%OS%" == "Windows_NT" endlocal
exit /B 0
rem Function to clean-up local variables under DOS, Windows 3.x and
rem Windows 9x as setlocal isn't available until Windows NT
rem
:dosCleanup
set MODE=
set HAVE_GROFF=
set HAVE_NROFF=
set HAVE_PERL=
set HAVE_GZIP=
set BASIC_HUGEHELP=
set LC_ALL
set ROFFCMD=
set BASIC=
exit /B
:syntax
rem Display the help
echo.
echo Usage: buildconf [-clean]
echo.
echo -clean - Removes the files
goto error
:unknown
echo.
echo Error: Unknown argument '%1'
goto error
:norepo
echo.
echo Error: This batch file should only be used with a curl git repository
goto error
:nogenmakefile
echo.
echo Error: Unable to generate Makefile
goto error
:nogenhugehelp
echo.
echo Error: Unable to generate src\tool_hugehelp.c
goto error
:nogencurlbuild
echo.
echo Error: Unable to generate include\curl\curlbuild.h
goto error
:nocleanmakefile
echo.
echo Error: Unable to clean Makefile
goto error
:nocleanhugehelp
echo.
echo Error: Unable to clean src\tool_hugehelp.c
goto error
:nocleancurlbuild
echo.
echo Error: Unable to clean include\curl\curlbuild.h
goto error
:warning
echo.
echo Warning: The curl manual could not be integrated in the source. This means when
echo you build curl the manual will not be available (curl --man^). Integration of
echo the manual is not required and a summary of the options will still be available
echo (curl --help^). To integrate the manual your PATH is required to have
echo groff/nroff, perl and optionally gzip for compression.
goto success
:error
if "%OS%" == "Windows_NT" (
endlocal
) else (
call :dosCleanup
)
exit /B 1
:success
if "%OS%" == "Windows_NT" (
endlocal
) else (
call :dosCleanup
)
exit /B 0

View File

@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___ # | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____| # \___|\___/|_| \_\_____|
# #
# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. # Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
# #
# This software is licensed as described in the file COPYING, which # This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms # you should have received as part of this distribution. The terms
@@ -39,6 +39,7 @@ AC_CONFIG_SRCDIR([lib/urldata.h])
AC_CONFIG_HEADERS(lib/curl_config.h include/curl/curlbuild.h) AC_CONFIG_HEADERS(lib/curl_config.h include/curl/curlbuild.h)
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
CURL_CHECK_OPTION_DEBUG CURL_CHECK_OPTION_DEBUG
CURL_CHECK_OPTION_OPTIMIZE CURL_CHECK_OPTION_OPTIMIZE
@@ -47,6 +48,7 @@ CURL_CHECK_OPTION_WERROR
CURL_CHECK_OPTION_CURLDEBUG CURL_CHECK_OPTION_CURLDEBUG
CURL_CHECK_OPTION_SYMBOL_HIDING CURL_CHECK_OPTION_SYMBOL_HIDING
CURL_CHECK_OPTION_ARES CURL_CHECK_OPTION_ARES
CURL_CHECK_OPTION_RT
XC_CHECK_PATH_SEPARATOR XC_CHECK_PATH_SEPARATOR
@@ -147,7 +149,7 @@ AC_SUBST(PKGADD_VENDOR)
dnl dnl
dnl initialize all the info variables dnl initialize all the info variables
curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls,winssl,darwinssl} )" curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl,mbedtls,cyassl,axtls,winssl,darwinssl} )"
curl_ssh_msg="no (--with-libssh2)" curl_ssh_msg="no (--with-libssh2)"
curl_zlib_msg="no (--with-zlib)" curl_zlib_msg="no (--with-zlib)"
curl_gss_msg="no (--with-gssapi)" curl_gss_msg="no (--with-gssapi)"
@@ -165,6 +167,7 @@ curl_verbose_msg="enabled (--disable-verbose)"
curl_rtsp_msg="no (--enable-rtsp)" curl_rtsp_msg="no (--enable-rtsp)"
curl_rtmp_msg="no (--with-librtmp)" curl_rtmp_msg="no (--with-librtmp)"
curl_mtlnk_msg="no (--with-libmetalink)" curl_mtlnk_msg="no (--with-libmetalink)"
curl_psl_msg="no (--with-libpsl)"
init_ssl_msg=${curl_ssl_msg} init_ssl_msg=${curl_ssl_msg}
@@ -1046,7 +1049,7 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
if test "$LDAPLIBNAME" = "wldap32"; then if test "$LDAPLIBNAME" = "wldap32"; then
curl_ldap_msg="enabled (winldap)" curl_ldap_msg="enabled (winldap)"
AC_DEFINE(CURL_LDAP_WIN, 1, [Use Windows LDAP implementation]) AC_DEFINE(USE_WIN32_LDAP, 1, [Use Windows LDAP implementation])
else else
curl_ldap_msg="enabled (OpenLDAP)" curl_ldap_msg="enabled (OpenLDAP)"
if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
@@ -1184,6 +1187,8 @@ AC_ARG_WITH(gssapi,
fi fi
]) ])
: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"}
save_CPPFLAGS="$CPPFLAGS" save_CPPFLAGS="$CPPFLAGS"
AC_MSG_CHECKING([if GSS-API support is requested]) AC_MSG_CHECKING([if GSS-API support is requested])
if test x"$want_gss" = xyes; then if test x"$want_gss" = xyes; then
@@ -1192,8 +1197,8 @@ if test x"$want_gss" = xyes; then
if test -z "$GSSAPI_INCS"; then if test -z "$GSSAPI_INCS"; then
if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi` GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
elif test -f "$GSSAPI_ROOT/bin/krb5-config"; then elif test -f "$KRB5CONFIG"; then
GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi` GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi`
elif test "$GSSAPI_ROOT" != "yes"; then elif test "$GSSAPI_ROOT" != "yes"; then
GSSAPI_INCS="-I$GSSAPI_ROOT/include" GSSAPI_INCS="-I$GSSAPI_ROOT/include"
fi fi
@@ -1283,10 +1288,10 @@ if test x"$want_gss" = xyes; then
dnl into LIBS dnl into LIBS
gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi` gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi`
LIBS="$gss_libs $LIBS" LIBS="$gss_libs $LIBS"
elif test -f "$GSSAPI_ROOT/bin/krb5-config"; then elif test -f "$KRB5CONFIG"; then
dnl krb5-config doesn't have --libs-only-L or similar, put everything dnl krb5-config doesn't have --libs-only-L or similar, put everything
dnl into LIBS dnl into LIBS
gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi` gss_libs=`$KRB5CONFIG --libs gssapi`
LIBS="$gss_libs $LIBS" LIBS="$gss_libs $LIBS"
else else
case $host in case $host in
@@ -1394,6 +1399,24 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
CLEANCPPFLAGS="$CPPFLAGS" CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS" CLEANLIBS="$LIBS"
dnl This is for Msys/Mingw
case $host in
*-*-msys* | *-*-mingw*)
AC_MSG_CHECKING([for gdi32])
my_ac_save_LIBS=$LIBS
LIBS="-lgdi32 $LIBS"
AC_TRY_LINK([#include <windef.h>
#include <wingdi.h>],
[GdiFlush();],
[ dnl worked!
AC_MSG_RESULT([yes])],
[ dnl failed, restore LIBS
LIBS=$my_ac_save_LIBS
AC_MSG_RESULT(no)]
)
;;
esac
case "$OPT_SSL" in case "$OPT_SSL" in
yes) yes)
dnl --with-ssl (without path) used dnl --with-ssl (without path) used
@@ -1451,6 +1474,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
$PKGCONFIG --cflags-only-I openssl 2>/dev/null` $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
AC_SUBST(SSL_LIBS)
AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"]) AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"]) AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"]) AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
@@ -1471,31 +1495,13 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS" CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
LDFLAGS="$LDFLAGS $SSL_LDFLAGS" LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
dnl This is for Msys/Mingw AC_CHECK_LIB(crypto, HMAC_Update,[
case $host in
*-*-msys* | *-*-mingw*)
AC_MSG_CHECKING([for gdi32])
my_ac_save_LIBS=$LIBS
LIBS="-lgdi32 $LIBS"
AC_TRY_LINK([#include <windef.h>
#include <wingdi.h>],
[GdiFlush();],
[ dnl worked!
AC_MSG_RESULT([yes])],
[ dnl failed, restore LIBS
LIBS=$my_ac_save_LIBS
AC_MSG_RESULT(no)]
)
;;
esac
AC_CHECK_LIB(crypto, CRYPTO_lock,[
HAVECRYPTO="yes" HAVECRYPTO="yes"
LIBS="-lcrypto $LIBS" LIBS="-lcrypto $LIBS"
],[ ],[
LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL" LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include" CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
AC_CHECK_LIB(crypto, CRYPTO_add_lock,[ AC_CHECK_LIB(crypto, HMAC_Init_ex,[
HAVECRYPTO="yes" HAVECRYPTO="yes"
LIBS="-lcrypto $LIBS"], [ LIBS="-lcrypto $LIBS"], [
LDFLAGS="$CLEANLDFLAGS" LDFLAGS="$CLEANLDFLAGS"
@@ -1505,6 +1511,46 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
]) ])
if test X"$HAVECRYPTO" = X"yes"; then
AC_MSG_CHECKING([OpenSSL linking without -ldl])
saved_libs=$LIBS
AC_TRY_LINK(
[
#include <openssl/evp.h>
],
[
SSLeay_add_all_algorithms();
],
[
AC_MSG_RESULT(yes)
LIBS="$saved_libs"
],
[
AC_MSG_RESULT(no)
AC_MSG_CHECKING([OpenSSL linking with -ldl])
LIBS="-ldl $LIBS"
AC_TRY_LINK(
[
#include <openssl/evp.h>
],
[
SSLeay_add_all_algorithms();
],
[
AC_MSG_RESULT(yes)
LIBS="$saved_libs -ldl"
],
[
AC_MSG_RESULT(no)
LIBS="$saved_libs"
]
)
]
)
fi
if test X"$HAVECRYPTO" = X"yes"; then if test X"$HAVECRYPTO" = X"yes"; then
dnl This is only reasonable to do if crypto actually is there: check for dnl This is only reasonable to do if crypto actually is there: check for
dnl SSL libs NOTE: it is important to do this AFTER the crypto lib dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
@@ -1527,7 +1573,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
else else
dnl Have the libraries--check for SSLeay/OpenSSL headers dnl Have the libraries--check for OpenSSL headers
AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \ AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
openssl/pem.h openssl/ssl.h openssl/err.h, openssl/pem.h openssl/ssl.h openssl/err.h,
curl_ssl_msg="enabled (OpenSSL)" curl_ssl_msg="enabled (OpenSSL)"
@@ -1551,17 +1597,11 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
fi fi
if test X"$OPENSSL_ENABLED" = X"1"; then if test X"$OPENSSL_ENABLED" = X"1"; then
AC_DEFINE(USE_SSLEAY, 1, [if SSL is enabled])
dnl is there a pkcs12.h header present? dnl is there a pkcs12.h header present?
AC_CHECK_HEADERS(openssl/pkcs12.h) AC_CHECK_HEADERS(openssl/pkcs12.h)
else else
LIBS="$CLEANLIBS" LIBS="$CLEANLIBS"
fi fi
dnl USE_SSLEAY is the historical name for what configure calls
dnl OPENSSL_ENABLED; the names should really be unified
USE_SSLEAY="$OPENSSL_ENABLED"
AC_SUBST(USE_SSLEAY)
if test X"$OPT_SSL" != Xoff && if test X"$OPT_SSL" != Xoff &&
test "$OPENSSL_ENABLED" != "1"; then test "$OPENSSL_ENABLED" != "1"; then
@@ -1578,8 +1618,12 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
AC_CHECK_FUNCS( ENGINE_load_builtin_engines ) AC_CHECK_FUNCS( ENGINE_load_builtin_engines )
]) ])
dnl these can only exist if openssl exists dnl These can only exist if OpenSSL exists
dnl yassl doesn't have SSL_get_shutdown dnl Older versions of Cyassl (some time before 2.9.4) don't have
dnl SSL_get_shutdown (but this check won't actually detect it there
dnl as it's a macro that needs the header files be included)
dnl BoringSSL didn't have DES_set_odd_parity for a while but now it is
dnl back again.
AC_CHECK_FUNCS( RAND_status \ AC_CHECK_FUNCS( RAND_status \
RAND_screen \ RAND_screen \
@@ -1587,28 +1631,38 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
ENGINE_cleanup \ ENGINE_cleanup \
CRYPTO_cleanup_all_ex_data \ CRYPTO_cleanup_all_ex_data \
SSL_get_shutdown \ SSL_get_shutdown \
SSLv2_client_method ) SSLv2_client_method \
DES_set_odd_parity )
dnl Make an attempt to detect if this is actually yassl's headers and AC_MSG_CHECKING([for BoringSSL])
dnl OpenSSL emulation layer. We still leave everything else believing AC_COMPILE_IFELSE([
dnl and acting like OpenSSL. AC_LANG_PROGRAM([[
#include <openssl/base.h>
]],[[
#ifndef OPENSSL_IS_BORINGSSL
#error not boringssl
#endif
]])
],[
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1,
[Define to 1 if using BoringSSL.])
],[
AC_MSG_RESULT([no])
])
AC_MSG_CHECKING([for yaSSL using OpenSSL compatibility mode]) AC_MSG_CHECKING([for libressl])
AC_COMPILE_IFELSE([ AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[ AC_LANG_PROGRAM([[
#include <openssl/ssl.h> #include <openssl/opensslv.h>
]],[[ ]],[[
#if defined(YASSL_VERSION) && defined(OPENSSL_VERSION_NUMBER) int dummy = LIBRESSL_VERSION_NUMBER;
int dummy = SSL_ERROR_NONE;
#else
Not the yaSSL OpenSSL compatibility header.
#endif
]]) ]])
],[ ],[
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1, AC_DEFINE_UNQUOTED(HAVE_LIBRESSL, 1,
[Define to 1 if using yaSSL in OpenSSL compatibility mode.]) [Define to 1 if using libressl.])
curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)" curl_ssl_msg="enabled (libressl)"
],[ ],[
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
]) ])
@@ -1672,8 +1726,8 @@ dnl ---
if test "$OPENSSL_ENABLED" = "1"; then if test "$OPENSSL_ENABLED" = "1"; then
AC_CHECK_LIB(crypto, SRP_Calc_client_key, AC_CHECK_LIB(crypto, SRP_Calc_client_key,
[ [
AC_DEFINE(HAVE_SSLEAY_SRP, 1, [if you have the function SRP_Calc_client_key]) AC_DEFINE(HAVE_OPENSSL_SRP, 1, [if you have the function SRP_Calc_client_key])
AC_SUBST(HAVE_SSLEAY_SRP, [1]) AC_SUBST(HAVE_OPENSSL_SRP, [1])
]) ])
fi fi
@@ -1784,6 +1838,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH]) AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH])
fi fi
fi fi
AC_CHECK_FUNCS(gnutls_certificate_set_x509_key_file2)
fi fi
fi fi
@@ -1921,6 +1976,93 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
fi fi
dnl ----------------------------------------------------
dnl check for mbedTLS
dnl ----------------------------------------------------
OPT_MBEDTLS=no
_cppflags=$CPPFLAGS
_ldflags=$LDFLAGS
AC_ARG_WITH(mbedtls,dnl
AC_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points to the installation root])
AC_HELP_STRING([--without-mbedtls], [disable mbedTLS detection]),
OPT_MBEDTLS=$withval)
if test "$curl_ssl_msg" = "$init_ssl_msg"; then
if test X"$OPT_MBEDTLS" != Xno; then
if test "$OPT_MBEDTLS" = "yes"; then
OPT_MBEDTLS=""
fi
if test -z "$OPT_MBEDTLS" ; then
dnl check for lib first without setting any new path
AC_CHECK_LIB(mbedtls, mbedtls_havege_init,
dnl libmbedtls found, set the variable
[
AC_DEFINE(USE_MBEDTLS, 1, [if mbedTLS is enabled])
AC_SUBST(USE_MBEDTLS, [1])
MBEDTLS_ENABLED=1
USE_MBEDTLS="yes"
curl_ssl_msg="enabled (mbedTLS)"
], [], -lmbedx509 -lmbedcrypto)
fi
addld=""
addlib=""
addcflags=""
mbedtlslib=""
if test "x$USE_MBEDTLS" != "xyes"; then
dnl add the path and test again
addld=-L$OPT_MBEDTLS/lib$libsuff
addcflags=-I$OPT_MBEDTLS/include
mbedtlslib=$OPT_MBEDTLS/lib$libsuff
LDFLAGS="$LDFLAGS $addld"
if test "$addcflags" != "-I/usr/include"; then
CPPFLAGS="$CPPFLAGS $addcflags"
fi
AC_CHECK_LIB(mbedtls, mbedtls_ssl_init,
[
AC_DEFINE(USE_MBEDTLS, 1, [if mbedTLS is enabled])
AC_SUBST(USE_MBEDTLS, [1])
MBEDTLS_ENABLED=1
USE_MBEDTLS="yes"
curl_ssl_msg="enabled (mbedTLS)"
],
[
CPPFLAGS=$_cppflags
LDFLAGS=$_ldflags
], -lmbedx509 -lmbedcrypto)
fi
if test "x$USE_MBEDTLS" = "xyes"; then
AC_MSG_NOTICE([detected mbedTLS])
LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $LIBS"
if test -n "$mbedtlslib"; then
dnl when shared libs were found in a path that the run-time
dnl linker doesn't search through, we need to add it to
dnl LD_LIBRARY_PATH to prevent further configure tests to fail
dnl due to this
if test "x$cross_compiling" != "xyes"; then
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$mbedtlslib"
export LD_LIBRARY_PATH
AC_MSG_NOTICE([Added $mbedtlslib to LD_LIBRARY_PATH])
fi
fi
fi
fi dnl mbedTLS not disabled
fi
dnl ---------------------------------------------------- dnl ----------------------------------------------------
dnl check for CyaSSL dnl check for CyaSSL
dnl ---------------------------------------------------- dnl ----------------------------------------------------
@@ -1943,6 +2085,10 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
OPT_CYASSL="" OPT_CYASSL=""
fi fi
dnl This should be reworked to use pkg-config instead
cyassllibname=cyassl
if test -z "$OPT_CYASSL" ; then if test -z "$OPT_CYASSL" ; then
dnl check for lib in system default first dnl check for lib in system default first
@@ -1984,19 +2130,70 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
[ [
CPPFLAGS=$_cppflags CPPFLAGS=$_cppflags
LDFLAGS=$_ldflags LDFLAGS=$_ldflags
cyassllib=""
]) ])
fi fi
addld=""
addlib=""
addcflags=""
if test "x$USE_CYASSL" != "xyes"; then
dnl libcyassl renamed to libwolfssl as of 3.4.0
addld=-L$OPT_CYASSL/lib$libsuff
addcflags=-I$OPT_CYASSL/include
cyassllib=$OPT_CYASSL/lib$libsuff
LDFLAGS="$LDFLAGS $addld"
if test "$addcflags" != "-I/usr/include"; then
CPPFLAGS="$CPPFLAGS $addcflags"
fi
cyassllibname=wolfssl
my_ac_save_LIBS="$LIBS"
LIBS="-l$cyassllibname -lm $LIBS"
AC_MSG_CHECKING([for CyaSSL_Init in -lwolfssl])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
/* These aren't needed for detection and confuse WolfSSL.
They are set up properly later if it is detected. */
#undef SIZEOF_LONG
#undef SIZEOF_LONG_LONG
#include <cyassl/ssl.h>
]],[[
return CyaSSL_Init();
]])
],[
AC_MSG_RESULT(yes)
AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
AC_SUBST(USE_CYASSL, [1])
CYASSL_ENABLED=1
USE_CYASSL="yes"
curl_ssl_msg="enabled (CyaSSL)"
],
[
AC_MSG_RESULT(no)
CPPFLAGS=$_cppflags
LDFLAGS=$_ldflags
cyassllib=""
])
LIBS="$my_ac_save_LIBS"
fi
if test "x$USE_CYASSL" = "xyes"; then if test "x$USE_CYASSL" = "xyes"; then
AC_MSG_NOTICE([detected CyaSSL]) AC_MSG_NOTICE([detected CyaSSL])
dnl cyassl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined! dnl cyassl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined!
AC_CHECK_SIZEOF(long long) AC_CHECK_SIZEOF(long long)
dnl Versions since at least 2.6.0 may have options.h
AC_CHECK_HEADERS(cyassl/options.h)
dnl Versions since at least 2.9.4 renamed error.h to error-ssl.h dnl Versions since at least 2.9.4 renamed error.h to error-ssl.h
AC_CHECK_HEADERS(cyassl/error-ssl.h) AC_CHECK_HEADERS(cyassl/error-ssl.h)
LIBS="-lcyassl -lm $LIBS" LIBS="-l$cyassllibname -lm $LIBS"
if test -n "$cyassllib"; then if test -n "$cyassllib"; then
dnl when shared libs were found in a path that the run-time dnl when shared libs were found in a path that the run-time
@@ -2063,57 +2260,73 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
fi fi
fi fi
else else
# Without pkg-config, we'll kludge in some defaults NSS_PCDIR="$OPT_NSS/lib/pkgconfig"
addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl" if test -f "$NSS_PCDIR/nss.pc"; then
addcflags="-I$OPT_NSS/include" CURL_CHECK_PKGCONFIG(nss, [$NSS_PCDIR])
version="unknown" if test "$PKGCONFIG" != "no" ; then
nssprefix=$OPT_NSS addld=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --libs-only-L nss`
fi addlib=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --libs-only-l nss`
addcflags=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --cflags nss`
if test -n "$addlib"; then version=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --modversion nss`
nssprefix=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --variable=prefix nss`
CLEANLIBS="$LIBS"
CLEANCPPFLAGS="$CPPFLAGS"
LIBS="$addlib $LIBS"
if test "$addcflags" != "-I/usr/include"; then
CPPFLAGS="$CPPFLAGS $addcflags"
fi
dnl The function SSL_VersionRangeSet() is needed to enable TLS > 1.0
AC_CHECK_LIB(nss3, SSL_VersionRangeSet,
[
AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
AC_SUBST(USE_NSS, [1])
USE_NSS="yes"
NSS_ENABLED=1
curl_ssl_msg="enabled (NSS)"
],
[
LIBS="$CLEANLIBS"
CPPFLAGS="$CLEANCPPFLAGS"
])
if test "x$USE_NSS" = "xyes"; then
AC_MSG_NOTICE([detected NSS version $version])
dnl needed when linking the curl tool without USE_EXPLICIT_LIB_DEPS
NSS_LIBS=$addlib
AC_SUBST([NSS_LIBS])
dnl when shared libs were found in a path that the run-time
dnl linker doesn't search through, we need to add it to
dnl LD_LIBRARY_PATH to prevent further configure tests to fail
dnl due to this
if test "x$cross_compiling" != "xyes"; then
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
export LD_LIBRARY_PATH
AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
fi fi
fi fi
fi fi
if test -z "$addlib"; then
# Without pkg-config, we'll kludge in some defaults
AC_MSG_WARN([Using hard-wired libraries and compilation flags for NSS.])
addld="-L$OPT_NSS/lib"
addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4"
addcflags="-I$OPT_NSS/include"
version="unknown"
nssprefix=$OPT_NSS
fi
CLEANLDFLAGS="$LDFLAGS"
CLEANLIBS="$LIBS"
CLEANCPPFLAGS="$CPPFLAGS"
LDFLAGS="$addld $LDFLAGS"
LIBS="$addlib $LIBS"
if test "$addcflags" != "-I/usr/include"; then
CPPFLAGS="$CPPFLAGS $addcflags"
fi
dnl The function SSL_VersionRangeSet() is needed to enable TLS > 1.0
AC_CHECK_LIB(nss3, SSL_VersionRangeSet,
[
AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
AC_SUBST(USE_NSS, [1])
USE_NSS="yes"
NSS_ENABLED=1
curl_ssl_msg="enabled (NSS)"
],
[
LDFLAGS="$CLEANLDFLAGS"
LIBS="$CLEANLIBS"
CPPFLAGS="$CLEANCPPFLAGS"
])
if test "x$USE_NSS" = "xyes"; then
AC_MSG_NOTICE([detected NSS version $version])
dnl needed when linking the curl tool without USE_EXPLICIT_LIB_DEPS
NSS_LIBS=$addlib
AC_SUBST([NSS_LIBS])
dnl when shared libs were found in a path that the run-time
dnl linker doesn't search through, we need to add it to
dnl LD_LIBRARY_PATH to prevent further configure tests to fail
dnl due to this
if test "x$cross_compiling" != "xyes"; then
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
export LD_LIBRARY_PATH
AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
fi
fi dnl NSS found
fi dnl NSS not disabled fi dnl NSS not disabled
fi dnl curl_ssl_msg = init_ssl_msg fi dnl curl_ssl_msg = init_ssl_msg
@@ -2174,7 +2387,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
fi fi
fi fi
if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED$WINSSL_ENABLED$DARWINSSL_ENABLED" = "x"; then if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$MBEDTLS_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED$WINSSL_ENABLED$DARWINSSL_ENABLED" = "x"; then
AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.]) AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-axtls, --with-winssl, or --with-darwinssl to address this.]) AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-axtls, --with-winssl, or --with-darwinssl to address this.])
else else
@@ -2189,6 +2402,27 @@ dnl **********************************************************************
CURL_CHECK_CA_BUNDLE CURL_CHECK_CA_BUNDLE
dnl **********************************************************************
dnl Check for libpsl
dnl **********************************************************************
AC_ARG_WITH(libpsl,
AS_HELP_STRING([--without-libpsl],
[disable support for libpsl cookie checking]),
with_libpsl=$withval,
with_libpsl=yes)
if test $with_libpsl != "no"; then
AC_SEARCH_LIBS(psl_builtin, psl,
[curl_psl_msg="yes";
AC_DEFINE([USE_LIBPSL], [1], [PSL support enabled])
],
[curl_psl_msg="no (libpsl not found)";
AC_MSG_WARN([libpsl was not found])
]
)
fi
AM_CONDITIONAL([USE_LIBPSL], [test "$curl_psl_msg" = "yes"])
dnl ********************************************************************** dnl **********************************************************************
dnl Check for libmetalink dnl Check for libmetalink
dnl ********************************************************************** dnl **********************************************************************
@@ -2768,7 +3002,9 @@ if test X"$want_h2" != Xno; then
CPPFLAGS="$CPPFLAGS $CPP_H2" CPPFLAGS="$CPPFLAGS $CPP_H2"
LIBS="$LIB_H2 $LIBS" LIBS="$LIB_H2 $LIBS"
AC_CHECK_LIB(nghttp2, nghttp2_session_callbacks_set_send_callback, # use nghttp2_option_set_no_recv_client_magic to require nghttp2
# >= 1.0.0
AC_CHECK_LIB(nghttp2, nghttp2_option_set_no_recv_client_magic,
[ [
AC_CHECK_HEADERS(nghttp2/nghttp2.h, AC_CHECK_HEADERS(nghttp2/nghttp2.h,
curl_h2_msg="enabled (nghttp2)" curl_h2_msg="enabled (nghttp2)"
@@ -3142,7 +3378,7 @@ if test "x$want_thres" = xyes && test "x$want_ares" = xyes; then
[Options --enable-threaded-resolver and --enable-ares are mutually exclusive]) [Options --enable-threaded-resolver and --enable-ares are mutually exclusive])
fi fi
if test "$want_thres" = "yes"; then if test "$want_thres" = "yes" && test "$dontwant_rt" = "no"; then
AC_CHECK_HEADER(pthread.h, AC_CHECK_HEADER(pthread.h,
[ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>]) [ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
save_CFLAGS="$CFLAGS" save_CFLAGS="$CFLAGS"
@@ -3268,7 +3504,7 @@ AC_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
want_tls_srp=yes want_tls_srp=yes
) )
if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_SSLEAY_SRP" = "x1") ; then if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_OPENSSL_SRP" = "x1") ; then
AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication]) AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication])
USE_TLS_SRP=1 USE_TLS_SRP=1
curl_tls_srp_msg="enabled" curl_tls_srp_msg="enabled"
@@ -3382,7 +3618,7 @@ dnl For keeping supported features and protocols also in pkg-config file
dnl since it is more cross-compile friendly than curl-config dnl since it is more cross-compile friendly than curl-config
dnl dnl
if test "x$USE_SSLEAY" = "x1"; then if test "x$OPENSSL_ENABLED" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES SSL" SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
elif test -n "$SSL_ENABLED"; then elif test -n "$SSL_ENABLED"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES SSL" SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
@@ -3410,6 +3646,10 @@ if test "x$HAVE_GSSAPI" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API" SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API"
fi fi
if test "x$curl_psl_msg" = "xyes"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES PSL"
fi
if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \ if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
\( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO" SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO"
@@ -3421,7 +3661,7 @@ if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
fi fi
if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1"; then if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1"; then
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \ if test "x$OPENSSL_ENABLED" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
-o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \ -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \
-o "x$DARWINSSL_ENABLED" = "x1"; then -o "x$DARWINSSL_ENABLED" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM" SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
@@ -3494,7 +3734,7 @@ if test "x$CURL_DISABLE_IMAP" != "x1"; then
fi fi
if test "x$CURL_DISABLE_SMB" != "x1" \ if test "x$CURL_DISABLE_SMB" != "x1" \
-a "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" \ -a "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" \
-a \( "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \ -a \( "x$OPENSSL_ENABLED" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
-o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \ -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \
-o "x$DARWINSSL_ENABLED" = "x1" \); then -o "x$DARWINSSL_ENABLED" = "x1" \); then
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB" SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB"
@@ -3615,6 +3855,7 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
RTSP support: ${curl_rtsp_msg} RTSP support: ${curl_rtsp_msg}
RTMP support: ${curl_rtmp_msg} RTMP support: ${curl_rtmp_msg}
metalink support: ${curl_mtlnk_msg} metalink support: ${curl_mtlnk_msg}
PSL support: ${curl_psl_msg}
HTTP2 support: ${curl_h2_msg} HTTP2 support: ${curl_h2_msg}
Protocols: ${SUPPORT_PROTOCOLS} Protocols: ${SUPPORT_PROTOCOLS}
]) ])

View File

@@ -71,7 +71,7 @@ while test $# -gt 0; do
;; ;;
--ca) --ca)
echo "@CURL_CA_BUNDLE@" echo @CURL_CA_BUNDLE@
;; ;;
--cc) --cc)

View File

@@ -50,7 +50,7 @@ Cocoa
D D
Written by Kenneth Bogert Written by Kenneth Bogert
http://curl.haxx.se/libcurl/d/ http://dlang.org/library/std/net/curl.html
Dylan Dylan
@@ -60,7 +60,7 @@ Dylan
Eiffel Eiffel
Written by Eiffel Software Written by Eiffel Software
http://curl.haxx.se/libcurl/eiffel/ https://room.eiffel.com/library/curl
Euphoria Euphoria
@@ -78,7 +78,7 @@ Ferite
Gambas Gambas
http://gambas.sourceforge.net http://gambas.sourceforge.net/
glib/GTK+ glib/GTK+
@@ -90,6 +90,11 @@ Guile:
Written by Michael L. Gran Written by Michael L. Gran
http://www.lonelycactus.com/guile-curl.html http://www.lonelycactus.com/guile-curl.html
Harbour
Written by Viktor Szakáts
https://github.com/vszakats/harbour-core/tree/master/contrib/hbcurl
Haskell Haskell
Written by Galois, Inc Written by Galois, Inc
@@ -97,8 +102,7 @@ Haskell
Java Java
Maintained by [blank] https://github.com/pjlegato/curl-java
http://curl.haxx.se/libcurl/java/
Julia Julia
@@ -115,7 +119,7 @@ Lua
luacurl by Alexander Marinov luacurl by Alexander Marinov
http://luacurl.luaforge.net/ http://luacurl.luaforge.net/
Lua-cURL by J<EFBFBD>rgen H<EFBFBD>tzel Lua-cURL by Jürgen Hötzel
http://luaforge.net/projects/lua-curl/ http://luaforge.net/projects/lua-curl/
Mono Mono
@@ -126,7 +130,7 @@ Mono
.NET .NET
libcurl-net by Jeffrey Phillips libcurl-net by Jeffrey Phillips
http://sourceforge.net/projects/libcurl-net/ https://sourceforge.net/projects/libcurl-net/
node.js node.js
@@ -141,7 +145,7 @@ Object-Pascal
O'Caml O'Caml
Written by Lars Nilsson Written by Lars Nilsson
http://sourceforge.net/projects/ocurl/ https://sourceforge.net/projects/ocurl/
Pascal Pascal
@@ -150,13 +154,13 @@ Pascal
Perl Perl
Maintained by Cris Bailiff Maintained by Cris Bailiff and Bálint Szilakszi
http://curl.haxx.se/libcurl/perl/ https://github.com/szbalint/WWW--Curl
PHP PHP
Written by Sterling Hughes Written by Sterling Hughes
http://curl.haxx.se/libcurl/php/ https://php.net/curl
PostgreSQL PostgreSQL
@@ -170,8 +174,7 @@ Python
R R
RCurl by Duncan Temple Lang http://cran.r-project.org/package=curl
http://www.omegahat.org/RCurl/
Rexx Rexx
@@ -192,10 +195,15 @@ Ruby
ruby-curl-multi - written by Kristjan Petursson and Keith Rarick ruby-curl-multi - written by Kristjan Petursson and Keith Rarick
http://curl-multi.rubyforge.org/ http://curl-multi.rubyforge.org/
Rust
curl-rust - by Carl Lerche
https://github.com/carllerche/curl-rust
Scheme Scheme
Bigloo binding by Kirill Lisovsky Bigloo binding by Kirill Lisovsky
http://curl.haxx.se/libcurl/scheme/ http://www.metapaper.net/lisovsky/web/curl/
S-Lang S-Lang
@@ -219,13 +227,13 @@ SPL
Tcl Tcl
Tclcurl by Andr<EFBFBD>s Garc<EFBFBD>a Tclcurl by Andrés García
http://personal1.iddeo.es/andresgarci/tclcurl/english/docs.html http://mirror.yellow5.com/tclcurl/
Visual Basic Visual Basic
libcurl-vb by Jeffrey Phillips libcurl-vb by Jeffrey Phillips
http://sourceforge.net/projects/libcurl-vb/ https://sourceforge.net/projects/libcurl-vb/
Visual Foxpro Visual Foxpro
@@ -245,3 +253,8 @@ XBLite
Written by David Szafranski Written by David Szafranski
http://perso.wanadoo.fr/xblite/libraries.html http://perso.wanadoo.fr/xblite/libraries.html
Xojo
Written by Andrew Lambert
https://github.com/charonn0/RB-libcURL

View File

@@ -35,11 +35,9 @@ BUGS
have a go at a solution. You can optionally also post your bug/problem at have a go at a solution. You can optionally also post your bug/problem at
curl's bug tracking system over at curl's bug tracking system over at
https://sourceforge.net/p/curl/bugs/ https://github.com/bagder/curl/issues
Please read the rest of this document below first before doing that! Also, Please read the rest of this document below first before doing that!
you need to login to your sourceforge account before being able to submit a
bug report (necessary evil done to avoid spam).
If you feel you need to ask around first, find a suitable mailing list and If you feel you need to ask around first, find a suitable mailing list and
post there. The lists are available on http://curl.haxx.se/mail/ post there. The lists are available on http://curl.haxx.se/mail/

32
docs/CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,32 @@
Contributor Code of Conduct
===========================
As contributors and maintainers of this project, we pledge to respect all
people who contribute through reporting issues, posting feature requests,
updating documentation, submitting pull requests or patches, and other
activities.
We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, or religion.
Examples of unacceptable behavior by participants include the use of sexual
language or imagery, derogatory comments or personal attacks, trolling, public
or private harassment, insults, or other unprofessional conduct.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct. Project maintainers who do not
follow the Code of Conduct may be removed from the project team.
This code of conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by opening an issue or contacting one or more of the project
maintainers.
This Code of Conduct is adapted from the [Contributor
Covenant](http://contributor-covenant.org), version 1.1.0, available at
[http://contributor-covenant.org/version/1/1/0/](http://contributor-covenant.org/version/1/1/0/)

View File

@@ -34,7 +34,7 @@
3.3 How To Make a Patch without git 3.3 How To Make a Patch without git
3.4 How to get your changes into the main sources 3.4 How to get your changes into the main sources
3.5 Write good commit messages 3.5 Write good commit messages
3.6 Please don't send pull requests 3.6 About pull requests
============================================================================== ==============================================================================
@@ -52,6 +52,10 @@
We also hang out on IRC in #curl on irc.freenode.net We also hang out on IRC in #curl on irc.freenode.net
If you're at all interested in the code side of things, consider clicking
'watch' on the curl repo at github to get notified on pull requests and new
issues posted there.
1.2. License 1.2. License
When contributing with code, you agree to put your changes and new code under When contributing with code, you agree to put your changes and new code under
@@ -78,10 +82,10 @@
1.3 What To Read 1.3 What To Read
Source code, the man pages, the INTERNALS document, TODO, KNOWN_BUGS, the Source code, the man pages, the INTERNALS document, TODO, KNOWN_BUGS and the
most recent CHANGES. Just lurking on the curl-library mailing list is gonna most recent changes in the git log. Just lurking on the curl-library mailing
give you a lot of insights on what's going on right now. Asking there is a list is gonna give you a lot of insights on what's going on right now. Asking
good idea too. there is a good idea too.
2. cURL Coding Standards 2. cURL Coding Standards
@@ -199,7 +203,7 @@
You need to first checkout the repository: You need to first checkout the repository:
git clone git://github.com/bagder/curl.git git clone https://github.com/bagder/curl.git
You then proceed and edit all the files you like and you commit them to your You then proceed and edit all the files you like and you commit them to your
local repository: local repository:
@@ -241,8 +245,8 @@
For unix-like operating systems: For unix-like operating systems:
http://www.gnu.org/software/patch/patch.html https://savannah.gnu.org/projects/patch/
http://www.gnu.org/directory/diffutils.html https://www.gnu.org/software/diffutils/
For Windows: For Windows:
@@ -288,27 +292,15 @@
and make sure that you have your own user and email setup correctly in git and make sure that you have your own user and email setup correctly in git
before you commit before you commit
3.6 Please don't send pull requests 3.6 About pull requests
With git (and especially github) it is easy and tempting to send a pull With git (and especially github) it is easy and tempting to send a pull
request to one or more people in the curl project to have changes merged this request to the curl project to have changes merged this way instead of
way instead of mailing patches to the curl-library mailing list. mailing patches to the curl-library mailing list.
We don't like that. We want them mailed for these reasons: We used to dislike this but we're trying to change that and accept that this
is a frictionless way for people to contribute to the project. We now welcome
pull requests!
- Peer review. Anyone and everyone on the list can review, comment and We will continue to avoid using github's merge tools to make the history
improve on the patch. Pull requests limit this ability. linear and to make sure commits follow our style guidelines.
- Anyone can merge the patch into their own trees for testing and those who
have push rights can push it to the main repo. It doesn't have to be anyone
the patch author knows beforehand.
- Commit messages can be tweaked and changed if merged locally instead of
using github. Merges directly on github requires the changes to be perfect
already, which they seldom are.
- Merges on github prevents rebases and even enforces --no-ff which is a git
style we don't otherwise use in the project
However: once patches have been reviewed and deemed fine on list they are
perfectly OK to be pulled from a published git tree.

View File

@@ -1,176 +0,0 @@
Date: February 11, 2007
Author: Daniel Stenberg <daniel@haxx.se>
URL: http://curl.haxx.se/legal/distro-dilemma.html
Condition
This document is written to describe the situation as it is right now.
libcurl 7.16.1 is currently the latest version available. Things may of
course change in the future.
This document reflects my view and understanding of these things. Please tell
me where and how you think I'm wrong, and I'll try to correct my mistakes.
Background
The Free Software Foundation has deemed the Original BSD license[1] to be
"incompatible"[2] with GPL[3]. I'd rather say it is the other way around, but
the point is the same: if you distribute a binary version of a GPL program,
it MUST NOT be linked with any Original BSD-licensed parts or libraries.
Doing so will violate the GPL license. For a long time, very many GPL
licensed programs have avoided this license mess by adding an exception[8] to
their license. And many others have just closed their eyes for this problem.
libcurl is MIT-style[4] licensed - how on earth did this dilemma fall onto
our plates?
libcurl is only a little library. libcurl can be built to use OpenSSL for its
SSL/TLS capabilities. OpenSSL is basically Original BSD licensed[5].
If libcurl built to use OpenSSL is used by a GPL-licensed application and you
decide to distribute a binary version of it (Linux distros - for example -
tend to), you have a clash. GPL vs Original BSD.
This dilemma is not libcurl-specific nor is it specific to any particular
Linux distro. (This article mentions and refers to Debian several times, but
only because Debian seems to be the only Linux distro to have faced this
issue yet since no other distro is shipping libcurl built with two SSL
libraries.)
Part of the Operating System
This would not be a problem if the used lib would be considered part of the
underlying operating system, as then the GPL license has an exception
clause[6] that allows applications to use such libs without having to be
allowed to distribute it or its sources. Possibly some distros will claim
that OpenSSL is part of their operating system.
Debian does however not take this stance and has officially(?) claimed that
OpenSSL is not a required part of the Debian operating system
Some people claim that this paragraph cannot be exploited this way by a Linux
distro, but I am not a lawyer and that is a discussion left outside of this
document.
GnuTLS
Since May 2005 libcurl can get built to use GnuTLS instead of OpenSSL. GnuTLS
is an LGPL[7] licensed library that offers a matching set of features as
OpenSSL does. Now, you can build and distribute an TLS/SSL capable libcurl
without including any Original BSD licensed code.
I believe Debian is the first (only?) distro that provides libcurl/GnuTLS
packages.
yassl
libcurl can get also get built to use yassl for the TLS/SSL layer. yassl is a
GPL[3] licensed library.
GnuTLS vs OpenSSL vs yassl
While these three libraries offer similar features, they are not equal.
libcurl does not (yet) offer a standardized stable ABI if you decide to
switch from using libcurl-openssl to libcurl-gnutls or vice-versa. The GnuTLS
and yassl support is very recent in libcurl and it has not been tested nor
used very extensively, while the OpenSSL equivalent code has been used and
thus matured since 1999.
GnuTLS
- LGPL licensed
- supports SRP
- lacks SSLv2 support
- lacks MD2 support (used by at least some CA certs)
- lacks the crypto functions libcurl uses for NTLM
OpenSSL
- Original BSD licensed
- lacks SRP
- supports SSLv2
- older and more widely used
- provides crypto functions libcurl uses for NTLM
- libcurl can do non-blocking connects with it in 7.15.4 and later
yassl
- GPL licensed
- much untested and unproven in the real work by (lib)curl users so we don't
know a lot about restrictions or benefits from using this
The Better License, Original BSD, GPL or LGPL?
It isn't obvious or without debate to any objective interested party that
either of these licenses are the "better" or even the "preferred" one in a
generic situation.
Instead, I think we should accept the fact that the SSL/TLS libraries and
their different licenses will fit different applications and their authors
differently depending on the applications' licenses and their general usage
pattern (considering how GPL and LGPL libraries for example can be burdensome
for embedded systems usage).
In Debian land, there seems to be a common opinion that LGPL is "maximally
compatible" with apps while Original BSD is not. Like this:
http://lists.debian.org/debian-devel/2005/09/msg01417.html
More SSL Libraries
In libcurl, there's no stopping us here. There are more Open Source/Free
SSL/TLS libraries out there and we would very much like to support them as
well, to offer application authors an even wider scope of choice.
Application Angle of this Problem
libcurl is built to use one SSL/TLS library. It uses a single fixed name (by
default) on the built/created lib file, and applications are built/linked to
use that single lib. Replacing one libcurl instance with another one that
uses the other SSL/TLS library might break one or more applications (due to
ABI differences and/or different feature set). You want your application to
use the libcurl it was built for.
Project cURL Angle of this Problem
We distribute libcurl and everyone may build libcurl with either library at
their choice. This problem is not directly a problem of ours. It merely
affects users - GPL application authors only - of our lib as it comes
included and delivered on some distros.
libcurl has different ABI when built with different SSL/TLS libraries due to
these reasons:
1. No one has worked on fixing this. The mutex/lock callbacks should be set
with a generic libcurl function that should use the proper underlying
functions.
2. The CURLOPT_SSL_CTX_FUNCTION option is not possible to "emulate" on GnuTLS
but simply requires OpenSSL.
3. There might be some other subtle differences just because nobody has yet
tried to make a fixed ABI like this.
Distro Angle of this Problem
To my knowledge there is only one distro that ships libcurl built with either
OpenSSL or GnuTLS.
Debian Linux is now (since mid September 2005) providing two different
libcurl packages, one for libcurl built with OpenSSL and one built with
GnuTLS. They use different .so names and can this both be installed in a
single system simultaneously. This has been said to be a transitional system
not desired to keep in the long run.
Footnotes
[1] = http://www.xfree86.org/3.3.6/COPYRIGHT2.html#6
[2] = http://www.fsf.org/licensing/essays/bsd.html
[3] = http://www.fsf.org/licensing/licenses/gpl.html
[4] = http://curl.haxx.se/docs/copyright.html
[5] = http://www.openssl.org/source/license.html
[6] = http://www.fsf.org/licensing/licenses/gpl.html end of section 3
[7] = http://www.fsf.org/licensing/licenses/lgpl.html
[8] = http://en.wikipedia.org/wiki/OpenSSL_exception
Feedback/Updates provided by
Eric Cooper

View File

@@ -21,6 +21,7 @@ FAQ
1.12 I have a problem who can I chat with? 1.12 I have a problem who can I chat with?
1.13 curl's ECCN number? 1.13 curl's ECCN number?
1.14 How do I submit my patch? 1.14 How do I submit my patch?
1.15 How do I port libcurl to my OS?
2. Install Related Problems 2. Install Related Problems
2.1 configure doesn't find OpenSSL even when it is installed 2.1 configure doesn't find OpenSSL even when it is installed
@@ -81,6 +82,7 @@ FAQ
4.18 file:// URLs containing drive letters (Windows, NetWare) 4.18 file:// URLs containing drive letters (Windows, NetWare)
4.19 Why doesn't cURL return an error when the network cable is unplugged? 4.19 Why doesn't cURL return an error when the network cable is unplugged?
4.20 curl doesn't return error for HTTP non-200 responses! 4.20 curl doesn't return error for HTTP non-200 responses!
4.21 Why is there a HTTP/1.1 in my HTTP/2 request?
5. libcurl Issues 5. libcurl Issues
5.1 Is libcurl thread-safe? 5.1 Is libcurl thread-safe?
@@ -350,7 +352,7 @@ FAQ
cryptography. When doing so, the Export Control Classification Number (ECCN) cryptography. When doing so, the Export Control Classification Number (ECCN)
is used to identify the level of export control etc. is used to identify the level of export control etc.
ASF gives a good explanation at http://www.apache.org/dev/crypto.html ASF gives a good explanation at https://www.apache.org/dev/crypto.html
We believe curl's number might be ECCN 5D002, another possibility is We believe curl's number might be ECCN 5D002, another possibility is
5D992. It seems necessary to write them, asking to confirm. 5D992. It seems necessary to write them, asking to confirm.
@@ -379,6 +381,19 @@ FAQ
Lots of more details are found in the CONTRIBUTE and INTERNALS docs. Lots of more details are found in the CONTRIBUTE and INTERNALS docs.
1.15 How do I port libcurl to my OS?
Here's a rough step-by-step:
1. copy a suitable lib/config-*.h file as a start to lib/config-[youros].h
2. edit lib/config-[youros].h to match your OS and setup
3. edit lib/curl_setup.h to include config-[youros].h when your OS is
detected by the preprocessor, in the style others already exist
4. compile lib/*.c and make them into a library
2. Install Related Problems 2. Install Related Problems
@@ -764,8 +779,9 @@ FAQ
request-body in a GET request with something like "curl -X GET -d data request-body in a GET request with something like "curl -X GET -d data
[URL]" [URL]"
Note that -X doesn't change curl's behavior. It only modifies the actual Note that -X doesn't actually change curl's behavior as it only modifies the
string sent in the request. actual string sent in the request, but that may of course trigger a
different set of events.
Accordingly, by using -XPOST on a command line that for example would follow Accordingly, by using -XPOST on a command line that for example would follow
a 303 redirect, you will effectively prevent curl from behaving a 303 redirect, you will effectively prevent curl from behaving
@@ -1026,7 +1042,7 @@ FAQ
timeout is set. timeout is set.
See option TcpMaxConnectRetransmissions on this page: See option TcpMaxConnectRetransmissions on this page:
http://support.microsoft.com/?scid=kb%3Ben-us%3B175523&x=6&y=7 https://support.microsoft.com/en-us/kb/175523/en-us
Also, even on non-Windows systems there may run a firewall or anti-virus Also, even on non-Windows systems there may run a firewall or anti-virus
software or similar that accepts the connection but does not actually do software or similar that accepts the connection but does not actually do
@@ -1043,7 +1059,7 @@ FAQ
You'll find that even if D:\blah.txt does exist, cURL returns a 'file You'll find that even if D:\blah.txt does exist, cURL returns a 'file
not found' error. not found' error.
According to RFC 1738 (http://www.faqs.org/rfcs/rfc1738.html), According to RFC 1738 (https://www.ietf.org/rfc/rfc1738.txt),
file:// URLs must contain a host component, but it is ignored by file:// URLs must contain a host component, but it is ignored by
most implementations. In the above example, 'D:' is treated as the most implementations. In the above example, 'D:' is treated as the
host component, and is taken away. Thus, cURL tries to open '/blah.txt'. host component, and is taken away. Thus, cURL tries to open '/blah.txt'.
@@ -1115,6 +1131,16 @@ FAQ
You can also use the -w option and the variable %{response_code} to extract You can also use the -w option and the variable %{response_code} to extract
the exact response code that was return in the response. the exact response code that was return in the response.
4.21 Why is there a HTTP/1.1 in my HTTP/2 request?
If you use verbose to see the HTTP request when you send off a HTTP/2
request, it will still say 1.1.
The reason for this is that we first generate the request to send using the
old 1.1 style and show that request in the verbose output, and then we
convert it over to the binary header-compressed HTTP/2 style. The actual
"1.1" part from that request is then not actually used in the transfer. The
binary HTTP/2 headers are not human readable.
5. libcurl Issues 5. libcurl Issues
@@ -1137,13 +1163,13 @@ FAQ
If you use a OpenSSL-powered libcurl in a multi-threaded environment, you If you use a OpenSSL-powered libcurl in a multi-threaded environment, you
need to provide one or two locking functions: need to provide one or two locking functions:
http://www.openssl.org/docs/crypto/threads.html https://www.openssl.org/docs/crypto/threads.html
If you use a GnuTLS-powered libcurl in a multi-threaded environment, you If you use a GnuTLS-powered libcurl in a multi-threaded environment, you
need to provide locking function(s) for libgcrypt (which is used by GnuTLS need to provide locking function(s) for libgcrypt (which is used by GnuTLS
for the crypto functions). for the crypto functions).
http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html https://web.archive.org/web/20111103083330/http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html
No special locking is needed with a NSS-powered libcurl. NSS is thread-safe. No special locking is needed with a NSS-powered libcurl. NSS is thread-safe.
@@ -1319,7 +1345,7 @@ FAQ
Also note that on many networks NATs or other IP-munging techniques are used Also note that on many networks NATs or other IP-munging techniques are used
that makes you see and use a different IP address locally than what the that makes you see and use a different IP address locally than what the
remote server will see you coming from. You may also consider using remote server will see you coming from. You may also consider using
http://www.torproject.org . https://www.torproject.org/ .
5.13 How do I stop an ongoing transfer? 5.13 How do I stop an ongoing transfer?
@@ -1510,9 +1536,7 @@ FAQ
7.2 Who wrote PHP/CURL? 7.2 Who wrote PHP/CURL?
PHP/CURL is a module that comes with the regular PHP package. It depends and PHP/CURL was initially written by Sterling Hughes.
uses libcurl, so you need to have libcurl installed properly first before
PHP/CURL can be used. PHP/CURL was initially written by Sterling Hughes.
7.3 Can I perform multiple requests using the same handle? 7.3 Can I perform multiple requests using the same handle?
@@ -1521,4 +1545,10 @@ FAQ
unknown to me). unknown to me).
After a transfer, you just set new options in the handle and make another After a transfer, you just set new options in the handle and make another
transfer. This will make libcurl to re-use the same connection if it can. transfer. This will make libcurl re-use the same connection if it can.
7.4 Does PHP/CURL have dependencies?
PHP/CURL is a module that comes with the regular PHP package. It depends on
and uses libcurl, so you need to have libcurl installed properly before
PHP/CURL can be used.

View File

@@ -134,8 +134,8 @@ SMB
- authentication with NTLMv1 - authentication with NTLMv1
SMTP SMTP
- authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9) and Kerberos 5 - authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9), Kerberos 5
(*4) (*4) and External.
- send e-mails - send e-mails
- mail from support - mail from support
- mail size support - mail size support
@@ -150,8 +150,8 @@ SMTPS (*1)
POP3 POP3
- authentication: Clear Text, APOP and SASL - authentication: Clear Text, APOP and SASL
- SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9) and - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9),
Kerberos 5 (*4) Kerberos 5 (*4) and External.
- list e-mails - list e-mails
- retrieve e-mails - retrieve e-mails
- enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via - enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via
@@ -165,8 +165,8 @@ POP3S (*1)
IMAP IMAP
- authentication: Clear Text and SASL - authentication: Clear Text and SASL
- SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9) and - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9),
Kerberos 5 (*4) Kerberos 5 (*4) and External.
- list the folders of a mailbox - list the folders of a mailbox
- select a mailbox with support for verifying the UIDVALIDITY - select a mailbox with support for verifying the UIDVALIDITY
- fetch e-mails with support for specifying the UID and SECTION - fetch e-mails with support for specifying the UID and SECTION

View File

@@ -36,7 +36,7 @@ HTTP Cookies
For a very long time, the only spec explaining how to use cookies was the For a very long time, the only spec explaining how to use cookies was the
original Netscape spec from 1994: http://curl.haxx.se/rfc/cookie_spec.html original Netscape spec from 1994: http://curl.haxx.se/rfc/cookie_spec.html
In 2011, RFC6265 (http://www.ietf.org/rfc/rfc6265.txt) was finally published In 2011, RFC6265 (https://www.ietf.org/rfc/rfc6265.txt) was finally published
and details how cookies work within HTTP. and details how cookies work within HTTP.
1.2 Cookies saved to disk 1.2 Cookies saved to disk

107
docs/HTTP2.md Normal file
View File

@@ -0,0 +1,107 @@
HTTP/2 with curl
================
[HTTP/2 Spec](https://www.rfc-editor.org/rfc/rfc7540.txt)
[http2 explained](http://daniel.haxx.se/http2/)
Build prerequisites
-------------------
- nghttp2
- OpenSSL, NSS, GnutTLS or PolarSSL with a new enough version
[nghttp2](https://nghttp2.org/)
-------------------------------
libcurl uses this 3rd party library for the low level protocol handling
parts. The reason for this is that HTTP/2 is much more complex at that layer
than HTTP/1.1 (which we implement on our own) and that nghttp2 is an already
existing and well functional library.
We require at least version 1.0.0.
Over an http:// URL
-------------------
If `CURLOPT_HTTP_VERSION` is set to `CURL_HTTP_VERSION_2_0`, libcurl will
include an upgrade header in the initial request to the host to allow
upgrading to HTTP/2.
Possibly we can later introduce an option that will cause libcurl to fail if
not possible to upgrade. Possibly we introduce an option that makes libcurl
use HTTP/2 at once over http://
Over an https:// URL
--------------------
If `CURLOPT_HTTP_VERSION` is set to `CURL_HTTP_VERSION_2_0`, libcurl will use
ALPN (or NPN) to negotiate which protocol to continue with. Possibly introduce
an option that will cause libcurl to fail if not possible to use HTTP/2.
Consider options to explicitly disable ALPN and/or NPN.
ALPN is the TLS extension that HTTP/2 is expected to use. The NPN extension is
for a similar purpose, was made prior to ALPN and is used for SPDY so early
HTTP/2 servers are implemented using NPN before ALPN support is widespread.
SSL libs
--------
The challenge is the ALPN and NPN support and all our different SSL
backends. You may need a fairly updated SSL library version for it to
provide the necessary TLS features. Right now we support:
- OpenSSL: ALPN and NPN
- NSS: ALPN and NPN
- GnuTLS: ALPN
- PolarSSL: ALPN
Multiplexing
------------
Starting in 7.43.0, libcurl fully supports HTTP/2 multiplexing, which is the
term for doing multiple independent transfers over the same physical TCP
connection.
To take advantage of multiplexing, you need to use the multi interface and set
`CURLMOPT_PIPELINING` to `CURLPIPE_MULTIPLEX`. With that bit set, libcurl will
attempt to re-use existing HTTP/2 connections and just add a new stream over
that when doing subsequent parallel requests.
While libcurl sets up a connection to a HTTP server there is a period during
which it doesn't know if it can pipeline or do multiplexing and if you add new
transfers in that period, libcurl will default to start new connections for
those transfers. With the new option `CURLOPT_PIPEWAIT` (added in 7.43.0), you
can ask that a transfer should rather wait and see in case there's a
connection for the same host in progress that might end up being possible to
multiplex on. It favours keeping the number of connections low to the cost of
slightly longer time to first byte transferred.
Applications
------------
We hide HTTP/2's binary nature and convert received HTTP/2 traffic to headers
in HTTP 1.1 style. This allows applications to work unmodified.
curl tool
---------
curl offers the `--http2` command line option to enable use of HTTP/2
HTTP Alternative Services
-------------------------
Alt-Svc is a suggested extension with a corresponding frame (ALTSVC) in HTTP/2
that tells the client about an alternative "route" to the same content for the
same origin server that you get the response from. A browser or long-living
client can use that hint to create a new connection asynchronously. For
libcurl, we may introduce a way to bring such clues to the applicaton and/or
let a subsequent request use the alternate route
automatically. [Spec](https://tools.ietf.org/html/draft-ietf-httpbis-alt-svc-05)
TODO
----
- Provide API to set priorities / dependencies of individual streams
- Implement "prior-knowledge" HTTP/2 connecitons over clear text so that
curl can connect with HTTP/2 at once without 1.1+Upgrade.

View File

@@ -173,13 +173,13 @@ Win32
advice given above. advice given above.
KB94248 - How To Use the C Run-Time KB94248 - How To Use the C Run-Time
http://support.microsoft.com/kb/94248/en-us https://support.microsoft.com/kb/94248/en-us
KB140584 - How to link with the correct C Run-Time (CRT) library KB140584 - How to link with the correct C Run-Time (CRT) library
http://support.microsoft.com/kb/140584/en-us https://support.microsoft.com/kb/140584/en-us
KB190799 - Potential Errors Passing CRT Objects Across DLL Boundaries KB190799 - Potential Errors Passing CRT Objects Across DLL Boundaries
http://msdn.microsoft.com/en-us/library/ms235460 https://msdn.microsoft.com/en-us/library/ms235460
If your app is misbehaving in some strange way, or it is suffering If your app is misbehaving in some strange way, or it is suffering
from memory corruption, before asking for further help, please try from memory corruption, before asking for further help, please try
@@ -209,8 +209,8 @@ Win32
environment variables, for example: environment variables, for example:
set ZLIB_PATH=c:\zlib-1.2.8 set ZLIB_PATH=c:\zlib-1.2.8
set OPENSSL_PATH=c:\openssl-0.9.8zc set OPENSSL_PATH=c:\openssl-1.0.2c
set LIBSSH2_PATH=c:\libssh2-1.4.3 set LIBSSH2_PATH=c:\libssh2-1.6.0
ATTENTION: if you want to build with libssh2 support you have to use latest ATTENTION: if you want to build with libssh2 support you have to use latest
version 0.17 - previous versions will NOT work with 7.17.0 and later! version 0.17 - previous versions will NOT work with 7.17.0 and later!
@@ -232,7 +232,7 @@ Win32
- optional MingW32-built OpenLDAP SDK available from: - optional MingW32-built OpenLDAP SDK available from:
http://www.gknw.net/mirror/openldap/ http://www.gknw.net/mirror/openldap/
- optional recent Novell CLDAP SDK available from: - optional recent Novell CLDAP SDK available from:
http://developer.novell.com/ndk/cldap.htm https://www.novell.com/developer/ndk/ldap_libraries_for_c.html
Cygwin Cygwin
------ ------
@@ -254,7 +254,7 @@ Win32
If you use MSVC 6 it is required that you use the February 2003 edition of If you use MSVC 6 it is required that you use the February 2003 edition of
the 'Platform SDK' which can be downloaded from: the 'Platform SDK' which can be downloaded from:
http://www.microsoft.com/en-us/download/details.aspx?id=12261 https://www.microsoft.com/en-us/download/details.aspx?id=12261
Building any software with MSVC 6 without having PSDK installed is just Building any software with MSVC 6 without having PSDK installed is just
asking for trouble down the road once you have released it, you might notice asking for trouble down the road once you have released it, you might notice
@@ -263,7 +263,7 @@ Win32
software built in such way will at some point regret having done so. software built in such way will at some point regret having done so.
If the compiler has been updated with the installation of a service pack as If the compiler has been updated with the installation of a service pack as
those mentioned in http://support.microsoft.com/kb/194022 the compiler can be those mentioned in https://support.microsoft.com/kb/194022 the compiler can be
safely used to read source code, translate and make it object code. safely used to read source code, translate and make it object code.
But, even with the service packs mentioned above installed, the resulting But, even with the service packs mentioned above installed, the resulting
@@ -299,7 +299,7 @@ Win32
Then run 'nmake vc' in curl's root directory. Then run 'nmake vc' in curl's root directory.
If you want to compile with zlib support, you will need to build If you want to compile with zlib support, you will need to build
zlib (http://www.gzip.org/zlib/) as well. Please read the zlib zlib (http://www.zlib.net/) as well. Please read the zlib
documentation on how to compile zlib. Define the ZLIB_PATH environment documentation on how to compile zlib. Define the ZLIB_PATH environment
variable to the location of zlib.h and zlib.lib, for example: variable to the location of zlib.h and zlib.lib, for example:
@@ -471,6 +471,15 @@ Win32
add '-DCURL_STATICLIB' to your CFLAGS. Otherwise the linker will look for add '-DCURL_STATICLIB' to your CFLAGS. Otherwise the linker will look for
dynamic import symbols. dynamic import symbols.
Legacy Windows and SSL
----------------------
WinSSL (specifically SChannel from Windows SSPI), is the native SSL library
in Windows. However, WinSSL in Windows <= XP is unable to connect to servers
that no longer support the legacy handshakes and algorithms used by those
versions. If you will be using curl in one of those earlier versions of
Windows you should choose another SSL backend such as OpenSSL.
Apple iOS and Mac OS X Apple iOS and Mac OS X
====================== ======================
@@ -665,12 +674,10 @@ NetWare
- gnu make and awk running on the platform you compile on; - gnu make and awk running on the platform you compile on;
native Win32 versions can be downloaded from: native Win32 versions can be downloaded from:
http://www.gknw.net/development/prgtools/ http://www.gknw.net/development/prgtools/
- recent Novell LibC SDK available from: - recent Novell LibC or Novell CLib SDK available from:
http://developer.novell.com/ndk/libc.htm https://www.novell.com/developer/ndk/
- or recent Novell CLib SDK available from:
http://developer.novell.com/ndk/clib.htm
- optional recent Novell CLDAP SDK available from: - optional recent Novell CLDAP SDK available from:
http://developer.novell.com/ndk/cldap.htm https://www.novell.com/developer/ndk/ldap_libraries_for_c.html
- optional zlib sources (static or dynamic linking with zlib.imp); - optional zlib sources (static or dynamic linking with zlib.imp);
sources with NetWare Makefile can be obtained from: sources with NetWare Makefile can be obtained from:
http://www.gknw.net/mirror/zlib/ http://www.gknw.net/mirror/zlib/
@@ -825,7 +832,7 @@ VxWorks
To build libcurl for VxWorks you need: To build libcurl for VxWorks you need:
- CYGWIN (free, http://cygwin.com/) - CYGWIN (free, https://cygwin.com/)
- Wind River Workbench (commercial) - Wind River Workbench (commercial)
If you have CYGWIN and Workbench installed on you machine If you have CYGWIN and Workbench installed on you machine
@@ -943,9 +950,10 @@ REDUCING SIZE
important factor. First, be sure to set the CFLAGS variable when important factor. First, be sure to set the CFLAGS variable when
configuring with any relevant compiler optimization flags to reduce the configuring with any relevant compiler optimization flags to reduce the
size of the binary. For gcc, this would mean at minimum the -Os option, size of the binary. For gcc, this would mean at minimum the -Os option,
and potentially the -march=X and -mdynamic-no-pic options as well, e.g. and potentially the -march=X, -mdynamic-no-pic and -flto options as well,
e.g.
./configure CFLAGS='-Os' ... ./configure CFLAGS='-Os' LDFLAGS='-Wl,-Bsymbolic'...
Note that newer compilers often produce smaller code than older versions Note that newer compilers often produce smaller code than older versions
due to improved optimization. due to improved optimization.
@@ -963,7 +971,9 @@ REDUCING SIZE
--disable-ipv6 (disables support for IPv6) --disable-ipv6 (disables support for IPv6)
--disable-manual (disables support for the built-in documentation) --disable-manual (disables support for the built-in documentation)
--disable-proxy (disables support for HTTP and SOCKS proxies) --disable-proxy (disables support for HTTP and SOCKS proxies)
--disable-unix-sockets (disables support for UNIX sockets)
--disable-verbose (eliminates debugging strings and error code strings) --disable-verbose (eliminates debugging strings and error code strings)
--disable-versioned-symbols (disables support for versioned symbols)
--enable-hidden-symbols (eliminates unneeded symbols in the shared library) --enable-hidden-symbols (eliminates unneeded symbols in the shared library)
--without-libidn (disables support for the libidn DNS library) --without-libidn (disables support for the libidn DNS library)
--without-librtmp (disables support for RTMP) --without-librtmp (disables support for RTMP)
@@ -976,7 +986,7 @@ REDUCING SIZE
configure command-line, e.g. configure command-line, e.g.
CFLAGS="-Os -ffunction-sections -fdata-sections \ CFLAGS="-Os -ffunction-sections -fdata-sections \
-fno-unwind-tables -fno-asynchronous-unwind-tables" \ -fno-unwind-tables -fno-asynchronous-unwind-tables -flto" \
LDFLAGS="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections" LDFLAGS="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections"
Be sure also to strip debugging symbols from your binaries after Be sure also to strip debugging symbols from your binaries after
@@ -986,9 +996,9 @@ REDUCING SIZE
.comment section). .comment section).
Using these techniques it is possible to create a basic HTTP-only shared Using these techniques it is possible to create a basic HTTP-only shared
libcurl library for i386 Linux platforms that is only 114 KiB in size, and libcurl library for i386 Linux platforms that is only 109 KiB in size, and
an FTP-only library that is 115 KiB in size (as of libcurl version 7.35.0, an FTP-only library that is 109 KiB in size (as of libcurl version 7.45.0,
using gcc 4.8.2). using gcc 4.9.2).
You may find that statically linking libcurl to your application will You may find that statically linking libcurl to your application will
result in a lower total size than dynamically linking. result in a lower total size than dynamically linking.
@@ -1086,18 +1096,18 @@ Useful URLs
axTLS http://axtls.sourceforge.net/ axTLS http://axtls.sourceforge.net/
c-ares http://c-ares.haxx.se/ c-ares http://c-ares.haxx.se/
GNU GSS http://www.gnu.org/software/gss/ GNU GSS https://www.gnu.org/software/gss/
GnuTLS http://www.gnu.org/software/gnutls/ GnuTLS https://www.gnu.org/software/gnutls/
Heimdal http://www.pdc.kth.se/heimdal/ Heimdal http://www.h5l.org/
libidn http://www.gnu.org/software/libidn/ libidn https://www.gnu.org/software/libidn/
libmetalink https://launchpad.net/libmetalink/ libmetalink https://launchpad.net/libmetalink/
libssh2 http://www.libssh2.org/ libssh2 http://www.libssh2.org/
MIT Kerberos http://web.mit.edu/kerberos/www/dist/ MIT Kerberos http://web.mit.edu/kerberos/www/dist/
NSS http://www.mozilla.org/projects/security/pki/nss/ NSS https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
OpenLDAP http://www.openldap.org/ OpenLDAP http://www.openldap.org/
OpenSSL http://www.openssl.org/ OpenSSL https://www.openssl.org/
PolarSSL http://polarssl.org/ PolarSSL https://tls.mbed.org/
yassl http://www.yassl.com/ wolfSSL https://www.wolfssl.com/wolfSSL/
Zlib http://www.zlib.net/ Zlib http://www.zlib.net/
MingW http://www.mingw.org/ MingW http://www.mingw.org/

View File

@@ -95,7 +95,7 @@ install instructions may produce erratic behaviour in DevCpp. For further info
check the following sites check the following sites
http://aditsu.freeunixhost.com/dev-cpp-faq.html http://aditsu.freeunixhost.com/dev-cpp-faq.html
http://sourceforge.net/forum/message.php?msg_id=3252213 https://sourceforge.net/p/dev-cpp/discussion/48211/thread/2a85ea46
As I have mentioned before I will confine this to the SSL Library compilations As I have mentioned before I will confine this to the SSL Library compilations
but the process is very similar for compilation of the executable - curl.exe; but the process is very similar for compilation of the executable - curl.exe;

File diff suppressed because it is too large Load Diff

View File

@@ -3,6 +3,18 @@ join in and help us correct one or more of these! Also be sure to check the
changelog of the current development status, as one or more of these problems changelog of the current development status, as one or more of these problems
may have been fixed since this was written! may have been fixed since this was written!
91. "curl_easy_perform hangs with imap and PolarSSL"
https://github.com/bagder/curl/issues/334
90. IMAP "SEARCH ALL" truncates output on large boxes. "A quick search of the
code reveals that pingpong.c contains some truncation code, at line 408,
when it deems the server response to be too large truncating it to 40
characters"
http://curl.haxx.se/bug/view.cgi?id=1366
89. Disabling HTTP Pipelining when there are ongoing transfers can lead to
heap corruption and crash. http://curl.haxx.se/bug/view.cgi?id=1411
88. libcurl doesn't support CURLINFO_FILETIME for SFTP transfers and thus 88. libcurl doesn't support CURLINFO_FILETIME for SFTP transfers and thus
curl's -R option also doesn't work then. curl's -R option also doesn't work then.
@@ -23,6 +35,7 @@ may have been fixed since this was written!
CURLINFO_STARTTRANSFER_TIME is wrong. While using POST CURLINFO_STARTTRANSFER_TIME is wrong. While using POST
CURLINFO_STARTTRANSFER_TIME minus CURLINFO_PRETRANSFER_TIME is near to zero CURLINFO_STARTTRANSFER_TIME minus CURLINFO_PRETRANSFER_TIME is near to zero
every time. every time.
https://github.com/bagder/curl/issues/218
http://curl.haxx.se/bug/view.cgi?id=1213 http://curl.haxx.se/bug/view.cgi?id=1213
84. CURLINFO_SSL_VERIFYRESULT is only implemented for the OpenSSL and NSS 84. CURLINFO_SSL_VERIFYRESULT is only implemented for the OpenSSL and NSS
@@ -49,16 +62,6 @@ may have been fixed since this was written!
that can receive data. This is subject for change in the future. that can receive data. This is subject for change in the future.
http://curl.haxx.se/bug/view.cgi?id=1116 http://curl.haxx.se/bug/view.cgi?id=1116
78. curl and libcurl don't always signal the client properly when "sending"
zero bytes files - it makes for example the command line client not creating
any file at all. Like when using FTP.
http://curl.haxx.se/bug/view.cgi?id=1063
76. The SOCKET type in Win64 is 64 bits large (and thus so is curl_socket_t on
that platform), and long is only 32 bits. It makes it impossible for
curl_easy_getinfo() to return a socket properly with the CURLINFO_LASTSOCKET
option as for all other operating systems.
75. NTLM authentication involving unicode user name or password only works 75. NTLM authentication involving unicode user name or password only works
properly if built with UNICODE defined together with the WinSSL/schannel properly if built with UNICODE defined together with the WinSSL/schannel
backend. The original problem was mentioned in: backend. The original problem was mentioned in:
@@ -88,7 +91,7 @@ may have been fixed since this was written!
something beyond ascii but currently libcurl will only pass in the verbatim something beyond ascii but currently libcurl will only pass in the verbatim
string the app provides. There are several browsers that already do this string the app provides. There are several browsers that already do this
encoding. The key seems to be the updated draft to RFC2231: encoding. The key seems to be the updated draft to RFC2231:
http://tools.ietf.org/html/draft-reschke-rfc2231-in-http-02 https://tools.ietf.org/html/draft-reschke-rfc2231-in-http-02
66. When using telnet, the time limitation options don't work. 66. When using telnet, the time limitation options don't work.
http://curl.haxx.se/bug/view.cgi?id=846 http://curl.haxx.se/bug/view.cgi?id=846
@@ -236,13 +239,3 @@ may have been fixed since this was written!
it seems HTTP servers send the *uncompressed* length in that header and it seems HTTP servers send the *uncompressed* length in that header and
libcurl thinks of it as the *compressed* length. Some explanations are here: libcurl thinks of it as the *compressed* length. Some explanations are here:
http://curl.haxx.se/mail/lib-2003-06/0146.html http://curl.haxx.se/mail/lib-2003-06/0146.html
2. If a HTTP server responds to a HEAD request and includes a body (thus
violating the RFC2616), curl won't wait to read the response but just stop
reading and return back. If a second request (let's assume a GET) is then
immediately made to the same server again, the connection will be re-used
fine of course, and the second request will be sent off but when the
response is to get read, the previous response-body is what curl will read
and havoc is what happens.
More details on this is found in this libcurl mailing list thread:
http://curl.haxx.se/mail/lib-2002-08/0000.html

View File

@@ -1,245 +0,0 @@
_ _ ____ _
___| | | | _ \| |
/ __| | | | |_) | |
| (__| |_| | _ <| |___
\___|\___/|_| \_\_____|
Structs in libcurl
This document should cover 7.32.0 pretty accurately, but will make sense even
for older and later versions as things don't change drastically that often.
1. The main structs in libcurl
1.1 SessionHandle
1.2 connectdata
1.3 Curl_multi
1.4 Curl_handler
1.5 conncache
1.6 Curl_share
1.7 CookieInfo
==============================================================================
1. The main structs in libcurl
1.1 SessionHandle
The SessionHandle handle struct is the one returned to the outside in the
external API as a "CURL *". This is usually known as an easy handle in API
documentations and examples.
Information and state that is related to the actual connection is in the
'connectdata' struct. When a transfer is about to be made, libcurl will
either create a new connection or re-use an existing one. The particular
connectdata that is used by this handle is pointed out by
SessionHandle->easy_conn.
Data and information that regard this particular single transfer is put in
the SingleRequest sub-struct.
When the SessionHandle struct is added to a multi handle, as it must be in
order to do any transfer, the ->multi member will point to the Curl_multi
struct it belongs to. The ->prev and ->next members will then be used by the
multi code to keep a linked list of SessionHandle structs that are added to
that same multi handle. libcurl always uses multi so ->multi *will* point to
a Curl_multi when a transfer is in progress.
->mstate is the multi state of this particular SessionHandle. When
multi_runsingle() is called, it will act on this handle according to which
state it is in. The mstate is also what tells which sockets to return for a
specific SessionHandle when curl_multi_fdset() is called etc.
The libcurl source code generally use the name 'data' for the variable that
points to the SessionHandle.
1.2 connectdata
A general idea in libcurl is to keep connections around in a connection
"cache" after they have been used in case they will be used again and then
re-use an existing one instead of creating a new as it creates a significant
performance boost.
Each 'connectdata' identifies a single physical connection to a server. If
the connection can't be kept alive, the connection will be closed after use
and then this struct can be removed from the cache and freed.
Thus, the same SessionHandle can be used multiple times and each time select
another connectdata struct to use for the connection. Keep this in mind, as
it is then important to consider if options or choices are based on the
connection or the SessionHandle.
Functions in libcurl will assume that connectdata->data points to the
SessionHandle that uses this connection.
As a special complexity, some protocols supported by libcurl require a
special disconnect procedure that is more than just shutting down the
socket. It can involve sending one or more commands to the server before
doing so. Since connections are kept in the connection cache after use, the
original SessionHandle may no longer be around when the time comes to shut
down a particular connection. For this purpose, libcurl holds a special
dummy 'closure_handle' SessionHandle in the Curl_multi struct to
FTP uses two TCP connections for a typical transfer but it keeps both in
this single struct and thus can be considered a single connection for most
internal concerns.
The libcurl source code generally use the name 'conn' for the variable that
points to the connectdata.
1.3 Curl_multi
Internally, the easy interface is implemented as a wrapper around multi
interface functions. This makes everything multi interface.
Curl_multi is the multi handle struct exposed as "CURLM *" in external APIs.
This struct holds a list of SessionHandle structs that have been added to
this handle with curl_multi_add_handle(). The start of the list is ->easyp
and ->num_easy is a counter of added SessionHandles.
->msglist is a linked list of messages to send back when
curl_multi_info_read() is called. Basically a node is added to that list
when an individual SessionHandle's transfer has completed.
->hostcache points to the name cache. It is a hash table for looking up name
to IP. The nodes have a limited life time in there and this cache is meant
to reduce the time for when the same name is wanted within a short period of
time.
->timetree points to a tree of SessionHandles, sorted by the remaining time
until it should be checked - normally some sort of timeout. Each
SessionHandle has one node in the tree.
->sockhash is a hash table to allow fast lookups of socket descriptor to
which SessionHandle that uses that descriptor. This is necessary for the
multi_socket API.
->conn_cache points to the connection cache. It keeps track of all
connections that are kept after use. The cache has a maximum size.
->closure_handle is described in the 'connectdata' section.
The libcurl source code generally use the name 'multi' for the variable that
points to the Curl_multi struct.
1.4 Curl_handler
Each unique protocol that is supported by libcurl needs to provide at least
one Curl_handler struct. It defines what the protocol is called and what
functions the main code should call to deal with protocol specific issues.
In general, there's a source file named [protocol].c in which there's a
"struct Curl_handler Curl_handler_[protocol]" declared. In url.c there's
then the main array with all individual Curl_handler structs pointed to from
a single array which is scanned through when a URL is given to libcurl to
work with.
->scheme is the URL scheme name, usually spelled out in uppercase. That's
"HTTP" or "FTP" etc. SSL versions of the protcol need its own Curl_handler
setup so HTTPS separate from HTTP.
->setup_connection is called to allow the protocol code to allocate protocol
specific data that then gets associated with that SessionHandle for the rest
of this transfer. It gets freed again at the end of the transfer. It will be
called before the 'connectdata' for the transfer has been selected/created.
Most protocols will allocate its private 'struct [PROTOCOL]' here and assign
SessionHandle->req.protop to point to it.
->connect_it allows a protocol to do some specific actions after the TCP
connect is done, that can still be considered part of the connection phase.
Some protocols will alter the connectdata->recv[] and connectdata->send[]
function pointers in this function.
->connecting is similarly a function that keeps getting called as long as the
protocol considers itself still in the connecting phase.
->do_it is the function called to issue the transfer request. What we call
the DO action internally. If the DO is not enough and things need to be kept
getting done for the entire DO sequence to complete, ->doing is then usually
also provided. Each protocol that needs to do multiple commands or similar
for do/doing need to implement their own state machines (see SCP, SFTP,
FTP). Some protocols (only FTP and only due to historical reasons) has a
separate piece of the DO state called DO_MORE.
->doing keeps getting called while issuing the transfer request command(s)
->done gets called when the transfer is complete and DONE. That's after the
main data has been transferred.
->do_more gets called during the DO_MORE state. The FTP protocol uses this
state when setting up the second connection.
->proto_getsock
->doing_getsock
->domore_getsock
->perform_getsock
Functions that return socket information. Which socket(s) to wait for which
action(s) during the particular multi state.
->disconnect is called immediately before the TCP connection is shutdown.
->readwrite gets called during transfer to allow the protocol to do extra
reads/writes
->defport is the default report TCP or UDP port this protocol uses
->protocol is one or more bits in the CURLPROTO_* set. The SSL versions have
their "base" protocol set and then the SSL variation. Like "HTTP|HTTPS".
->flags is a bitmask with additional information about the protocol that will
make it get treated differently by the generic engine:
PROTOPT_SSL - will make it connect and negotiate SSL
PROTOPT_DUAL - this protocol uses two connections
PROTOPT_CLOSEACTION - this protocol has actions to do before closing the
connection. This flag is no longer used by code, yet still set for a bunch
protocol handlers.
PROTOPT_DIRLOCK - "direction lock". The SSH protocols set this bit to
limit which "direction" of socket actions that the main engine will
concern itself about.
PROTOPT_NONETWORK - a protocol that doesn't use network (read file:)
PROTOPT_NEEDSPWD - this protocol needs a password and will use a default
one unless one is provided
PROTOPT_NOURLQUERY - this protocol can't handle a query part on the URL
(?foo=bar)
1.5 conncache
Is a hash table with connections for later re-use. Each SessionHandle has
a pointer to its connection cache. Each multi handle sets up a connection
cache that all added SessionHandles share by default.
1.6 Curl_share
The libcurl share API allocates a Curl_share struct, exposed to the external
API as "CURLSH *".
The idea is that the struct can have a set of own versions of caches and
pools and then by providing this struct in the CURLOPT_SHARE option, those
specific SessionHandles will use the caches/pools that this share handle
holds.
Then individual SessionHandle structs can be made to share specific things
that they otherwise wouldn't, such as cookies.
The Curl_share struct can currently hold cookies, DNS cache and the SSL
session cache.
1.7 CookieInfo
This is the main cookie struct. It holds all known cookies and related
information. Each SessionHandle has its own private CookieInfo even when
they are added to a multi handle. They can be made to share cookies by using
the share API.

View File

@@ -23,29 +23,29 @@ libcurl http://curl.haxx.se/docs/copyright.html
Uses an MIT (or Modified BSD)-style license that is as liberal as Uses an MIT (or Modified BSD)-style license that is as liberal as
possible. possible.
OpenSSL http://www.openssl.org/source/license.html OpenSSL https://www.openssl.org/source/license.html
(May be used for SSL/TLS support) Uses an Original BSD-style license (May be used for SSL/TLS support) Uses an Original BSD-style license
with an announcement clause that makes it "incompatible" with GPL. You with an announcement clause that makes it "incompatible" with GPL. You
are not allowed to ship binaries that link with OpenSSL that includes are not allowed to ship binaries that link with OpenSSL that includes
GPL code (unless that specific GPL code includes an exception for GPL code (unless that specific GPL code includes an exception for
OpenSSL - a habit that is growing more and more common). If OpenSSL's OpenSSL - a habit that is growing more and more common). If OpenSSL's
licensing is a problem for you, consider using GnuTLS or yassl licensing is a problem for you, consider using another TLS library.
instead.
GnuTLS http://www.gnutls.org/ GnuTLS http://www.gnutls.org/
(May be used for SSL/TLS support) Uses the LGPL[3] license. If this is (May be used for SSL/TLS support) Uses the LGPL[3] license. If this is
a problem for you, consider using OpenSSL instead. Also note that a problem for you, consider using another TLS library. Also note that
GnuTLS itself depends on and uses other libs (libgcrypt and GnuTLS itself depends on and uses other libs (libgcrypt and
libgpg-error) and they too are LGPL- or GPL-licensed. libgpg-error) and they too are LGPL- or GPL-licensed.
yassl http://www.yassl.com/ WolfSSL https://www.wolfssl.com/
(May be used for SSL/TLS support) Uses the GPL[1] license. If this is (May be used for SSL/TLS support) Uses the GPL[1] license or a
a problem for you, consider using OpenSSL or GnuTLS instead. propietary license. If this is a problem for you, consider using
another TLS library.
NSS http://www.mozilla.org/projects/security/pki/nss/ NSS https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
(May be used for SSL/TLS support) Is covered by the MPL[4] license, (May be used for SSL/TLS support) Is covered by the MPL[4] license,
the GPL[1] license and the LGPL[3] license. You may choose to license the GPL[1] license and the LGPL[3] license. You may choose to license
@@ -57,13 +57,29 @@ axTLS http://axtls.sourceforge.net/
(May be used for SSL/TLS support) Uses a Modified BSD-style license. (May be used for SSL/TLS support) Uses a Modified BSD-style license.
mbedTLS https://tls.mbed.org/
(May be used for SSL/TLS support) Uses the GPL[1] license or a
propietary license. If this is a problem for you, consider using
another TLS library.
BoringSSL https://boringssl.googlesource.com/
(May be used for SSL/TLS support) As an OpenSSL fork, it has the same
license as that.
libressl http://www.libressl.org/
(May be used for SSL/TLS support) As an OpenSSL fork, it has the same
license as that.
c-ares http://daniel.haxx.se/projects/c-ares/license.html c-ares http://daniel.haxx.se/projects/c-ares/license.html
(Used for asynchronous name resolves) Uses an MIT license that is very (Used for asynchronous name resolves) Uses an MIT license that is very
liberal and imposes no restrictions on any other library or part you liberal and imposes no restrictions on any other library or part you
may link with. may link with.
zlib http://www.gzip.org/zlib/zlib_license.html zlib http://www.zlib.net/zlib_license.html
(Used for compressed Transfer-Encoding support) Uses an MIT-style (Used for compressed Transfer-Encoding support) Uses an MIT-style
license that shouldn't collide with any other library. license that shouldn't collide with any other library.
@@ -73,12 +89,12 @@ MIT Kerberos http://web.mit.edu/kerberos/www/dist/
(May be used for GSS support) MIT licensed, that shouldn't collide (May be used for GSS support) MIT licensed, that shouldn't collide
with any other parts. with any other parts.
Heimdal http://www.pdc.kth.se/heimdal/ Heimdal http://www.h5l.org
(May be used for GSS support) Heimdal is Original BSD licensed with (May be used for GSS support) Heimdal is Original BSD licensed with
the announcement clause. the announcement clause.
GNU GSS http://www.gnu.org/software/gss/ GNU GSS https://www.gnu.org/software/gss/
(May be used for GSS support) GNU GSS is GPL licensed. Note that you (May be used for GSS support) GNU GSS is GPL licensed. Note that you
may not distribute binary curl packages that uses this if you build may not distribute binary curl packages that uses this if you build
@@ -105,10 +121,10 @@ libssh2 http://www.libssh2.org/
(Used for scp and sftp support) libssh2 uses a Modified BSD-style (Used for scp and sftp support) libssh2 uses a Modified BSD-style
license. license.
[1] = GPL - GNU General Public License: http://www.gnu.org/licenses/gpl.html [1] = GPL - GNU General Public License: https://www.gnu.org/licenses/gpl.html
[2] = http://www.fsf.org/licenses/gpl-faq.html#GPLIncompatibleLibs details on [2] = https://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs details on
how to write such an exception to the GPL how to write such an exception to the GPL
[3] = LGPL - GNU Lesser General Public License: [3] = LGPL - GNU Lesser General Public License:
http://www.gnu.org/licenses/lgpl.html https://www.gnu.org/licenses/lgpl.html
[4] = MPL - Mozilla Public License: [4] = MPL - Mozilla Public License:
http://www.mozilla.org/MPL/ https://www.mozilla.org/MPL/

View File

@@ -230,7 +230,7 @@ MAIL ETIQUETTE
Quote as little as possible. Just enough to provide the context you cannot Quote as little as possible. Just enough to provide the context you cannot
leave out. A lengthy description can be found here: leave out. A lengthy description can be found here:
http://www.netmeister.org/news/learn2quote.html https://www.netmeister.org/news/learn2quote.html
2.7 Digest 2.7 Digest

View File

@@ -470,8 +470,8 @@ COOKIES
stored cookies which match the request as it follows the location. The stored cookies which match the request as it follows the location. The
file "empty.txt" may be a nonexistent file. file "empty.txt" may be a nonexistent file.
Alas, to both read and write cookies from a netscape cookie file, you can To read and write cookies from a netscape cookie file, you can set both -b
set both -b and -c to use the same file: and -c to use the same file:
curl -b cookies.txt -c cookies.txt www.example.com curl -b cookies.txt -c cookies.txt www.example.com

View File

@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___ # | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____| # \___|\___/|_| \_\_____|
# #
# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. # Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
# #
# This software is licensed as described in the file COPYING, which # This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms # you should have received as part of this distribution. The terms
@@ -33,12 +33,12 @@ SUBDIRS = examples libcurl
CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES)
EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \ EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \ README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \
KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \ KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \
$(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp \ $(PDFPAGES) LICENSE-MIXING README.netware INSTALL.devcpp \
MAIL-ETIQUETTE HTTP-COOKIES LIBCURL-STRUCTS SECURITY RELEASE-PROCEDURE \ MAIL-ETIQUETTE HTTP-COOKIES SECURITY RELEASE-PROCEDURE SSL-PROBLEMS \
SSL-PROBLEMS HTTP2.md ROADMAP.md CODE_OF_CONDUCT.md
MAN2HTML= roffit < $< >$@ MAN2HTML= roffit < $< >$@

View File

@@ -1,9 +1,3 @@
_ _ ____ _
___| | | | _ \| |
/ __| | | | |_) | |
| (__| |_| | _ <| |___
\___|\___/|_| \_\_____|
curl release procedure - how to do a release curl release procedure - how to do a release
============================================ ============================================
@@ -30,6 +24,8 @@ in the source code repo
- upload the 8 resulting files to the primary download directory - upload the 8 resulting files to the primary download directory
- upload the 4 tarballs to github for the HTTPS download
in the curl-www repo in the curl-www repo
-------------------- --------------------
@@ -84,11 +80,10 @@ Coming dates
Based on the description above, here are some planned release dates (at the Based on the description above, here are some planned release dates (at the
time of this writing): time of this writing):
- November 5, 2014 (version 7.39.0) - October 7, 2015 (version 7.45.0)
- December 31, 2014
- February 25, 2015
- April 22, 2015
- June 17, 2015
- August 12, 2015
- October 7, 2015
- December 2, 2015 - December 2, 2015
- January 27, 2016
- March 23, 2016
- May 18, 2016
- July 13, 2016
- September 7, 2016

View File

@@ -5,43 +5,86 @@ Roadmap of things Daniel Stenberg and Steve Holme want to work on next. It is
intended to serve as a guideline for others for information, feedback and intended to serve as a guideline for others for information, feedback and
possible participation. possible participation.
New stuff - libcurl HTTP/2
------
- test suite
Base this on existing nghttp2 server to start with to make functional
tests. Later on we can adopt that code or work with nghttp2 to provide ways
to have the http2 server respond with broken responses to make sure we deal
with that nicely as well.
To decide: if we need to bundle parts of the nghttp2 stuff that probably
won't be shipped by many distros.
- provide option for HTTP/2 "prior knowledge" over clear text
As it would avoid the roundtrip-heavy Upgrade: procedures when you _know_
it speaks HTTP/2.
- provide option to allow curl to default to HTTP/2 only when using HTTPS
We could switch on HTTP/2 by-default for HTTPS quite easily and it
shouldn't hurt anyone, while HTTP/2 for HTTP by default could introduce
lots of Upgrade: roundtrips that users won't like. So a separated option
alternative makes sense.
SRV records
-----------
How to find services for specific domains/hosts.
HTTPS to proxy
--------------
To avoid network traffic to/from the proxy getting snooped on.
curl_formadd()
--------------
make sure there's an easy handle passed in to `curl_formadd()`,
`curl_formget()` and `curl_formfree()` by adding replacement functions and
deprecating the old ones to allow custom mallocs and more
third-party SASL
----------------
add support for third-party SASL libraries such as Cyrus SASL - may need to
move existing native and SSPI based authentication into vsasl folder after
reworking HTTP and SASL code
SASL authentication in LDAP
---------------------------
...
Simplify the SMTP email
-----------------------
Simplify the SMTP email interface so that programmers don't have to
construct the body of an email that contains all the headers, alternative
content, images and attachments - maintain raw interface so that
programmers that want to do this can
email capabilities
------------------
Allow the email protocols to return the capabilities before
authenticating. This will allow an application to decide on the best
authentication mechanism
Win32 pthreads
--------------
Allow Windows threading model to be replaced by Win32 pthreads port
dynamic buffer size
------------------- -------------------
1. http2 test suite Implement a dynamic buffer size to allow SFTP to use much larger buffers and
possibly allow the size to be customizable by applications. Use less memory
2. http2 multiplexing/pipelining when handles are not in use?
3. SPDY
4. SRV records
5. HTTPS to proxy
6. make sure there's an easy handle passed in to `curl_formadd()`,
`curl_formget()` and `curl_formfree()` by adding replacement functions and
deprecating the old ones to allow custom mallocs and more
7. add support for third-party SASL libraries such as Cyrus SASL - may need to
move existing native and SSPI based authentication into vsasl folder after
reworking HTTP and SASL code
8. SASL authentication in LDAP
9. Simplify the SMTP email interface so that programmers don't have to
construct the body of an email that contains all the headers, alternative
content, images and attachments - maintain raw interface so that
programmers that want to do this can
10. Allow the email protocols to return the capabilities before
authenticating. This will allow an application to decide on the best
authentication mechanism
11. Allow Windows threading model to be replaced by Win32 pthreads port
12. Implement a dynamic buffer size to allow SFTP to use much larger buffers
and possibly allow the size to be customizable by applications. Use less
memory when handles are not in use?
New stuff - curl New stuff - curl
---------------- ----------------
@@ -60,13 +103,12 @@ Improve
2. curl -h output (considered overwhelming to users) 2. curl -h output (considered overwhelming to users)
3. we have > 160 command line options, is there a way to redo things to 3. we have > 170 command line options, is there a way to redo things to
simplify or improve the situation as we are likely to keep adding simplify or improve the situation as we are likely to keep adding
features/options in the future too features/options in the future too
4. docs (considered "bad" by users but how do we make it better?) 4. docs (considered "bad" by users but how do we make it better?)
- split up `curl_easy_setopt.3`
- split up curl.1 - split up curl.1
5. authentication framework (consider merging HTTP and SASL authentication to 5. authentication framework (consider merging HTTP and SASL authentication to
@@ -79,7 +121,5 @@ Improve
Remove Remove
------ ------
1. cmake support (nobody maintains it) 1. makefile.vc files as there is no point in maintaining two sets of Windows
2. makefile.vc files as there is no point in maintaining two sets of Windows
makefiles. Note: These are currently being used by the Windows autobuilds makefiles. Note: These are currently being used by the Windows autobuilds

View File

@@ -26,7 +26,7 @@ CA bundle missing intermediate certificates
problems if your CA cert does not have the certificates for the problems if your CA cert does not have the certificates for the
intermediates in the whole trust chain. intermediates in the whole trust chain.
SSL version Protocol version
Some broken servers fail to support the protocol negotiation properly that Some broken servers fail to support the protocol negotiation properly that
SSL servers are supposed to handle. This may cause the connection to fail SSL servers are supposed to handle. This may cause the connection to fail
@@ -36,7 +36,9 @@ SSL version
An additional complication can be that modern SSL libraries sometimes are An additional complication can be that modern SSL libraries sometimes are
built with support for older SSL and TLS versions disabled! built with support for older SSL and TLS versions disabled!
SSL ciphers All versions of SSL are considered insecure and should be avoided. Use TLS.
Ciphers
Clients give servers a list of ciphers to select from. If the list doesn't Clients give servers a list of ciphers to select from. If the list doesn't
include any ciphers the server wants/can use, the connection handshake include any ciphers the server wants/can use, the connection handshake
@@ -51,9 +53,13 @@ SSL ciphers
Note that these weak ciphers are identified as flawed. For example, this Note that these weak ciphers are identified as flawed. For example, this
includes symmetric ciphers with less than 128 bit keys and RC4. includes symmetric ciphers with less than 128 bit keys and RC4.
WinSSL in Windows XP is not able to connect to servers that no longer
support the legacy handshakes and algorithms used by those versions, so we
advice against building curl to use WinSSL on really old Windows versions.
References: References:
http://tools.ietf.org/html/draft-popov-tls-prohibiting-rc4-01 https://tools.ietf.org/html/draft-popov-tls-prohibiting-rc4-01
Allow BEAST Allow BEAST
@@ -65,3 +71,17 @@ Allow BEAST
introduced. Exactly as it sounds, it re-introduces the BEAST vulnerability introduced. Exactly as it sounds, it re-introduces the BEAST vulnerability
but on the other hand it allows curl to connect to that kind of strange but on the other hand it allows curl to connect to that kind of strange
servers. servers.
Disabling certificate revocation checks
Some SSL backends may do certificate revocation checks (CRL, OCSP, etc)
depending on the OS or build configuration. The --ssl-no-revoke option was
introduced in 7.44.0 to disable revocation checking but currently is only
supported for WinSSL (the native Windows SSL library), with an exception in
the case of Windows' Untrusted Publishers blacklist which it seems can't be
bypassed. This option may have broader support to accommodate other SSL
backends in the future.
References:
http://curl.haxx.se/docs/ssl-compared.html

View File

@@ -36,10 +36,14 @@ Alex Suykov
Alex Vinnik Alex Vinnik
Alex aka WindEagle Alex aka WindEagle
Alexander Beedie Alexander Beedie
Alexander Dyagilev
Alexander Elgert
Alexander Klauer Alexander Klauer
Alexander Kourakos Alexander Kourakos
Alexander Krasnostavsky Alexander Krasnostavsky
Alexander Lazic Alexander Lazic
Alexander Pepper
Alexander Peslyak
Alexander Zhuravlev Alexander Zhuravlev
Alexey Borzov Alexey Borzov
Alexey Pesternikov Alexey Pesternikov
@@ -52,6 +56,7 @@ Alona Rossen
Amol Pattekar Amol Pattekar
Amr Shahin Amr Shahin
Anatoli Tubman Anatoli Tubman
Anders Bakken
Anders Gustafsson Anders Gustafsson
Anders Havn Anders Havn
Andi Jahja Andi Jahja
@@ -79,6 +84,7 @@ Andrew Kurushin
Andrew Moise Andrew Moise
Andrew Wansink Andrew Wansink
Andrew de los Reyes Andrew de los Reyes
Andrey Labunets
Andrii Moiseiev Andrii Moiseiev
Andrés García Andrés García
Andy Cedilnik Andy Cedilnik
@@ -86,6 +92,7 @@ Andy Serpa
Andy Tsouladze Andy Tsouladze
Angus Mackay Angus Mackay
Anthon Pang Anthon Pang
Anthony Avina
Anthony Bryan Anthony Bryan
Anthony G. Basile Anthony G. Basile
Antoine Calando Antoine Calando
@@ -100,6 +107,7 @@ Arnaud Ebalard
Arthur Murray Arthur Murray
Arve Knudsen Arve Knudsen
Arvid Norberg Arvid Norberg
Ashish Shukla
Ask Bjørn Hansen Ask Bjørn Hansen
Askar Safin Askar Safin
Ates Goral Ates Goral
@@ -112,6 +120,7 @@ Balint Szilakszi
Barry Abrahamson Barry Abrahamson
Bart Whiteley Bart Whiteley
Bas Mevissen Bas Mevissen
Ben Boeckel
Ben Darnell Ben Darnell
Ben Greear Ben Greear
Ben Madsen Ben Madsen
@@ -122,11 +131,14 @@ Benbuck Nason
Benjamin Gerard Benjamin Gerard
Benjamin Gilbert Benjamin Gilbert
Benjamin Johnson Benjamin Johnson
Benjamin Kircher
Benoit Neil Benoit Neil
Benoit Sigoure Benoit Sigoure
Bernard Leak Bernard Leak
Bernhard Reutner-Fischer Bernhard Reutner-Fischer
Bert Huijben
Bertrand Demiddelaer Bertrand Demiddelaer
Bertrand Simonnet
Bill Doyle Bill Doyle
Bill Egert Bill Egert
Bill Hoffman Bill Hoffman
@@ -142,6 +154,7 @@ Bob Richmond
Bob Schader Bob Schader
Bogdan Nicula Bogdan Nicula
Brad Burdick Brad Burdick
Brad Harder
Brad Hards Brad Hards
Brad King Brad King
Brad Spencer Brad Spencer
@@ -151,8 +164,10 @@ Brandon Wang
Brendan Jurd Brendan Jurd
Brent Beardsley Brent Beardsley
Brian Akins Brian Akins
Brian Chrisman
Brian Dessent Brian Dessent
Brian J. Murrell Brian J. Murrell
Brian Prodoehl
Brian R Duffy Brian R Duffy
Brian Ulm Brian Ulm
Brock Noland Brock Noland
@@ -172,9 +187,11 @@ Catalin Patulea
Chad Monroe Chad Monroe
Chandrakant Bagul Chandrakant Bagul
Charles Kerr Charles Kerr
Charles Romestant
Chen Prog Chen Prog
Chih-Chung Chang Chih-Chung Chang
Chris "Bob Bob" Chris "Bob Bob"
Chris Araman
Chris Combes Chris Combes
Chris Conlon Chris Conlon
Chris Deidun Chris Deidun
@@ -219,8 +236,10 @@ Cris Bailiff
Cristian Rodríguez Cristian Rodríguez
Curt Bogmine Curt Bogmine
Cyrill Osterwalder Cyrill Osterwalder
Cédric Connes
Cédric Deltheil Cédric Deltheil
D. Flinkmann D. Flinkmann
Da-Yoon Chung
Dag Ekengren Dag Ekengren
Dagobert Michelsen Dagobert Michelsen
Damian Dixon Damian Dixon
@@ -236,8 +255,13 @@ Dan Zitter
Daniel Black Daniel Black
Daniel Cater Daniel Cater
Daniel Egger Daniel Egger
Daniel Hwang
Daniel Johnson Daniel Johnson
Daniel Kahn Gillmor
Daniel Lee Hwang
Daniel Melani
Daniel Mentz Daniel Mentz
Daniel Seither
Daniel Steinberg Daniel Steinberg
Daniel Stenberg Daniel Stenberg
Daniel Theron Daniel Theron
@@ -280,6 +304,7 @@ David Woodhouse
David Wright David Wright
David Yan David Yan
Dengminwen Dengminwen
Denis Feklushkin
Dennis Clarke Dennis Clarke
Derek Higgins Derek Higgins
Detlef Schmier Detlef Schmier
@@ -298,6 +323,7 @@ Dirk Manske
Dmitri Shubin Dmitri Shubin
Dmitriy Sergeyev Dmitriy Sergeyev
Dmitry Bartsevich Dmitry Bartsevich
Dmitry Eremin-Solenikov
Dmitry Falko Dmitry Falko
Dmitry Kurochkin Dmitry Kurochkin
Dmitry Popov Dmitry Popov
@@ -313,6 +339,7 @@ Douglas Kilpatrick
Douglas R. Horner Douglas R. Horner
Douglas Steinwand Douglas Steinwand
Dov Murik Dov Murik
Drake Arconis
Duane Cathey Duane Cathey
Duncan Mac-Vicar Prett Duncan Mac-Vicar Prett
Dustin Boswell Dustin Boswell
@@ -327,10 +354,12 @@ Edward Rudd
Edward Sheldrake Edward Sheldrake
Eelco Dolstra Eelco Dolstra
Eetu Ojanen Eetu Ojanen
Egon Eckert
Eldar Zaitov Eldar Zaitov
Ellis Pritchard Ellis Pritchard
Elmira A Semenova Elmira A Semenova
Emanuele Bovisio Emanuele Bovisio
Emil Lerner
Emil Romanus Emil Romanus
Emiliano Ida Emiliano Ida
Enrico Scholz Enrico Scholz
@@ -343,12 +372,14 @@ Eric Lubin
Eric Melville Eric Melville
Eric Mertens Eric Mertens
Eric Rautman Eric Rautman
Eric Ridge
Eric S. Raymond Eric S. Raymond
Eric Thelin Eric Thelin
Eric Vergnaud Eric Vergnaud
Eric Wong Eric Wong
Eric Young Eric Young
Erick Nuwendam Erick Nuwendam
Erik Janssen
Erik Johansson Erik Johansson
Ernest Beinrohr Ernest Beinrohr
Erwan Legrand Erwan Legrand
@@ -363,6 +394,7 @@ Fabian Hiernaux
Fabian Keil Fabian Keil
Fabrizio Ammollo Fabrizio Ammollo
Fedor Karpelevitch Fedor Karpelevitch
Feist Josselin
Felix Yan Felix Yan
Felix von Leitner Felix von Leitner
Feng Tu Feng Tu
@@ -381,6 +413,7 @@ François Charlier
Fred Machado Fred Machado
Fred New Fred New
Fred Noz Fred Noz
Fred Stluka
Frederic Lepied Frederic Lepied
Fredrik Thulin Fredrik Thulin
Gabriel Kuri Gabriel Kuri
@@ -418,6 +451,7 @@ Glenn Sheridan
Gordon Marler Gordon Marler
Gorilla Maguila Gorilla Maguila
Grant Erickson Grant Erickson
Grant Pannell
Greg Hewgill Greg Hewgill
Greg Morse Greg Morse
Greg Onufer Greg Onufer
@@ -430,12 +464,14 @@ Guido Berhoerster
Guillaume Arluison Guillaume Arluison
Gunter Knauf Gunter Knauf
Gustaf Hui Gustaf Hui
Gustavo Grieco
Gwenole Beauchesne Gwenole Beauchesne
Gökhan Şengün Gökhan Şengün
Götz Babin-Ebell Götz Babin-Ebell
Hamish Mackenzie Hamish Mackenzie
Hang Kin Lau Hang Kin Lau
Hang Su Hang Su
Hanno Böck
Hanno Kranzhoff Hanno Kranzhoff
Hans Steegers Hans Steegers
Hans-Jurgen May Hans-Jurgen May
@@ -473,15 +509,18 @@ Iida Yosiaki
Ilguiz Latypov Ilguiz Latypov
Ilja van Sprundel Ilja van Sprundel
Immanuel Gregoire Immanuel Gregoire
Inca R
Ingmar Runge Ingmar Runge
Ingo Ralf Blum Ingo Ralf Blum
Ingo Wilken Ingo Wilken
Isaac Boukris
Ishan SinghLevett Ishan SinghLevett
Ivo Bellin Salarin Ivo Bellin Salarin
Jack Zhang Jack Zhang
Jacky Lam Jacky Lam
Jacob Meuser Jacob Meuser
Jacob Moshenko Jacob Moshenko
Jactry Zeng
Jad Chamcham Jad Chamcham
Jakub Zakrzewski Jakub Zakrzewski
James Bursa James Bursa
@@ -516,6 +555,7 @@ Jaz Fresh
Jean Jacques Drouin Jean Jacques Drouin
Jean-Claude Chauve Jean-Claude Chauve
Jean-Francois Bertrand Jean-Francois Bertrand
Jean-Francois Durand
Jean-Louis Lemaire Jean-Louis Lemaire
Jean-Marc Ranger Jean-Marc Ranger
Jean-Noël Rouvignac Jean-Noël Rouvignac
@@ -528,10 +568,12 @@ Jeff Lawson
Jeff Phillips Jeff Phillips
Jeff Pohlmeyer Jeff Pohlmeyer
Jeff Weber Jeff Weber
Jens Rantil
Jeremy Friesner Jeremy Friesner
Jeremy Huddleston Jeremy Huddleston
Jeremy Lin Jeremy Lin
Jeroen Koekkoek Jeroen Koekkoek
Jeroen Ooms
Jerome Muffat-Meridol Jerome Muffat-Meridol
Jerome Robert Jerome Robert
Jerome Vouillon Jerome Vouillon
@@ -545,6 +587,7 @@ Jim Drash
Jim Freeman Jim Freeman
Jim Hollinger Jim Hollinger
Jim Meyering Jim Meyering
Jiri Dvorak
Jiri Hruska Jiri Hruska
Jiri Jaburek Jiri Jaburek
Jiri Malak Jiri Malak
@@ -553,8 +596,10 @@ Joe Halpin
Joe Malicki Joe Malicki
Joe Mason Joe Mason
Joel Chen Joel Chen
Joel Depooter
Jofell Gallardo Jofell Gallardo
Johan Anderson Johan Anderson
Johan Lantz
Johan Nilsson Johan Nilsson
Johan van Selst Johan van Selst
Johannes Bauer Johannes Bauer
@@ -572,6 +617,7 @@ John Kelly
John Lask John Lask
John Lightsey John Lightsey
John Marino John Marino
John Marshall
John McGowan John McGowan
John P. McCaskey John P. McCaskey
John Suprock John Suprock
@@ -581,6 +627,8 @@ Johnny Luong
Jon Grubbs Jon Grubbs
Jon Nelson Jon Nelson
Jon Sargeant Jon Sargeant
Jon Seymour
Jon Spencer
Jon Torrey Jon Torrey
Jon Travis Jon Travis
Jon Turner Jon Turner
@@ -589,6 +637,7 @@ Jonas Schnelli
Jonatan Lander Jonatan Lander
Jonatan Vela Jonatan Vela
Jonathan Cardoso Machado Jonathan Cardoso Machado
Jonathan Cardoso Machado Machado
Jonathan Hseu Jonathan Hseu
Jonathan Nieder Jonathan Nieder
Jongki Suwandi Jongki Suwandi
@@ -605,8 +654,10 @@ Judson Bishop
Juergen Wilke Juergen Wilke
Jukka Pihl Jukka Pihl
Julian Noble Julian Noble
Julian Ospald
Julian Taylor Julian Taylor
Julien Chaffraix Julien Chaffraix
Julien Nabet
Julien Royer Julien Royer
Jun-ichiro itojun Hagino Jun-ichiro itojun Hagino
Jurij Smakov Jurij Smakov
@@ -652,6 +703,7 @@ Krishnendu Majumdar
Krister Johansen Krister Johansen
Kristian Gunstone Kristian Gunstone
Kristian Köhntopp Kristian Köhntopp
Kyle J. McKay
Kyle L. Huff Kyle L. Huff
Kyle Sallee Kyle Sallee
Lachlan O'Dea Lachlan O'Dea
@@ -670,6 +722,7 @@ Laurent Rabret
Legoff Vincent Legoff Vincent
Lehel Bernadt Lehel Bernadt
Leif W Leif W
Leith Bade
Len Krause Len Krause
Lenaic Lefever Lenaic Lefever
Lenny Rachitsky Lenny Rachitsky
@@ -681,7 +734,9 @@ Linas Vepstas
Lindley French Lindley French
Ling Thio Ling Thio
Linus Nielsen Feltzing Linus Nielsen Feltzing
Lior Kaplan
Lisa Xu Lisa Xu
Liviu Chircu
Liza Alenchery Liza Alenchery
Lluís Batlle i Rossell Lluís Batlle i Rossell
Loic Dachary Loic Dachary
@@ -702,6 +757,7 @@ Maciej Karpiuk
Maciej Puzio Maciej Puzio
Maciej W. Rozycki Maciej W. Rozycki
Maks Naumov Maks Naumov
Maksim Stsepanenka
Mamoru Tasaka Mamoru Tasaka
Mandy Wu Mandy Wu
Manfred Schwarb Manfred Schwarb
@@ -709,8 +765,10 @@ Manuel Massing
Marc Boucher Marc Boucher
Marc Deslauriers Marc Deslauriers
Marc Doughty Marc Doughty
Marc Hesse
Marc Hoersken Marc Hoersken
Marc Kleine-Budde Marc Kleine-Budde
Marc Renault
Marcel Raad Marcel Raad
Marcel Roelofs Marcel Roelofs
Marcelo Juchem Marcelo Juchem
@@ -733,6 +791,7 @@ Mark Salisbury
Mark Snelling Mark Snelling
Mark Tully Mark Tully
Markus Duft Markus Duft
Markus Elfring
Markus Koetter Markus Koetter
Markus Moeller Markus Moeller
Markus Oberhumer Markus Oberhumer
@@ -761,6 +820,7 @@ Matt Wixson
Matteo Rocco Matteo Rocco
Matthew Blain Matthew Blain
Matthew Clarke Matthew Clarke
Matthew Hall
Matthias Bolte Matthias Bolte
Maurice Barnum Maurice Barnum
Mauro Iorio Mauro Iorio
@@ -781,16 +841,21 @@ Michael Day
Michael Goffioul Michael Goffioul
Michael Jahn Michael Jahn
Michael Jerris Michael Jerris
Michael Kalinin
Michael Kaufmann
Michael Mealling Michael Mealling
Michael Mueller Michael Mueller
Michael Osipov Michael Osipov
Michael Smith Michael Smith
Michael Stapelberg
Michael Stillwell Michael Stillwell
Michael Wallner Michael Wallner
Michal Bonino Michal Bonino
Michal Marek Michal Marek
Michał Fita
Michał Górny Michał Górny
Michał Kowalczyk Michał Kowalczyk
Michel Promonet
Michele Bini Michele Bini
Miguel Angel Miguel Angel
Miguel Diaz Miguel Diaz
@@ -814,12 +879,14 @@ Mitz Wark
Mohamed Lrhazi Mohamed Lrhazi
Mohammad AlSaleh Mohammad AlSaleh
Mohun Biswas Mohun Biswas
Mostyn Bramley-Moore
Myk Taylor Myk Taylor
Nach M. S. Nach M. S.
Nagai H Nagai H
Nathan Coulter Nathan Coulter
Nathan O'Sullivan Nathan O'Sullivan
Nathanael Nerode Nathanael Nerode
Nathaniel Waisbrot
Naveen Chandran Naveen Chandran
Naveen Noel Naveen Noel
Neil Bowers Neil Bowers
@@ -843,6 +910,7 @@ Nikos Mavrogiannopoulos
Ning Dong Ning Dong
Nir Soffer Nir Soffer
Nis Jorgensen Nis Jorgensen
Nobuhiro Ban
Nodak Sodak Nodak Sodak
Norbert Frese Norbert Frese
Norbert Novotny Norbert Novotny
@@ -854,7 +922,10 @@ Oliver Gondža
Oliver Kuckertz Oliver Kuckertz
Oliver Schindler Oliver Schindler
Olivier Berger Olivier Berger
Orange Tsai
Oren Souroujon
Oren Tirosh Oren Tirosh
Orgad Shaneh
Ori Avtalion Ori Avtalion
Oscar Koeroo Oscar Koeroo
Oscar Norlander Oscar Norlander
@@ -870,6 +941,7 @@ Patricia Muscalu
Patrick Bihan-Faou Patrick Bihan-Faou
Patrick McManus Patrick McManus
Patrick Monnerat Patrick Monnerat
Patrick Rapin
Patrick Scott Patrick Scott
Patrick Smith Patrick Smith
Patrick Watson Patrick Watson
@@ -882,6 +954,7 @@ Paul Marks
Paul Marquis Paul Marquis
Paul Moore Paul Moore
Paul Nolan Paul Nolan
Paul Oliver
Paul Querna Paul Querna
Paul Saab Paul Saab
Pavel Cenek Pavel Cenek
@@ -898,6 +971,7 @@ Peter Heuchert
Peter Hjalmarsson Peter Hjalmarsson
Peter Korsgaard Peter Korsgaard
Peter Lamberg Peter Lamberg
Peter Laser
Peter O'Gorman Peter O'Gorman
Peter Pentchev Peter Pentchev
Peter Silva Peter Silva
@@ -938,11 +1012,13 @@ Quinn Slack
Radu Simionescu Radu Simionescu
Rafa Muyo Rafa Muyo
Rafael Sagula Rafael Sagula
Rafayel Mkrtchyan
Rafaël Carré Rafaël Carré
Rainer Canavan Rainer Canavan
Rainer Jung Rainer Jung
Rainer Koenig Rainer Koenig
Rajesh Naganathan Rajesh Naganathan
Rajkumar Mandal
Ralf S. Engelschall Ralf S. Engelschall
Ralph Beckmann Ralph Beckmann
Ralph Mitchell Ralph Mitchell
@@ -952,6 +1028,7 @@ Ravi Pratap
Ray Dassen Ray Dassen
Ray Pekowski Ray Pekowski
Ray Satiro Ray Satiro
Razvan Cojocaru
Reinout van Schouwen Reinout van Schouwen
Remi Gacogne Remi Gacogne
Renato Botelho Renato Botelho
@@ -963,6 +1040,7 @@ Rene Rebe
Reuven Wachtfogel Reuven Wachtfogel
Reza Arbab Reza Arbab
Ricardo Cadime Ricardo Cadime
Rich Burridge
Rich Gray Rich Gray
Rich Rauenzahn Rich Rauenzahn
Richard Archer Richard Archer
@@ -975,6 +1053,7 @@ Richard Michael
Richard Moore Richard Moore
Richard Prescott Richard Prescott
Richard Silverman Richard Silverman
Richard van den Berg
Rick Jones Rick Jones
Rick Richardson Rick Richardson
Rob Crittenden Rob Crittenden
@@ -998,6 +1077,7 @@ Robson Braga Araujo
Rodney Simmons Rodney Simmons
Rodric Glaser Rodric Glaser
Rodrigo Silva Rodrigo Silva
Roger Leigh
Roland Blom Roland Blom
Roland Krikava Roland Krikava
Roland Zimmermann Roland Zimmermann
@@ -1021,6 +1101,9 @@ S. Moonesamy
Salvador Dávila Salvador Dávila
Salvatore Sorrentino Salvatore Sorrentino
Sam Deane Sam Deane
Sam Hurst
Sam Roth
Sam Schanken
Sampo Kellomaki Sampo Kellomaki
Samuel Díaz García Samuel Díaz García
Samuel Listopad Samuel Listopad
@@ -1038,6 +1121,7 @@ Scott Barrett
Scott Cantor Scott Cantor
Scott Davis Scott Davis
Scott McCreary Scott McCreary
Sean Boudreau
Sebastian Rasmussen Sebastian Rasmussen
Senthil Raja Velu Senthil Raja Velu
Sergei Nikulov Sergei Nikulov
@@ -1065,6 +1149,8 @@ Spork Schivago
Stadler Stephan Stadler Stephan
Stan van de Burgt Stan van de Burgt
Stanislav Ivochkin Stanislav Ivochkin
Stefan Bühler
Stefan Eissing
Stefan Esser Stefan Esser
Stefan Krause Stefan Krause
Stefan Neis Stefan Neis
@@ -1079,6 +1165,7 @@ Stephen More
Sterling Hughes Sterling Hughes
Steve Green Steve Green
Steve H Truong Steve H Truong
Steve Havelka
Steve Holme Steve Holme
Steve Lhomme Steve Lhomme
Steve Little Steve Little
@@ -1095,21 +1182,27 @@ Sune Ahlgren
Sven Anders Sven Anders
Sven Neuhaus Sven Neuhaus
Sven Wegener Sven Wegener
Svyatoslav Mishyn
Symeon Paraschoudis Symeon Paraschoudis
Sébastien Willemijns Sébastien Willemijns
T. Bharath T. Bharath
T. Yamada T. Yamada
TJ Saunders
Tae Hyoung Ahn
Taneli Vahakangas Taneli Vahakangas
Tanguy Fautre Tanguy Fautre
Tatsuhiro Tsujikawa Tatsuhiro Tsujikawa
Temprimus Temprimus
Terri Oda
Thomas Braun Thomas Braun
Thomas J. Moore Thomas J. Moore
Thomas Klausner Thomas Klausner
Thomas L. Shinnick Thomas L. Shinnick
Thomas Lopatic Thomas Lopatic
Thomas Ruecker
Thomas Schwinge Thomas Schwinge
Thomas Tonino Thomas Tonino
Thorsten Schöning
Tiit Pikma Tiit Pikma
Till Maas Till Maas
Tim Ansell Tim Ansell
@@ -1122,15 +1215,16 @@ Tim Heckman
Tim Newsome Tim Newsome
Tim Ruehsen Tim Ruehsen
Tim Sneddon Tim Sneddon
Tim Stack
Tim Starling Tim Starling
Timo Sirainen Timo Sirainen
Tinus van den Berg Tinus van den Berg
Tobias Markus Tobias Markus
Tobias Rundström Tobias Rundström
Tobias Stoeckmann
Toby Peterson Toby Peterson
Todd A Ouska Todd A Ouska
Todd Kulesza Todd Kulesza
Todd Ouska
Todd Vierling Todd Vierling
Tom Benoist Tom Benoist
Tom Donovan Tom Donovan
@@ -1147,6 +1241,8 @@ Tomas Hoger
Tomas Mlcoch Tomas Mlcoch
Tomas Pospisek Tomas Pospisek
Tomas Szepe Tomas Szepe
Tomas Tomecek
Tomasz Kojm
Tomasz Lacki Tomasz Lacki
Tommie Gannert Tommie Gannert
Tommy Tam Tommy Tam
@@ -1173,6 +1269,7 @@ Victor Snezhko
Vijay Panghal Vijay Panghal
Vikram Saxena Vikram Saxena
Viktor Szakáts Viktor Szakáts
Ville Skyttä
Vilmos Nebehaj Vilmos Nebehaj
Vincent Bronner Vincent Bronner
Vincent Le Normand Vincent Le Normand
@@ -1185,10 +1282,13 @@ Vladimir Grishchenko
Vladimir Lazarenko Vladimir Lazarenko
Vojtech Janota Vojtech Janota
Vojtech Minarik Vojtech Minarik
Vojtěch Král
Vsevolod Novikov Vsevolod Novikov
W. Mark Kubacki
Waldek Kozba Waldek Kozba
Walter J. Mack Walter J. Mack
Ward Willats Ward Willats
Warren Menzer
Wayne Haigh Wayne Haigh
Werner Koch Werner Koch
Wesley Laxton Wesley Laxton
@@ -1203,6 +1303,7 @@ Wouter Van Rooy
Wu Yongzheng Wu Yongzheng
Xavier Bouchoux Xavier Bouchoux
Yaakov Selkowitz Yaakov Selkowitz
Yamada Yasuharu
Yang Tse Yang Tse
Yarram Sunil Yarram Sunil
Yasuharu Yamada Yasuharu Yamada
@@ -1212,6 +1313,7 @@ Yi Huang
Yingwei Liu Yingwei Liu
Yousuke Kimoto Yousuke Kimoto
Yukihiro Kawada Yukihiro Kawada
Yun SangHo
Yuriy Sosov Yuriy Sosov
Yves Arrouye Yves Arrouye
Yves Lejeune Yves Lejeune
@@ -1222,4 +1324,5 @@ Zvi Har'El
nk nk
swalkaus at yahoo.com swalkaus at yahoo.com
tommink[at]post.pl tommink[at]post.pl
Štefan Kremeň
Никита Дорохин Никита Дорохин

View File

@@ -33,7 +33,8 @@ s/Nick Zitzmann (originally)/Nick Zitzmann/
s/product-security at Apple// s/product-security at Apple//
s/IT DOES NOT WORK// s/IT DOES NOT WORK//
s/Albert Chin/Albert Chin-A-Young/ s/Albert Chin/Albert Chin-A-Young/
s/Paras S/Paras Sethia/ s/Paras S\z/Paras Sethia/
s/Paras Sethiaethia/Paras Sethia/
s/Дмитрий Фалько/Dmitry Falko/ s/Дмитрий Фалько/Dmitry Falko/
s/byte_bucket in the #curl IRC channel// s/byte_bucket in the #curl IRC channel//
s/Michal Górny and Anthony G. Basile// s/Michal Górny and Anthony G. Basile//
@@ -46,3 +47,7 @@ s/Frank Van Uffelen and Fabian Hiernaux//
s/Rodrigo Silva (MestreLion)/Rodrigo Silva/ s/Rodrigo Silva (MestreLion)/Rodrigo Silva/
s/tetetest tetetest// s/tetetest tetetest//
s/Jiří Hruška/Jiri Hruska/ s/Jiří Hruška/Jiri Hruska/
s/Viktor Szakats/Viktor Szakáts/
s/Jonathan Cardoso/Jonathan Cardoso Machado/
s/Linus Nielsen/Linus Nielsen Feltzing/
s/Todd Ouska$/Todd A Ouska/

334
docs/TODO
View File

@@ -9,6 +9,11 @@
Things to do in project cURL. Please tell us what you think, contribute and Things to do in project cURL. Please tell us what you think, contribute and
send us patches that improve things! send us patches that improve things!
Be aware that these are things that we could do, or have once been considered
things we could do. If you want to work on any of these areas, please
consider bringing it up for discussions first on the mailing list so that we
all agree it is still a good idea for the project!
All bugs documented in the KNOWN_BUGS document are subject for fixing! All bugs documented in the KNOWN_BUGS document are subject for fixing!
1. libcurl 1. libcurl
@@ -20,6 +25,8 @@
1.7 Detect when called from within callbacks 1.7 Detect when called from within callbacks
1.8 Allow SSL (HTTPS) to proxy 1.8 Allow SSL (HTTPS) to proxy
1.9 Cache negative name resolves 1.9 Cache negative name resolves
1.10 Support IDNA2008
1.11 minimize dependencies with dynamicly loaded modules
2. libcurl - multi interface 2. libcurl - multi interface
2.1 More non-blocking 2.1 More non-blocking
@@ -44,6 +51,8 @@
5.3 Rearrange request header order 5.3 Rearrange request header order
5.4 SPDY 5.4 SPDY
5.5 auth= in URLs 5.5 auth= in URLs
5.6 Refuse "downgrade" redirects
5.7 More compressions
6. TELNET 6. TELNET
6.1 ditch stdin 6.1 ditch stdin
@@ -65,61 +74,75 @@
10. LDAP 10. LDAP
10.1 SASL based authentication mechanisms 10.1 SASL based authentication mechanisms
11. New protocols 11. SMB
11.1 RSYNC 11.1 File listing support
11.2 Honor file timestamps
11.3 Use NTLMv2
12. SSL 12. New protocols
12.1 Disable specific versions 12.1 RSYNC
12.2 Provide mutex locking API
12.3 Evaluate SSL patches
12.4 Cache OpenSSL contexts
12.5 Export session ids
12.6 Provide callback for cert verification
12.7 improve configure --with-ssl
12.8 Support DANE
13. GnuTLS 13. SSL
13.1 SSL engine stuff 13.1 Disable specific versions
13.2 check connection 13.2 Provide mutex locking API
13.3 Evaluate SSL patches
13.4 Cache OpenSSL contexts
13.5 Export session ids
13.6 Provide callback for cert verification
13.7 improve configure --with-ssl
13.8 Support DANE
14. SASL 14. GnuTLS
14.1 Other authentication mechanisms 14.1 SSL engine stuff
14.2 Add QOP support to GSSAPI authentication 14.2 check connection
15. Client 15. WinSSL/SChannel
15.1 sync 15.1 Add support for client certificate authentication
15.2 glob posts 15.2 Add support for custom server certificate validation
15.3 prevent file overwriting 15.3 Add support for the --ciphers option
15.4 simultaneous parallel transfers
15.5 provide formpost headers
15.6 warning when setting an option
16. Build 16. SASL
16.1 roffit 16.1 Other authentication mechanisms
16.2 Add QOP support to GSSAPI authentication
17. Test suite 17. Client
17.1 SSL tunnel 17.1 sync
17.2 nicer lacking perl message 17.2 glob posts
17.3 more protocols supported 17.3 prevent file overwriting
17.4 more platforms supported 17.4 simultaneous parallel transfers
17.5 Add support for concurrent connections 17.5 provide formpost headers
17.6 warning when setting an option
17.7 warning when sending binary output to terminal
17.8 offer color-coded HTTP header output
17.9 Choose the name of file in braces for complex URLs
17.10 improve how curl works in a windows console window
18. Next SONAME bump 18. Build
18.1 http-style HEAD output for FTP 18.1 roffit
18.2 combine error codes
18.3 extend CURLOPT_SOCKOPTFUNCTION prototype
19. Next major release 19. Test suite
19.1 cleanup return codes 19.1 SSL tunnel
19.2 remove obsolete defines 19.2 nicer lacking perl message
19.3 size_t 19.3 more protocols supported
19.4 remove several functions 19.4 more platforms supported
19.5 remove CURLOPT_FAILONERROR 19.5 Add support for concurrent connections
19.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
19.7 remove progress meter from libcurl 20. Next SONAME bump
19.8 remove 'curl_httppost' from public 20.1 http-style HEAD output for FTP
19.9 have form functions use CURL handle argument 20.2 combine error codes
19.10 Add CURLOPT_MAIL_CLIENT option 20.3 extend CURLOPT_SOCKOPTFUNCTION prototype
21. Next major release
21.1 cleanup return codes
21.2 remove obsolete defines
21.3 size_t
21.4 remove several functions
21.5 remove CURLOPT_FAILONERROR
21.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
21.7 remove progress meter from libcurl
21.8 remove 'curl_httppost' from public
21.9 have form functions use CURL handle argument
21.10 Add CURLOPT_MAIL_CLIENT option
============================================================================== ==============================================================================
@@ -189,7 +212,7 @@
To prevent local users from snooping on your traffic to the proxy. Supported To prevent local users from snooping on your traffic to the proxy. Supported
by Chrome already: by Chrome already:
http://www.chromium.org/developers/design-documents/secure-web-proxy https://www.chromium.org/developers/design-documents/secure-web-proxy
...and by Firefox soon: ...and by Firefox soon:
https://bugzilla.mozilla.org/show_bug.cgi?id=378637 https://bugzilla.mozilla.org/show_bug.cgi?id=378637
@@ -199,6 +222,19 @@
A name resolve that has failed is likely to fail when made again within a A name resolve that has failed is likely to fail when made again within a
short period of time. Currently we only cache positive responses. short period of time. Currently we only cache positive responses.
1.10 Support IDNA2008
International Domain Names are supported in libcurl since years back, powered
by libidn. libidn implements IDNA2003 which has been superseded by IDNA2008.
libidn2 is an existing library offering support for IDNA2008.
1.11 minimize dependencies with dynamicly loaded modules
We can create a system with loadable modules/plug-ins, where these modules
would be the ones that link to 3rd party libs. That would allow us to avoid
having to load ALL dependencies since only the necessary ones for this
app/invoke/used protocols would be necessary to load. See
https://github.com/bagder/curl/issues/349
2. libcurl - multi interface 2. libcurl - multi interface
@@ -246,7 +282,7 @@
HOST is a command for a client to tell which host name to use, to offer FTP HOST is a command for a client to tell which host name to use, to offer FTP
servers named-based virtual hosting: servers named-based virtual hosting:
http://tools.ietf.org/html/rfc7151 https://tools.ietf.org/html/rfc7151
4.2 Alter passive/active on failure and retry 4.2 Alter passive/active on failure and retry
@@ -330,6 +366,22 @@ This is not detailed in any FTP specification.
Additionally this should be implemented for proxy base URLs as well. Additionally this should be implemented for proxy base URLs as well.
5.6 Refuse "downgrade" redirects
See https://github.com/bagder/curl/issues/226
Consider a way to tell curl to refuse to "downgrade" protocol with a redirect
and/or possibly a bit that refuses redirect to change protocol completely.
5.7 More compressions
Compression algorithms that perform better than gzip are being considered for
use and inclusion in existing browsers. For example 'brotli'. If servers
follow along it is a good reason for us to also allow users to take advantage
of this. The algorithm: https://github.com/google/brotli The Firefox bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=366559
6. TELNET 6. TELNET
6.1 ditch stdin 6.1 ditch stdin
@@ -393,32 +445,47 @@ to provide the data to send.
be possible to use ldap_bind_s() instead specifying the security context be possible to use ldap_bind_s() instead specifying the security context
information ourselves. information ourselves.
11. New protocols 11. SMB
11.1 RSYNC 11.1 File listing support
Add support for listing the contents of a SMB share. The output should probably
be the same as/similar to FTP.
11.2 Honor file timestamps
The timestamp of the transferred file should reflect that of the original file.
11.3 Use NTLMv2
Currently the SMB authentication uses NTLMv1.
12. New protocols
12.1 RSYNC
There's no RFC for the protocol or an URI/URL format. An implementation There's no RFC for the protocol or an URI/URL format. An implementation
should most probably use an existing rsync library, such as librsync. should most probably use an existing rsync library, such as librsync.
12. SSL 13. SSL
12.1 Disable specific versions 13.1 Disable specific versions
Provide an option that allows for disabling specific SSL versions, such as Provide an option that allows for disabling specific SSL versions, such as
SSLv2 http://curl.haxx.se/bug/feature.cgi?id=1767276 SSLv2 http://curl.haxx.se/bug/feature.cgi?id=1767276
12.2 Provide mutex locking API 13.2 Provide mutex locking API
Provide a libcurl API for setting mutex callbacks in the underlying SSL Provide a libcurl API for setting mutex callbacks in the underlying SSL
library, so that the same application code can use mutex-locking library, so that the same application code can use mutex-locking
independently of OpenSSL or GnutTLS being used. independently of OpenSSL or GnutTLS being used.
12.3 Evaluate SSL patches 13.3 Evaluate SSL patches
Evaluate/apply Gertjan van Wingerde's SSL patches: Evaluate/apply Gertjan van Wingerde's SSL patches:
http://curl.haxx.se/mail/lib-2004-03/0087.html http://curl.haxx.se/mail/lib-2004-03/0087.html
12.4 Cache OpenSSL contexts 13.4 Cache OpenSSL contexts
"Look at SSL cafile - quick traces look to me like these are done on every "Look at SSL cafile - quick traces look to me like these are done on every
request as well, when they should only be necessary once per SSL context (or request as well, when they should only be necessary once per SSL context (or
@@ -428,7 +495,7 @@ to provide the data to send.
style connections are re-used. It will make us use slightly more memory but style connections are re-used. It will make us use slightly more memory but
it will libcurl do less creations and deletions of SSL contexts. it will libcurl do less creations and deletions of SSL contexts.
12.5 Export session ids 13.5 Export session ids
Add an interface to libcurl that enables "session IDs" to get Add an interface to libcurl that enables "session IDs" to get
exported/imported. Cris Bailiff said: "OpenSSL has functions which can exported/imported. Cris Bailiff said: "OpenSSL has functions which can
@@ -436,22 +503,22 @@ to provide the data to send.
the state from such a buffer at a later date - this is used by mod_ssl for the state from such a buffer at a later date - this is used by mod_ssl for
apache to implement and SSL session ID cache". apache to implement and SSL session ID cache".
12.6 Provide callback for cert verification 13.6 Provide callback for cert verification
OpenSSL supports a callback for customised verification of the peer OpenSSL supports a callback for customised verification of the peer
certificate, but this doesn't seem to be exposed in the libcurl APIs. Could certificate, but this doesn't seem to be exposed in the libcurl APIs. Could
it be? There's so much that could be done if it were! it be? There's so much that could be done if it were!
12.7 improve configure --with-ssl 13.7 improve configure --with-ssl
make the configure --with-ssl option first check for OpenSSL, then GnuTLS, make the configure --with-ssl option first check for OpenSSL, then GnuTLS,
then NSS... then NSS...
12.8 Support DANE 13.8 Support DANE
DNS-Based Authentication of Named Entities (DANE) is a way to provide SSL DNS-Based Authentication of Named Entities (DANE) is a way to provide SSL
keys and certs over DNS using DNSSEC as an alternative to the CA model. keys and certs over DNS using DNSSEC as an alternative to the CA model.
http://www.rfc-editor.org/rfc/rfc6698.txt https://www.rfc-editor.org/rfc/rfc6698.txt
An initial patch was posted by Suresh Krishnaswamy on March 7th 2013 An initial patch was posted by Suresh Krishnaswamy on March 7th 2013
(http://curl.haxx.se/mail/lib-2013-03/0075.html) but it was a too simple (http://curl.haxx.se/mail/lib-2013-03/0075.html) but it was a too simple
@@ -459,34 +526,69 @@ to provide the data to send.
http://curl.haxx.se/mail/lib-2013-03/0103.html . libunbound may be the http://curl.haxx.se/mail/lib-2013-03/0103.html . libunbound may be the
correct library to base this development on. correct library to base this development on.
13. GnuTLS 14. GnuTLS
13.1 SSL engine stuff 14.1 SSL engine stuff
Is this even possible? Is this even possible?
13.2 check connection 14.2 check connection
Add a way to check if the connection seems to be alive, to correspond to the Add a way to check if the connection seems to be alive, to correspond to the
SSL_peak() way we use with OpenSSL. SSL_peak() way we use with OpenSSL.
14. SASL 15. WinSSL/SChannel
14.1 Other authentication mechanisms 15.1 Add support for client certificate authentication
Add support for other authentication mechanisms such as EXTERNAL, OLP, WinSSL/SChannel currently makes use of the OS-level system and user
certificate and private key stores. This does not allow the application
or the user to supply a custom client certificate using curl or libcurl.
Therefore support for the existing -E/--cert and --key options should be
implemented by supplying a custom certificate to the SChannel APIs, see:
- Getting a Certificate for Schannel
https://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx
15.2 Add support for custom server certificate validation
WinSSL/SChannel currently makes use of the OS-level system and user
certificate trust store. This does not allow the application or user to
customize the server certificate validation process using curl or libcurl.
Therefore support for the existing --cacert or --capath options should be
implemented by supplying a custom certificate to the SChannel APIs, see:
- Getting a Certificate for Schannel
https://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx
15.3 Add support for the --ciphers option
The cipher suites used by WinSSL/SChannel are configured on an OS-level
instead of an application-level. This does not allow the application or
the user to customize the configured cipher suites using curl or libcurl.
Therefore support for the existing --ciphers option should be implemented
by mapping the OpenSSL/GnuTLS cipher suites to the SChannel APIs, see
- Specifying Schannel Ciphers and Cipher Strengths
https://msdn.microsoft.com/en-us/library/windows/desktop/aa380161.aspx
16. SASL
16.1 Other authentication mechanisms
Add support for other authentication mechanisms such as OLP,
GSS-SPNEGO and others. GSS-SPNEGO and others.
14.2 Add QOP support to GSSAPI authentication 16.2 Add QOP support to GSSAPI authentication
Currently the GSSAPI authentication only supports the default QOP of auth Currently the GSSAPI authentication only supports the default QOP of auth
(Authentication), whilst Kerberos V5 supports both auth-int (Authentication (Authentication), whilst Kerberos V5 supports both auth-int (Authentication
with integrity protection) and auth-conf (Authentication with integrity and with integrity protection) and auth-conf (Authentication with integrity and
privacy protection). privacy protection).
15. Client 17. Client
15.1 sync 17.1 sync
"curl --sync http://example.com/feed[1-100].rss" or "curl --sync http://example.com/feed[1-100].rss" or
"curl --sync http://example.net/{index,calendar,history}.html" "curl --sync http://example.net/{index,calendar,history}.html"
@@ -495,12 +597,12 @@ to provide the data to send.
remote file is newer than the local file. A Last-Modified HTTP date header remote file is newer than the local file. A Last-Modified HTTP date header
should also be used to set the mod date on the downloaded file. should also be used to set the mod date on the downloaded file.
15.2 glob posts 17.2 glob posts
Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'. Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'.
This is easily scripted though. This is easily scripted though.
15.3 prevent file overwriting 17.3 prevent file overwriting
Add an option that prevents cURL from overwriting existing local files. When Add an option that prevents cURL from overwriting existing local files. When
used, and there already is an existing file with the target file name used, and there already is an existing file with the target file name
@@ -508,14 +610,14 @@ to provide the data to send.
existing). So that index.html becomes first index.html.1 and then existing). So that index.html becomes first index.html.1 and then
index.html.2 etc. index.html.2 etc.
15.4 simultaneous parallel transfers 17.4 simultaneous parallel transfers
The client could be told to use maximum N simultaneous parallel transfers and The client could be told to use maximum N simultaneous parallel transfers and
then just make sure that happens. It should of course not make more than one then just make sure that happens. It should of course not make more than one
connection to the same remote host. This would require the client to use the connection to the same remote host. This would require the client to use the
multi interface. http://curl.haxx.se/bug/feature.cgi?id=1558595 multi interface. http://curl.haxx.se/bug/feature.cgi?id=1558595
15.5 provide formpost headers 17.5 provide formpost headers
Extending the capabilities of the multipart formposting. How about leaving Extending the capabilities of the multipart formposting. How about leaving
the ';type=foo' syntax as it is and adding an extra tag (headers) which the ';type=foo' syntax as it is and adding an extra tag (headers) which
@@ -529,43 +631,73 @@ to provide the data to send.
which should overwrite the program reasonable defaults (plain/text, which should overwrite the program reasonable defaults (plain/text,
8bit...) 8bit...)
15.6 warning when setting an option 17.6 warning when setting an option
Display a warning when libcurl returns an error when setting an option. Display a warning when libcurl returns an error when setting an option.
This can be useful to tell when support for a particular feature hasn't been This can be useful to tell when support for a particular feature hasn't been
compiled into the library. compiled into the library.
16. Build 17.7 warning when sending binary output to terminal
16.1 roffit Provide a way that prompts the user for confirmation before binary data is
sent to the terminal, much in the style 'less' does it.
17.8 offer color-coded HTTP header output
By offering different color output on the header name and the header
contents, they could be made more readable and thus help users working on
HTTP services.
17.9 Choose the name of file in braces for complex URLs
When using braces to download a list of URLs and you use complicated names
in the list of alternatives, it could be handy to allow curl to use other
names when saving.
Consider a way to offer that. Possibly like
{partURL1:name1,partURL2:name2,partURL3:name3} where the name following the
colon is the output name.
See https://github.com/bagder/curl/issues/221
17.10 improve how curl works in a windows console window
If you pull the scrollbar when transferring with curl in a Windows console
window, the transfer is interrupted and can get disconnected. This can
probably be improved. See https://github.com/bagder/curl/issues/322
18. Build
18.1 roffit
Consider extending 'roffit' to produce decent ASCII output, and use that Consider extending 'roffit' to produce decent ASCII output, and use that
instead of (g)nroff when building src/tool_hugehelp.c instead of (g)nroff when building src/tool_hugehelp.c
17. Test suite 19. Test suite
17.1 SSL tunnel 19.1 SSL tunnel
Make our own version of stunnel for simple port forwarding to enable HTTPS Make our own version of stunnel for simple port forwarding to enable HTTPS
and FTP-SSL tests without the stunnel dependency, and it could allow us to and FTP-SSL tests without the stunnel dependency, and it could allow us to
provide test tools built with either OpenSSL or GnuTLS provide test tools built with either OpenSSL or GnuTLS
17.2 nicer lacking perl message 19.2 nicer lacking perl message
If perl wasn't found by the configure script, don't attempt to run the tests If perl wasn't found by the configure script, don't attempt to run the tests
but explain something nice why it doesn't. but explain something nice why it doesn't.
17.3 more protocols supported 19.3 more protocols supported
Extend the test suite to include more protocols. The telnet could just do FTP Extend the test suite to include more protocols. The telnet could just do FTP
or http operations (for which we have test servers). or http operations (for which we have test servers).
17.4 more platforms supported 19.4 more platforms supported
Make the test suite work on more platforms. OpenBSD and Mac OS. Remove Make the test suite work on more platforms. OpenBSD and Mac OS. Remove
fork()s and it should become even more portable. fork()s and it should become even more portable.
17.5 Add support for concurrent connections 19.5 Add support for concurrent connections
Tests 836, 882 and 938 were designed to verify that separate connections aren't Tests 836, 882 and 938 were designed to verify that separate connections aren't
used when using different login credentials in protocols that shouldn't re-use used when using different login credentials in protocols that shouldn't re-use
@@ -579,14 +711,14 @@ to provide the data to send.
and thus the wait for connections loop is never entered to receive the second and thus the wait for connections loop is never entered to receive the second
connection. connection.
18. Next SONAME bump 20. Next SONAME bump
18.1 http-style HEAD output for FTP 20.1 http-style HEAD output for FTP
#undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers #undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers
from being output in NOBODY requests over FTP from being output in NOBODY requests over FTP
18.2 combine error codes 20.2 combine error codes
Combine some of the error codes to remove duplicates. The original Combine some of the error codes to remove duplicates. The original
numbering should not be changed, and the old identifiers would be numbering should not be changed, and the old identifiers would be
@@ -611,29 +743,29 @@ to provide the data to send.
CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED
18.3 extend CURLOPT_SOCKOPTFUNCTION prototype 20.3 extend CURLOPT_SOCKOPTFUNCTION prototype
The current prototype only provides 'purpose' that tells what the The current prototype only provides 'purpose' that tells what the
connection/socket is for, but not any protocol or similar. It makes it hard connection/socket is for, but not any protocol or similar. It makes it hard
for applications to differentiate on TCP vs UDP and even HTTP vs FTP and for applications to differentiate on TCP vs UDP and even HTTP vs FTP and
similar. similar.
19. Next major release 21. Next major release
19.1 cleanup return codes 21.1 cleanup return codes
curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
CURLMcode. These should be changed to be the same. CURLMcode. These should be changed to be the same.
19.2 remove obsolete defines 21.2 remove obsolete defines
remove obsolete defines from curl/curl.h remove obsolete defines from curl/curl.h
19.3 size_t 21.3 size_t
make several functions use size_t instead of int in their APIs make several functions use size_t instead of int in their APIs
19.4 remove several functions 21.4 remove several functions
remove the following functions from the public API: remove the following functions from the public API:
@@ -654,18 +786,18 @@ to provide the data to send.
curl_multi_socket_all curl_multi_socket_all
19.5 remove CURLOPT_FAILONERROR 21.5 remove CURLOPT_FAILONERROR
Remove support for CURLOPT_FAILONERROR, it has gotten too kludgy and weird Remove support for CURLOPT_FAILONERROR, it has gotten too kludgy and weird
internally. Let the app judge success or not for itself. internally. Let the app judge success or not for itself.
19.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE 21.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
Remove support for a global DNS cache. Anything global is silly, and we Remove support for a global DNS cache. Anything global is silly, and we
already offer the share interface for the same functionality but done already offer the share interface for the same functionality but done
"right". "right".
19.7 remove progress meter from libcurl 21.7 remove progress meter from libcurl
The internally provided progress meter output doesn't belong in the library. The internally provided progress meter output doesn't belong in the library.
Basically no application wants it (apart from curl) but instead applications Basically no application wants it (apart from curl) but instead applications
@@ -675,7 +807,7 @@ to provide the data to send.
variable types passed to it instead of doubles so that big files work variable types passed to it instead of doubles so that big files work
correctly. correctly.
19.8 remove 'curl_httppost' from public 21.8 remove 'curl_httppost' from public
curl_formadd() was made to fill in a public struct, but the fact that the curl_formadd() was made to fill in a public struct, but the fact that the
struct is public is never really used by application for their own advantage struct is public is never really used by application for their own advantage
@@ -684,7 +816,7 @@ to provide the data to send.
Changing them to return a private handle will benefit the implementation and Changing them to return a private handle will benefit the implementation and
allow us much greater freedoms while still maintaining a solid API and ABI. allow us much greater freedoms while still maintaining a solid API and ABI.
19.9 have form functions use CURL handle argument 21.9 have form functions use CURL handle argument
curl_formadd() and curl_formget() both currently have no CURL handle curl_formadd() and curl_formget() both currently have no CURL handle
argument, but both can use a callback that is set in the easy handle, and argument, but both can use a callback that is set in the easy handle, and
@@ -692,7 +824,7 @@ to provide the data to send.
curl_easy_perform() (or similar) called - which is hard to grasp and a design curl_easy_perform() (or similar) called - which is hard to grasp and a design
mistake. mistake.
19.10 Add CURLOPT_MAIL_CLIENT option 21.10 Add CURLOPT_MAIL_CLIENT option
Rather than use the URL to specify the mail client string to present in the Rather than use the URL to specify the mail client string to present in the
HELO and EHLO commands, libcurl should support a new CURLOPT specifically for HELO and EHLO commands, libcurl should support a new CURLOPT specifically for

View File

@@ -1,4 +1,3 @@
Updated: Dec 24, 2013 (http://curl.haxx.se/docs/httpscripting.html)
_ _ ____ _ _ _ ____ _
___| | | | _ \| | ___| | | | _ \| |
/ __| | | | |_) | | / __| | | | |_) | |
@@ -23,6 +22,8 @@ The Art Of Scripting HTTP Requests Using Curl
3. Fetch a page 3. Fetch a page
3.1 GET 3.1 GET
3.2 HEAD 3.2 HEAD
3.3 Multiple URLs in a single command line
3.4 Multiple HTTP methods in a single command line
4. HTML forms 4. HTML forms
4.1 Forms explained 4.1 Forms explained
4.2 GET 4.2 GET
@@ -136,7 +137,7 @@ The Art Of Scripting HTTP Requests Using Curl
The Uniform Resource Locator format is how you specify the address of a The Uniform Resource Locator format is how you specify the address of a
particular resource on the Internet. You know these, you've seen URLs like particular resource on the Internet. You know these, you've seen URLs like
http://curl.haxx.se or https://yourbank.com a million times. RFC 3986 is the http://curl.haxx.se or https://yourbank.com a million times. RFC 3986 is the
canonical spec. canonical spec. And yeah, the formal name is not URL, it is URI.
2.2 Host 2.2 Host
@@ -193,7 +194,6 @@ The Art Of Scripting HTTP Requests Using Curl
the associated response. The path is what is to the right side of the slash the associated response. The path is what is to the right side of the slash
that follows the host name and possibly port number. that follows the host name and possibly port number.
3. Fetch a page 3. Fetch a page
3.1 GET 3.1 GET
@@ -224,6 +224,46 @@ The Art Of Scripting HTTP Requests Using Curl
may see a Content-Length: in the response headers, but there must not be an may see a Content-Length: in the response headers, but there must not be an
actual body in the HEAD response. actual body in the HEAD response.
3.3 Multiple URLs in a single command line
A single curl command line may involve one or many URLs. The most common case
is probably to just use one, but you can specify any amount of URLs. Yes
any. No limits. You'll then get requests repeated over and over for all the
given URLs.
Example, send two GETs:
curl http://url1.example.com http://url2.example.com
If you use --data to POST to the URL, using multiple URLs means that you send
that same POST to all the given URLs.
Example, send two POSTs:
curl --data name=curl http://url1.example.com http://url2.example.com
3.4 Multiple HTTP methods in a single command line
Sometimes you need to operate on several URLs in a single command line and do
different HTTP methods on each. For this, you'll enjoy the --next option. It
is basically a separator that separates a bunch of options from the next. All
the URLs before --next will get the same method and will get all the POST
data merged into one.
When curl reaches the --next on the command line, it'll sort of reset the
method and the POST data and allow a new set.
Perhaps this is best shown with a few examples. To send first a HEAD and then
a GET:
curl -I http://example.com --next http://example.com
To first send a POST and then a GET:
curl -d score=10 http://example.com/post.cgi --next http://example.com/results.html
4. HTML forms 4. HTML forms
4.1 Forms explained 4.1 Forms explained
@@ -302,6 +342,10 @@ The Art Of Scripting HTTP Requests Using Curl
curl --data-urlencode "name=I am Daniel" http://www.example.com curl --data-urlencode "name=I am Daniel" http://www.example.com
If you repeat --data several times on the command line, curl will
concatenate all the given data pieces - and put a '&' symbol between each
data segment.
4.4 File Upload POST 4.4 File Upload POST
Back in late 1995 they defined an additional way to post data over HTTP. It Back in late 1995 they defined an additional way to post data over HTTP. It
@@ -557,8 +601,10 @@ The Art Of Scripting HTTP Requests Using Curl
truckload of advanced features to allow all those encryptions and key truckload of advanced features to allow all those encryptions and key
infrastructure mechanisms encrypted HTTP requires. infrastructure mechanisms encrypted HTTP requires.
Curl supports encrypted fetches thanks to the freely available OpenSSL Curl supports encrypted fetches when built to use a TLS library and it can be
libraries. To get a page from a HTTPS server, simply run curl like: built to use one out of a fairly large set of libraries - "curl -V" will show
which one your curl was built to use (if any!). To get a page from a HTTPS
server, simply run curl like:
curl https://secure.example.com curl https://secure.example.com
@@ -584,6 +630,12 @@ The Art Of Scripting HTTP Requests Using Curl
http://curl.haxx.se/docs/sslcerts.html http://curl.haxx.se/docs/sslcerts.html
At times you may end up with your own CA cert store and then you can tell
curl to use that to verify the server's certificate:
curl --cacert ca-bundle.pem https://example.com/
11. Custom Request Elements 11. Custom Request Elements
11.1 Modify method and headers 11.1 Modify method and headers
@@ -692,7 +744,7 @@ The Art Of Scripting HTTP Requests Using Curl
14.1 Standards 14.1 Standards
RFC 2616 is a must to read if you want in-depth understanding of the HTTP RFC 7230 is a must to read if you want in-depth understanding of the HTTP
protocol protocol
RFC 3986 explains the URL syntax RFC 3986 explains the URL syntax

View File

@@ -1,22 +1,18 @@
_ _ ____ _
___| | | | _ \| |
/ __| | | | |_) | |
| (__| |_| | _ <| |___
\___|\___/|_| \_\_____|
Version Numbers and Releases Version Numbers and Releases
============================
Curl is not only curl. Curl is also libcurl. They're actually individually Curl is not only curl. Curl is also libcurl. They're actually individually
versioned, but they mostly follow each other rather closely. versioned, but they mostly follow each other rather closely.
The version numbering is always built up using the same system: The version numbering is always built up using the same system:
X.Y[.Z] X.Y.Z
Where - X is main version number
X is main version number - Y is release number
Y is release number - Z is patch number
Z is patch number
## Bumping numbers
One of these numbers will get bumped in each new release. The numbers to the One of these numbers will get bumped in each new release. The numbers to the
right of a bumped number will be reset to zero. If Z is zero, it may not be right of a bumped number will be reset to zero. If Z is zero, it may not be
@@ -57,4 +53,4 @@ Version Numbers and Releases
release. It makes comparisons with greater than and less than work. release. It makes comparisons with greater than and less than work.
This number is also available as three separate defines: This number is also available as three separate defines:
LIBCURL_VERSION_MAJOR, LIBCURL_VERSION_MINOR and LIBCURL_VERSION_PATCH. `LIBCURL_VERSION_MAJOR`, `LIBCURL_VERSION_MINOR` and `LIBCURL_VERSION_PATCH`.

View File

@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___ .\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____| .\" * \___|\___/|_| \_\_____|
.\" * .\" *
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * .\" *
.\" * This software is licensed as described in the file COPYING, which .\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms .\" * you should have received as part of this distribution. The terms
@@ -39,8 +39,7 @@ resume, Metalink, and more. As you will see below, the number of features will
make your head spin! make your head spin!
curl is powered by libcurl for all transfer-related features. See curl is powered by libcurl for all transfer-related features. See
.BR libcurl (3) \fIlibcurl(3)\fP for details.
for details.
.SH URL .SH URL
The URL syntax is protocol-dependent. You'll find a detailed description in The URL syntax is protocol-dependent. You'll find a detailed description in
RFC 3986. RFC 3986.
@@ -172,10 +171,11 @@ a level of control).
.IP "-2, --sslv2" .IP "-2, --sslv2"
(SSL) Forces curl to use SSL version 2 when negotiating with a remote SSL (SSL) Forces curl to use SSL version 2 when negotiating with a remote SSL
server. Sometimes curl is built without SSLv2 support. SSLv2 is widely server. Sometimes curl is built without SSLv2 support. SSLv2 is widely
considered insecure. considered insecure (see RFC 6176).
.IP "-3, --sslv3" .IP "-3, --sslv3"
(SSL) Forces curl to use SSL version 3 when negotiating with a remote SSL (SSL) Forces curl to use SSL version 3 when negotiating with a remote SSL
server. Sometimes curl is built without SSLv3 support. server. Sometimes curl is built without SSLv3 support. SSLv3 is widely
considered insecure (see RFC 7568).
.IP "-4, --ipv4" .IP "-4, --ipv4"
This option tells curl to resolve names to IPv4 addresses only, and not for This option tells curl to resolve names to IPv4 addresses only, and not for
example try IPv6. example try IPv6.
@@ -213,7 +213,7 @@ be in the format "NAME1=VALUE1; NAME2=VALUE2".
If no '=' symbol is used in the line, it is treated as a filename to use to If no '=' symbol is used in the line, it is treated as a filename to use to
read previously stored cookie lines from, which should be used in this session read previously stored cookie lines from, which should be used in this session
if they match. Using this method also activates the "cookie parser" which will if they match. Using this method also activates the cookie engine which will
make curl record incoming cookies too, which may be handy if you're using this make curl record incoming cookies too, which may be handy if you're using this
in combination with the \fI-L, --location\fP option. The file format of the in combination with the \fI-L, --location\fP option. The file format of the
file to read cookies from should be plain HTTP headers or the Netscape/Mozilla file to read cookies from should be plain HTTP headers or the Netscape/Mozilla
@@ -223,6 +223,15 @@ The file specified with \fI-b, --cookie\fP is only used as input. No cookies
will be written to the file. To store cookies, use the \fI-c, --cookie-jar\fP will be written to the file. To store cookies, use the \fI-c, --cookie-jar\fP
option. option.
Exercise caution if you are using this option and multiple transfers may occur.
If you use the NAME1=VALUE1; format, or in a file use the Set-Cookie format and
don't specify a domain, then the cookie is sent for any domain (even after
redirects are followed) and cannot be modified by a server-set cookie. If the
cookie engine is enabled and a server sets a cookie of the same name then both
will be sent on a future transfer to that server, likely not what you intended.
To address these issues set a domain in Set-Cookie (doing that will include
sub-domains) or use the Netscape format.
If this option is used several times, the last one will be used. If this option is used several times, the last one will be used.
.IP "-B, --use-ascii" .IP "-B, --use-ascii"
(FTP/LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using (FTP/LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using
@@ -254,6 +263,9 @@ won't fail or even report an error clearly. Using -v will get a warning
displayed, but that is the only visible feedback you get about this possibly displayed, but that is the only visible feedback you get about this possibly
lethal situation. lethal situation.
Since 7.43.0 cookies that were imported in the Set-Cookie format without a
domain name are not exported by this option.
If this option is used several times, the last specified file name will be If this option is used several times, the last specified file name will be
used. used.
.IP "-C, --continue-at <offset>" .IP "-C, --continue-at <offset>"
@@ -269,11 +281,11 @@ If this option is used several times, the last one will be used.
.IP "--ciphers <list of ciphers>" .IP "--ciphers <list of ciphers>"
(SSL) Specifies which ciphers to use in the connection. The list of ciphers (SSL) Specifies which ciphers to use in the connection. The list of ciphers
must specify valid ciphers. Read up on SSL cipher list details on this URL: must specify valid ciphers. Read up on SSL cipher list details on this URL:
\fIhttp://www.openssl.org/docs/apps/ciphers.html\fP \fIhttps://www.openssl.org/docs/apps/ciphers.html\fP
NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of NSS NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of NSS
ciphers is in the NSSCipherSuite entry at this URL: ciphers is in the NSSCipherSuite entry at this URL:
\fIhttp://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives\fP \fIhttps://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives\fP
If this option is used several times, the last one will be used. If this option is used several times, the last one will be used.
.IP "--compressed" .IP "--compressed"
@@ -315,9 +327,10 @@ presses the submit button. This will cause curl to pass the data to the server
using the content-type application/x-www-form-urlencoded. Compare to using the content-type application/x-www-form-urlencoded. Compare to
\fI-F, --form\fP. \fI-F, --form\fP.
\fI-d, --data\fP is the same as \fI--data-ascii\fP. To post data purely binary, \fI-d, --data\fP is the same as \fI--data-ascii\fP. \fI--data-raw\fP is almost
you should instead use the \fI--data-binary\fP option. To URL-encode the value the same but does not have a special interpretation of the @ character. To
of a form field you may use \fI--data-urlencode\fP. post data purely binary, you should instead use the \fI--data-binary\fP option.
To URL-encode the value of a form field you may use \fI--data-urlencode\fP.
If any of these options is used more than once on the same command line, the If any of these options is used more than once on the same command line, the
data pieces specified will be merged together with a separating data pieces specified will be merged together with a separating
@@ -329,7 +342,8 @@ read the data from, or - if you want curl to read the data from
stdin. Multiple files can also be specified. Posting data from a file stdin. Multiple files can also be specified. Posting data from a file
named 'foobar' would thus be done with \fI--data\fP @foobar. When --data is named 'foobar' would thus be done with \fI--data\fP @foobar. When --data is
told to read from a file like that, carriage returns and newlines will be told to read from a file like that, carriage returns and newlines will be
stripped out. stripped out. If you don't want the @ character to have a special
interpretation use \fI--data-raw\fP instead.
.IP "-D, --dump-header <file>" .IP "-D, --dump-header <file>"
Write the protocol headers to the specified file. Write the protocol headers to the specified file.
@@ -354,6 +368,10 @@ and carriage returns are preserved and conversions are never done.
If this option is used several times, the ones following the first will append If this option is used several times, the ones following the first will append
data as described in \fI-d, --data\fP. data as described in \fI-d, --data\fP.
.IP "--data-raw <data>"
(HTTP) This posts data similarly to \fI--data\fP but without the special
interpretation of the @ character. See \fI-d, --data\fP.
(Added in 7.43.0)
.IP "--data-urlencode <data>" .IP "--data-urlencode <data>"
(HTTP) This posts data, similar to the other --data options with the exception (HTTP) This posts data, similar to the other --data options with the exception
that this performs URL-encoding. (Added in 7.18.0) that this performs URL-encoding. (Added in 7.18.0)
@@ -470,10 +488,10 @@ If this option is used several times, the last one will be used.
(SSL) Tells curl to use the specified client certificate file when getting a (SSL) Tells curl to use the specified client certificate file when getting a
file with HTTPS, FTPS or another SSL-based protocol. The certificate must be file with HTTPS, FTPS or another SSL-based protocol. The certificate must be
in PKCS#12 format if using Secure Transport, or PEM format if using any other in PKCS#12 format if using Secure Transport, or PEM format if using any other
engine. If the optional password isn't specified, it will be queried engine. If the optional password isn't specified, it will be queried for on
for on the terminal. Note that this option assumes a \&"certificate" file that the terminal. Note that this option assumes a \&"certificate" file that is the
is the private key and the private certificate concatenated! See \fI--cert\fP private key and the client certificate concatenated! See \fI--cert\fP and
and \fI--key\fP to specify them independently. \fI--key\fP to specify them independently.
If curl is built against the NSS SSL library then this option can tell If curl is built against the NSS SSL library then this option can tell
curl the nickname of the certificate to use within the NSS database defined curl the nickname of the certificate to use within the NSS database defined
@@ -539,19 +557,42 @@ OpenSSL-powered curl to make SSL-connections much more efficiently than using
If this option is set, the default capath value will be ignored, and if it is If this option is set, the default capath value will be ignored, and if it is
used several times, the last one will be used. used several times, the last one will be used.
.IP "--pinnedpubkey <pinned public key>" .IP "--pinnedpubkey <pinned public key (hashes)>"
(SSL) Tells curl to use the specified public key file to verify the peer. The (SSL) Tells curl to use the specified public key file (or hashes) to verify the
file must contain a single public key in PEM or DER format. peer. This can be a path to a file which contains a single public key in PEM or
DER format, or any number of base64 encoded sha256 hashes preceded by
\'sha256//\' and separated by \';\'
When negotiating a TLS or SSL connection, the server sends a certificate When negotiating a TLS or SSL connection, the server sends a certificate
indicating its identity. A public key is extracted from this certificate and indicating its identity. A public key is extracted from this certificate and
if it does not exactly match the public key provided to this option, curl will if it does not exactly match the public key provided to this option, curl will
abort the connection before sending or receiving any data. abort the connection before sending or receiving any data.
This is currently only implemented in the OpenSSL, GnuTLS and GSKit backends. Added in 7.39.0 for OpenSSL, GnuTLS and GSKit. Added in 7.43.0 for NSS and
wolfSSL/CyaSSL. sha256 support added in 7.44.0 for OpenSSL,
GnuTLS, NSS and wolfSSL/CyaSSL. Other SSL backends not supported.
If this option is used several times, the last one will be used. If this option is used several times, the last one will be used.
(Added in 7.39.0) .IP "--cert-status"
(SSL) Tells curl to verify the status of the server certificate by using the
Certificate Status Request (aka. OCSP stapling) TLS extension.
If this option is enabled and the server sends an invalid (e.g. expired)
response, if the response suggests that the server certificate has been revoked,
or no response at all is received, the verification fails.
This is currently only implemented in the OpenSSL, GnuTLS and NSS backends.
(Added in 7.41.0)
.IP "--false-start"
(SSL) Tells curl to use false start during the TLS handshake. False start is a
mode where a TLS client will start sending application data before verifying
the server's Finished message, thus saving a round trip when performing a full
handshake.
This is currently only implemented in the NSS and Secure Transport (on iOS 7.0
or later, or OS X 10.9 or later) backends.
(Added in 7.42.0)
.IP "-f, --fail" .IP "-f, --fail"
(HTTP) Fail silently (no output at all) on server errors. This is mostly done (HTTP) Fail silently (no output at all) on server errors. This is mostly done
to better enable scripts etc to better deal with failed attempts. In normal to better enable scripts etc to better deal with failed attempts. In normal
@@ -579,7 +620,9 @@ input:
\fBcurl\fP -F password=@/etc/passwd www.mypasswords.com \fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
To read content from stdin instead of a file, use - as the filename. This goes To read content from stdin instead of a file, use - as the filename. This goes
for both @ and < constructs. for both @ and < constructs. Unfortunately it does not support reading the
file from a named pipe or similar, as it needs the full size before the
transfer starts.
You can also tell curl what Content-Type to use by using 'type=', in a manner You can also tell curl what Content-Type to use by using 'type=', in a manner
similar to: similar to:
@@ -641,6 +684,7 @@ curl does one CWD with the full target directory and then operates on the file
\&"normally" (like in the multicwd case). This is somewhat more standards \&"normally" (like in the multicwd case). This is somewhat more standards
compliant than 'nocwd' but without the full penalty of 'multicwd'. compliant than 'nocwd' but without the full penalty of 'multicwd'.
.RE .RE
.IP
(Added in 7.15.1) (Added in 7.15.1)
.IP "--ftp-pasv" .IP "--ftp-pasv"
(FTP) Use passive mode for the data connection. Passive is the internal default (FTP) Use passive mode for the data connection. Passive is the internal default
@@ -733,16 +777,24 @@ Example:
\&# curl -H "X-First-Name: Joe" http://192.168.0.1/ \&# curl -H "X-First-Name: Joe" http://192.168.0.1/
\fBWARNING\fP: headers set with this option will be set in all requests - even
after redirects are followed, like when told with \fB-L, --location\fP. This
can lead to the header being sent to other hosts than the original host, so
sensitive headers should be used with caution combined with following
redirects.
This option can be used multiple times to add/replace/remove multiple headers. This option can be used multiple times to add/replace/remove multiple headers.
.IP "--hostpubmd5 <md5>" .IP "--hostpubmd5 <md5>"
(SCP/SFTP) Pass a string containing 32 hexadecimal digits. The string should (SCP/SFTP) Pass a string containing 32 hexadecimal digits. The string should
be the 128 bit MD5 checksum of the remote host's public key, curl will refuse be the 128 bit MD5 checksum of the remote host's public key, curl will refuse
the connection with the host unless the md5sums match. (Added in 7.17.1) the connection with the host unless the md5sums match. (Added in 7.17.1)
.IP "--ignore-content-length" .IP "--ignore-content-length"
(HTTP) For HTTP, Ignore the Content-Length header. This is particularly useful for
Ignore the Content-Length header. This is particularly useful for servers servers running Apache 1.x, which will report incorrect Content-Length for
running Apache 1.x, which will report incorrect Content-Length for files files larger than 2 gigabytes.
larger than 2 gigabytes.
For FTP (since 7.46.0), skip the RETR command to figure out the size before
downloading a file.
.IP "-i, --include" .IP "-i, --include"
(HTTP) Include the HTTP-header in the output. The HTTP-header includes things (HTTP) Include the HTTP-header in the output. The HTTP-header includes things
like server-name, date of the document, HTTP-version and more... like server-name, date of the document, HTTP-version and more...
@@ -1027,13 +1079,10 @@ in Metalink file, hash check will fail.
Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's
home directory for login name and password. This is typically used for FTP on home directory for login name and password. This is typically used for FTP on
Unix. If used with HTTP, curl will enable user authentication. See Unix. If used with HTTP, curl will enable user authentication. See
.BR netrc(4) \fInetrc(5)\fP \fIftp(1)\fP for details on the file format. Curl will not
or complain if that file doesn't have the right permissions (it should not be
.BR ftp(1) either world- or group-readable). The environment variable "HOME" is used to
for details on the file format. Curl will not complain if that file find the home directory.
doesn't have the right permissions (it should not be either world- or
group-readable). The environment variable "HOME" is used to find the home
directory.
A quick and very simple example of how to setup a \fI.netrc\fP to allow curl A quick and very simple example of how to setup a \fI.netrc\fP to allow curl
to FTP to the machine host.domain.com with user name \&'myself' and password to FTP to the machine host.domain.com with user name \&'myself' and password
@@ -1195,7 +1244,7 @@ i.e "my.host.domain" to specify the machine
make curl pick the same IP address that is already used for the control make curl pick the same IP address that is already used for the control
connection connection
.RE .RE
.IP
If this option is used several times, the last one will be used. Disable the If this option is used several times, the last one will be used. Disable the
use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++. instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
@@ -1209,22 +1258,28 @@ available.
(SSL/SSH) Passphrase for the private key (SSL/SSH) Passphrase for the private key
If this option is used several times, the last one will be used. If this option is used several times, the last one will be used.
.IP "--path-as-is"
Tell curl to not handle sequences of /../ or /./ in the given URL
path. Normally curl will squash or merge them according to standards but with
this option set you tell it not to do that.
(Added in 7.42.0)
.IP "--post301" .IP "--post301"
(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests (HTTP) Tells curl to respect RFC 7230/6.4.2 and not convert POST requests
into GET requests when following a 301 redirection. The non-RFC behaviour is into GET requests when following a 301 redirection. The non-RFC behaviour is
ubiquitous in web browsers, so curl does the conversion by default to maintain ubiquitous in web browsers, so curl does the conversion by default to maintain
consistency. However, a server may require a POST to remain a POST after such consistency. However, a server may require a POST to remain a POST after such
a redirection. This option is meaningful only when using \fI-L, --location\fP a redirection. This option is meaningful only when using \fI-L, --location\fP
(Added in 7.17.1) (Added in 7.17.1)
.IP "--post302" .IP "--post302"
(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests (HTTP) Tells curl to respect RFC 7230/6.4.3 and not convert POST requests
into GET requests when following a 302 redirection. The non-RFC behaviour is into GET requests when following a 302 redirection. The non-RFC behaviour is
ubiquitous in web browsers, so curl does the conversion by default to maintain ubiquitous in web browsers, so curl does the conversion by default to maintain
consistency. However, a server may require a POST to remain a POST after such consistency. However, a server may require a POST to remain a POST after such
a redirection. This option is meaningful only when using \fI-L, --location\fP a redirection. This option is meaningful only when using \fI-L, --location\fP
(Added in 7.19.1) (Added in 7.19.1)
.IP "--post303" .IP "--post303"
(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests (HTTP) Tells curl to respect RFC 7230/6.4.4 and not convert POST requests
into GET requests when following a 303 redirection. The non-RFC behaviour is into GET requests when following a 303 redirection. The non-RFC behaviour is
ubiquitous in web browsers, so curl does the conversion by default to maintain ubiquitous in web browsers, so curl does the conversion by default to maintain
consistency. However, a server may require a POST to remain a POST after such consistency. However, a server may require a POST to remain a POST after such
@@ -1271,9 +1326,40 @@ This option can be used multiple times, in which case the effect is the same
as concatenating the protocols into one instance of the option. as concatenating the protocols into one instance of the option.
(Added in 7.20.2) (Added in 7.20.2)
.IP "--proto-default <protocol>"
Tells curl to use \fIprotocol\fP for any URL missing a scheme name.
Example:
.RS
.IP "--proto-default https ftp.mozilla.org"
https://ftp.mozilla.org
.RE
An unknown or unsupported protocol causes error
\fICURLE_UNSUPPORTED_PROTOCOL\fP.
This option does not change the default proxy protocol (http).
Without this option curl would make a guess based on the host, see \fI--url\fP
for details.
(Added in 7.45.0)
.IP "--proto-redir <protocols>" .IP "--proto-redir <protocols>"
Tells curl to use the listed protocols after a redirect. See --proto for Tells curl to use the listed protocols on redirect. See --proto for how
how protocols are represented. protocols are represented.
Example:
.RS
.IP "--proto-redir -all,http,https"
Allow only HTTP and HTTPS on redirect.
.RE
By default curl will allow all protocols on redirect except several disabled
for security reasons: Since 7.19.4 FILE and SCP are disabled, and since 7.40.0
SMB and SMBS are also disabled. Specifying \fIall\fP or \fI+all\fP enables all
protocols on redirect, including those disabled for security.
(Added in 7.20.2) (Added in 7.20.2)
.IP "--proxy-anyauth" .IP "--proxy-anyauth"
@@ -1294,6 +1380,11 @@ with a remote host. (Added in 7.17.1)
.IP "--proxy-ntlm" .IP "--proxy-ntlm"
Tells curl to use HTTP NTLM authentication when communicating with the given Tells curl to use HTTP NTLM authentication when communicating with the given
proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host. proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
.IP "--proxy-service-name <servicename>"
This option allows you to change the service name for proxy negotiation.
Examples: --proxy-negotiate proxy-name \fI--proxy-service-name\fP sockd would use
sockd/proxy-name. (Added in 7.43.0).
.IP "--proxy1.0 <proxyhost[:port]>" .IP "--proxy1.0 <proxyhost[:port]>"
Use the specified HTTP 1.0 proxy. If the port number is not specified, it is Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
assumed at port 1080. assumed at port 1080.
@@ -1383,15 +1474,12 @@ specifies the last 500 bytes
specifies the bytes from offset 9500 and forward specifies the bytes from offset 9500 and forward
.TP .TP
.B 0-0,-1 .B 0-0,-1
specifies the first and last byte only(*)(H) specifies the first and last byte only(*)(HTTP)
.TP
.B 500-700,600-799
specifies 300 bytes from offset 500(H)
.TP .TP
.B 100-199,500-599 .B 100-199,500-599
specifies two separate 100-byte ranges(*)(H) specifies two separate 100-byte ranges(*) (HTTP)
.RE .RE
.IP
(*) = NOTE that this will cause the server to reply with a multipart (*) = NOTE that this will cause the server to reply with a multipart
response! response!
@@ -1475,6 +1563,11 @@ terminal/stdout unless you redirect it.
.IP "--sasl-ir" .IP "--sasl-ir"
Enable initial response in SASL authentication. Enable initial response in SASL authentication.
(Added in 7.31.0) (Added in 7.31.0)
.IP "--service-name <servicename>"
This option allows you to change the service name for SPNEGO.
Examples: --negotiate \fI--service-name\fP sockd would use
sockd/server-name. (Added in 7.43.0).
.IP "-S, --show-error" .IP "-S, --show-error"
When used with \fI-s\fP it makes curl show an error message if it fails. When used with \fI-s\fP it makes curl show an error message if it fails.
.IP "--ssl" .IP "--ssl"
@@ -1497,6 +1590,10 @@ and TLS1.0 protocols known as BEAST. If this option isn't used, the SSL layer
may use workarounds known to cause interoperability problems with some older may use workarounds known to cause interoperability problems with some older
SSL implementations. WARNING: this option loosens the SSL security, and by SSL implementations. WARNING: this option loosens the SSL security, and by
using this flag you ask for exactly that. (Added in 7.25.0) using this flag you ask for exactly that. (Added in 7.25.0)
.IP "--ssl-no-revoke"
(WinSSL) This option tells curl to disable certificate revocation checks.
WARNING: this option loosens the SSL security, and by using this flag you ask
for exactly that. (Added in 7.44.0)
.IP "--socks4 <host[:port]>" .IP "--socks4 <host[:port]>"
Use the specified SOCKS4 proxy. If the port number is not specified, it is Use the specified SOCKS4 proxy. If the port number is not specified, it is
assumed at port 1080. (Added in 7.15.2) assumed at port 1080. (Added in 7.15.2)
@@ -1676,7 +1773,7 @@ impossible to use a colon in the user name with this option. The password can,
still. still.
When using Kerberos V5 with a Windows based server you should include the When using Kerberos V5 with a Windows based server you should include the
Windows domain name in the user name, in order for the server to succesfully Windows domain name in the user name, in order for the server to successfully
obtain a Kerberos Ticket. If you don't then the initial authentication obtain a Kerberos Ticket. If you don't then the initial authentication
handshake may fail. handshake may fail.
@@ -1706,6 +1803,12 @@ If this option is used several times, the last one will be used.
Specify a URL to fetch. This option is mostly handy when you want to specify Specify a URL to fetch. This option is mostly handy when you want to specify
URL(s) in a config file. URL(s) in a config file.
If the given URL is missing a scheme name (such as "http://" or "ftp://" etc)
then curl will make a guess based on the host. If the outermost sub-domain name
matches DICT, FTP, IMAP, LDAP, POP3 or SMTP then that protocol will be used,
otherwise HTTP will be used. Since 7.45.0 guessing can be disabled by setting a
default protocol, see \fI--proto-default\fP for details.
This option may be used any number of times. To control where this URL is This option may be used any number of times. To control where this URL is
written, use the \fI-o, --output\fP or the \fI-O, --remote-name\fP options. written, use the \fI-o, --output\fP or the \fI-O, --remote-name\fP options.
.IP "-v, --verbose" .IP "-v, --verbose"
@@ -1850,7 +1953,7 @@ displayed with millisecond resolution.
The URL that was fetched last. This is most meaningful if you've told curl The URL that was fetched last. This is most meaningful if you've told curl
to follow location: headers. to follow location: headers.
.RE .RE
.IP
If this option is used several times, the last one will be used. If this option is used several times, the last one will be used.
.IP "-x, --proxy <[protocol://][user:password@]proxyhost[:port]>" .IP "-x, --proxy <[protocol://][user:password@]proxyhost[:port]>"
Use the specified proxy. Use the specified proxy.
@@ -1884,7 +1987,7 @@ password.
If this option is used several times, the last one will be used. If this option is used several times, the last one will be used.
.IP "-X, --request <command>" .IP "-X, --request <command>"
(HTTP) Specifies a custom request method to use when communicating with the (HTTP) Specifies a custom request method to use when communicating with the
HTTP server. The specified request will be used instead of the method HTTP server. The specified request method will be used instead of the method
otherwise used (which defaults to GET). Read the HTTP 1.1 specification for otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
details and explanations. Common additional HTTP requests include PUT and details and explanations. Common additional HTTP requests include PUT and
DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and
@@ -1898,6 +2001,11 @@ alter the way curl behaves. So for example if you want to make a proper HEAD
request, using -X HEAD will not suffice. You need to use the \fI-I, --head\fP request, using -X HEAD will not suffice. You need to use the \fI-I, --head\fP
option. option.
The method string you set with -X will be used for all requests, which if you
for example use \fB-L, --location\fP may cause unintended side-effects when
curl doesn't change request method according to the HTTP 30x response codes -
and similar.
(FTP) (FTP)
Specifies a custom FTP command to use instead of LIST when doing file lists Specifies a custom FTP command to use instead of LIST when doing file lists
with FTP. with FTP.

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,9 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* Example application source code using the multi interface to download many /* <DESC>
* files, but with a capped maximum amount of simultaneous transfers. * Source code using the multi interface to download many
* * files, with a capped maximum amount of simultaneous transfers.
* </DESC>
* Written by Michael Wallner * Written by Michael Wallner
*/ */

View File

@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___ # | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____| # \___|\___/|_| \_\_____|
# #
# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. # Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
# #
# This software is licensed as described in the file COPYING, which # This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms # you should have received as part of this distribution. The terms
@@ -31,7 +31,8 @@ check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \
pop3-dele pop3-top pop3-stat pop3-noop pop3-ssl pop3-tls pop3-multi \ pop3-dele pop3-top pop3-stat pop3-noop pop3-ssl pop3-tls pop3-multi \
imap-list imap-lsub imap-fetch imap-store imap-append imap-examine \ imap-list imap-lsub imap-fetch imap-store imap-append imap-examine \
imap-search imap-create imap-delete imap-copy imap-noop imap-ssl \ imap-search imap-create imap-delete imap-copy imap-noop imap-ssl \
imap-tls imap-multi url2file sftpget ftpsget postinmemory imap-tls imap-multi url2file sftpget ftpsget postinmemory http2-download \
http2-upload http2-serverpush
# These examples require external dependencies that may not be commonly # These examples require external dependencies that may not be commonly
# available on POSIX systems, so don't bother attempting to compile them here. # available on POSIX systems, so don't bother attempting to compile them here.

View File

@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___ # | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____| # \___|\___/|_| \_\_____|
# #
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. # Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
# #
# This software is licensed as described in the file COPYING, which # This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms # you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
########################################################################### ###########################################################################
# #
## Makefile for building curl examples with MingW (GCC-3.2 or later) ## Makefile for building curl examples with MingW (GCC-3.2 or later)
## and optionally OpenSSL (0.9.8), libssh2 (1.3), zlib (1.2.5), librtmp (2.3) ## and optionally OpenSSL (1.0.2a), libssh2 (1.5), zlib (1.2.8), librtmp (2.4)
## ##
## Usage: mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...] ## Usage: mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...]
## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-spi-winidn ## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-spi-winidn
@@ -38,23 +38,23 @@ ZLIB_PATH = ../../../zlib-1.2.8
endif endif
# Edit the path below to point to the base of your OpenSSL package. # Edit the path below to point to the base of your OpenSSL package.
ifndef OPENSSL_PATH ifndef OPENSSL_PATH
OPENSSL_PATH = ../../../openssl-0.9.8zc OPENSSL_PATH = ../../../openssl-1.0.2a
endif endif
# Edit the path below to point to the base of your LibSSH2 package. # Edit the path below to point to the base of your LibSSH2 package.
ifndef LIBSSH2_PATH ifndef LIBSSH2_PATH
LIBSSH2_PATH = ../../../libssh2-1.4.3 LIBSSH2_PATH = ../../../libssh2-1.5.0
endif endif
# Edit the path below to point to the base of your librtmp package. # Edit the path below to point to the base of your librtmp package.
ifndef LIBRTMP_PATH ifndef LIBRTMP_PATH
LIBRTMP_PATH = ../../../librtmp-2.3 LIBRTMP_PATH = ../../../librtmp-2.4
endif endif
# Edit the path below to point to the base of your libidn package. # Edit the path below to point to the base of your libidn package.
ifndef LIBIDN_PATH ifndef LIBIDN_PATH
LIBIDN_PATH = ../../../libidn-1.18 LIBIDN_PATH = ../../../libidn-1.32
endif endif
# Edit the path below to point to the base of your MS IDN package. # Edit the path below to point to the base of your MS IDN package.
# Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1 # Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1
# http://www.microsoft.com/downloads/en/details.aspx?FamilyID=ad6158d7-ddba-416a-9109-07607425a815 # https://www.microsoft.com/en-us/download/details.aspx?id=734
ifndef WINIDN_PATH ifndef WINIDN_PATH
WINIDN_PATH = ../../../Microsoft IDN Mitigation APIs WINIDN_PATH = ../../../Microsoft IDN Mitigation APIs
endif endif
@@ -62,6 +62,10 @@ endif
ifndef LDAP_SDK ifndef LDAP_SDK
LDAP_SDK = c:/novell/ndk/cldapsdk/win32 LDAP_SDK = c:/novell/ndk/cldapsdk/win32
endif endif
# Edit the path below to point to the base of your nghttp2 package.
ifndef NGHTTP2_PATH
NGHTTP2_PATH = ../../../nghttp2-1.0.0
endif
PROOT = ../.. PROOT = ../..
@@ -72,14 +76,24 @@ endif
# Edit the var below to set to your architecture or set environment var. # Edit the var below to set to your architecture or set environment var.
ifndef ARCH ifndef ARCH
ARCH = w32 ifeq ($(findstring x86_64,$(shell $(CC) -dumpmachine)),x86_64)
ARCH = w64
else
ARCH = w32
endif
endif endif
CC = $(CROSSPREFIX)gcc CC = $(CROSSPREFIX)gcc
CFLAGS = -g -O2 -Wall CFLAGS = -g -O2 -Wall
CFLAGS += -fno-strict-aliasing CFLAGS += -fno-strict-aliasing
ifeq ($(ARCH),w64) ifeq ($(ARCH),w64)
CFLAGS += -D_AMD64_ CFLAGS += -m64 -D_AMD64_
LDFLAGS += -m64
RCFLAGS += -F pe-x86-64
else
CFLAGS += -m32
LDFLAGS += -m32
RCFLAGS += -F pe-i386
endif endif
# comment LDFLAGS below to keep debug info # comment LDFLAGS below to keep debug info
LDFLAGS = -s LDFLAGS = -s
@@ -158,9 +172,12 @@ ifeq ($(findstring -metalink,$(CFG)),-metalink)
METALINK = 1 METALINK = 1
endif endif
ifeq ($(findstring -winssl,$(CFG)),-winssl) ifeq ($(findstring -winssl,$(CFG)),-winssl)
SCHANNEL = 1 WINSSL = 1
SSPI = 1 SSPI = 1
endif endif
ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2)
NGHTTP2 = 1
endif
INCLUDES = -I. -I$(PROOT) -I$(PROOT)/include -I$(PROOT)/lib INCLUDES = -I. -I$(PROOT) -I$(PROOT)/include -I$(PROOT)/lib
@@ -184,6 +201,10 @@ ifdef RTMP
CFLAGS += -DUSE_LIBRTMP CFLAGS += -DUSE_LIBRTMP
curl_LDADD += -L"$(LIBRTMP_PATH)/librtmp" -lrtmp -lwinmm curl_LDADD += -L"$(LIBRTMP_PATH)/librtmp" -lrtmp -lwinmm
endif endif
ifdef NGHTTP2
CFLAGS += -DUSE_NGHTTP2
curl_LDADD += -L"$(NGHTTP2_PATH)/lib" -lnghttp2
endif
ifdef SSH2 ifdef SSH2
CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H
curl_LDADD += -L"$(LIBSSH2_PATH)/win32" -lssh2 curl_LDADD += -L"$(LIBSSH2_PATH)/win32" -lssh2
@@ -204,7 +225,7 @@ ifdef SSL
ifndef DYN ifndef DYN
OPENSSL_LIBS += -lgdi32 -lcrypt32 OPENSSL_LIBS += -lgdi32 -lcrypt32
endif endif
CFLAGS += -DUSE_SSLEAY CFLAGS += -DUSE_OPENSSL
curl_LDADD += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS) curl_LDADD += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
endif endif
ifdef ZLIB ifdef ZLIB
@@ -223,7 +244,7 @@ endif
endif endif
ifdef SSPI ifdef SSPI
CFLAGS += -DUSE_WINDOWS_SSPI CFLAGS += -DUSE_WINDOWS_SSPI
ifdef SCHANNEL ifdef WINSSL
CFLAGS += -DUSE_SCHANNEL CFLAGS += -DUSE_SCHANNEL
endif endif
endif endif

View File

@@ -19,12 +19,12 @@ endif
# Edit the path below to point to the base of your OpenSSL package. # Edit the path below to point to the base of your OpenSSL package.
ifndef OPENSSL_PATH ifndef OPENSSL_PATH
OPENSSL_PATH = ../../../openssl-0.9.8zc OPENSSL_PATH = ../../../openssl-1.0.2a
endif endif
# Edit the path below to point to the base of your LibSSH2 package. # Edit the path below to point to the base of your LibSSH2 package.
ifndef LIBSSH2_PATH ifndef LIBSSH2_PATH
LIBSSH2_PATH = ../../../libssh2-1.4.3 LIBSSH2_PATH = ../../../libssh2-1.5.0
endif endif
# Edit the path below to point to the base of your axTLS package. # Edit the path below to point to the base of your axTLS package.
@@ -34,12 +34,12 @@ endif
# Edit the path below to point to the base of your libidn package. # Edit the path below to point to the base of your libidn package.
ifndef LIBIDN_PATH ifndef LIBIDN_PATH
LIBIDN_PATH = ../../../libidn-1.18 LIBIDN_PATH = ../../../libidn-1.32
endif endif
# Edit the path below to point to the base of your librtmp package. # Edit the path below to point to the base of your librtmp package.
ifndef LIBRTMP_PATH ifndef LIBRTMP_PATH
LIBRTMP_PATH = ../../../librtmp-2.3 LIBRTMP_PATH = ../../../librtmp-2.4
endif endif
# Edit the path below to point to the base of your fbopenssl package. # Edit the path below to point to the base of your fbopenssl package.

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,11 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* HTTP PUT upload with authentiction using "any" method. libcurl picks the
* one the server supports/wants.
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <fcntl.h> #include <fcntl.h>
#ifdef WIN32 #ifdef WIN32

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 2012 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -20,11 +20,11 @@
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* demonstrate the use of multi socket interface with boost::asio
* </DESC>
*/
/* /*
* file: asiohiper.cpp
* Example program to demonstrate the use of multi socket interface
* with boost::asio
*
* This program is in c++ and uses boost::asio instead of libevent/libev. * This program is in c++ and uses boost::asio instead of libevent/libev.
* Requires boost::asio, boost::bind and boost::system * Requires boost::asio, boost::bind and boost::system
* *

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,17 +19,11 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* Example using a "in core" PEM certificate to retrieve a https page. /* <DESC>
* Written by Theo Borm * CA cert in memory with OpenSSL to get a HTTPS page.
* </DESC>
*/ */
/* on a netBSD system with OPENSSL& LIBCURL installed from
* pkgsrc (using default paths) this program can be compiled using:
* gcc -I/usr/pkg/include -L/usr/pkg/lib -lcurl -Wl,-R/usr/pkg/lib -lssl
* -lcrypto -lz -o curlcacerttest curlcacerttest.c
* on other operating systems you may want to change paths to headers
* and libraries
*/
#include <openssl/ssl.h> #include <openssl/ssl.h>
#include <curl/curl.h> #include <curl/curl.h>
#include <stdio.h> #include <stdio.h>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* Extract lots of TLS certificate info.
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <curl/curl.h> #include <curl/curl.h>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* Show transfer timing info after download completes.
* </DESC>
*/
/* Example source code to show how the callback function can be used to /* Example source code to show how the callback function can be used to
* download data into a chunk of memory instead of storing it in a file. * download data into a chunk of memory instead of storing it in a file.
* After successful download we use curl_easy_getinfo() calls to get the * After successful download we use curl_easy_getinfo() calls to get the

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,7 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* This example shows usage of simple cookie interface. */ /* <DESC>
* Import and export cookies with COOKIELIST.
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@@ -96,7 +99,12 @@ main(void)
return 1; return 1;
} }
/* HTTP-header style cookie */ /* HTTP-header style cookie. If you use the Set-Cookie format and don't
specify a domain then the cookie is sent for any domain and will not be
modified, likely not what you intended. Starting in 7.43.0 any-domain
cookies will not be exported either. For more information refer to the
CURLOPT_COOKIELIST documentation.
*/
snprintf(nline, sizeof(nline), snprintf(nline, sizeof(nline),
"Set-Cookie: OLD_PREF=3d141414bf4209321; " "Set-Cookie: OLD_PREF=3d141414bf4209321; "
"expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com"); "expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com");

View File

@@ -5,9 +5,12 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (c) 2000 David Odin (aka DindinX) for MandrakeSoft
*/
/* <DESC>
* use the libcurl in a gtk-threaded application
* </DESC>
*/ */
/* Copyright (c) 2000 David Odin (aka DindinX) for MandrakeSoft */
/* an attempt to use the curl library in concert with a gtk-threaded application */
#include <stdio.h> #include <stdio.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>

View File

@@ -9,7 +9,10 @@
certificate presented during ssl session establishment. certificate presented during ssl session establishment.
*/ */
/* <DESC>
* demonstrates use of SSL context callback, requires OpenSSL
* </DESC>
*/
/* /*
* Copyright (c) 2003 The OpenEvidence Project. All rights reserved. * Copyright (c) 2003 The OpenEvidence Project. All rights reserved.
@@ -490,7 +493,7 @@ int main(int argc, char **argv) {
BIO_printf(p.errorbio,"the response has a correct mimetype : %s\n", BIO_printf(p.errorbio,"the response has a correct mimetype : %s\n",
response); response);
else else
BIO_printf(p.errorbio,"the reponse doesn\'t has an acceptable " BIO_printf(p.errorbio,"the response doesn\'t have an acceptable "
"mime type, it is %s instead of %s\n", "mime type, it is %s instead of %s\n",
response,mimetypeaccept); response,mimetypeaccept);
} }

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* Show how CURLOPT_DEBUGFUNCTION can be used.
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <curl/curl.h> #include <curl/curl.h>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* multi socket interface together with libev
* </DESC>
*/
/* Example application source code using the multi socket interface to /* Example application source code using the multi socket interface to
* download many files at once. * download many files at once.
* *

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,9 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* /* <DESC>
* This is an example demonstrating how an application can pass in a custom * An example demonstrating how an application can pass in a custom
* socket to libcurl to use. This example also handles the connect itself. * socket to libcurl to use. This example also handles the connect itself.
* </DESC>
*/ */
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* Upload to a file:// URL
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <curl/curl.h> #include <curl/curl.h>
#include <sys/stat.h> #include <sys/stat.h>

View File

@@ -42,6 +42,10 @@
* *
* This example requires libcurl 7.9.7 or later. * This example requires libcurl 7.9.7 or later.
*/ */
/* <DESC>
* implements an fopen() abstraction allowing reading from URLs
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@@ -108,7 +112,7 @@ static size_t write_callback(char *buffer,
size=rembuff; size=rembuff;
} }
else { else {
/* realloc suceeded increase buffer size*/ /* realloc succeeded increase buffer size*/
url->buffer_len+=size - rembuff; url->buffer_len+=size - rembuff;
url->buffer=newbuff; url->buffer=newbuff;
} }
@@ -131,7 +135,7 @@ static int fill_buffer(URL_FILE *file, size_t want)
CURLMcode mc; /* curl_multi_fdset() return code */ CURLMcode mc; /* curl_multi_fdset() return code */
/* only attempt to fill buffer if transactions still running and buffer /* only attempt to fill buffer if transactions still running and buffer
* doesnt exceed required size already * doesn't exceed required size already
*/ */
if((!file->still_running) || (file->buffer_pos > want)) if((!file->still_running) || (file->buffer_pos > want))
return 0; return 0;
@@ -205,14 +209,12 @@ static int fill_buffer(URL_FILE *file, size_t want)
} }
/* use to remove want bytes from the front of a files buffer */ /* use to remove want bytes from the front of a files buffer */
static int use_buffer(URL_FILE *file,int want) static int use_buffer(URL_FILE *file, size_t want)
{ {
/* sort out buffer */ /* sort out buffer */
if((file->buffer_pos - want) <=0) { if((file->buffer_pos - want) <=0) {
/* ditch buffer - write will recreate */ /* ditch buffer - write will recreate */
if(file->buffer) free(file->buffer);
free(file->buffer);
file->buffer=NULL; file->buffer=NULL;
file->buffer_pos=0; file->buffer_pos=0;
file->buffer_len=0; file->buffer_len=0;
@@ -231,7 +233,7 @@ static int use_buffer(URL_FILE *file,int want)
URL_FILE *url_fopen(const char *url,const char *operation) URL_FILE *url_fopen(const char *url,const char *operation)
{ {
/* this code could check for URLs or types in the 'url' and /* this code could check for URLs or types in the 'url' and
basicly use the real fopen() for standard files */ basically use the real fopen() for standard files */
URL_FILE *file; URL_FILE *file;
(void)operation; (void)operation;
@@ -302,9 +304,7 @@ int url_fclose(URL_FILE *file)
break; break;
} }
if(file->buffer) free(file->buffer);/* free any allocated buffer space */
free(file->buffer);/* free any allocated buffer space */
free(file); free(file);
return ret; return ret;
@@ -379,7 +379,7 @@ char *url_fgets(char *ptr, size_t size, URL_FILE *file)
switch(file->type) { switch(file->type) {
case CFTYPE_FILE: case CFTYPE_FILE:
ptr = fgets(ptr,size,file->handle.file); ptr = fgets(ptr, (int)size, file->handle.file);
break; break;
case CFTYPE_CURL: case CFTYPE_CURL:
@@ -435,9 +435,7 @@ void url_rewind(URL_FILE *file)
curl_multi_add_handle(multi_handle, file->handle.curl); curl_multi_add_handle(multi_handle, file->handle.curl);
/* ditch buffer - write will recreate - resets stream pos*/ /* ditch buffer - write will recreate - resets stream pos*/
if(file->buffer) free(file->buffer);
free(file->buffer);
file->buffer=NULL; file->buffer=NULL;
file->buffer_pos=0; file->buffer_pos=0;
file->buffer_len=0; file->buffer_len=0;
@@ -457,7 +455,7 @@ int main(int argc, char *argv[])
URL_FILE *handle; URL_FILE *handle;
FILE *outf; FILE *outf;
int nread; size_t nread;
char buffer[256]; char buffer[256];
const char *url; const char *url;
@@ -505,7 +503,7 @@ int main(int argc, char *argv[])
} }
do { do {
nread = url_fread(buffer, 1,sizeof(buffer), handle); nread = url_fread(buffer, 1, sizeof(buffer), handle);
fwrite(buffer,1,nread,outf); fwrite(buffer,1,nread,outf);
} while(nread); } while(nread);

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* FTP wildcard pattern matching
* </DESC>
*/
#include <curl/curl.h> #include <curl/curl.h>
#include <stdio.h> #include <stdio.h>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -23,11 +23,9 @@
#include <curl/curl.h> #include <curl/curl.h>
/* /* <DESC>
* This is an example showing how to get a single file from an FTP server. * Get a single file from an FTP server.
* It delays the actual destination file creation until the first write * </DESC>
* callback so that it won't create an empty file in case the remote file
* doesn't exist or something else fails.
*/ */
struct FtpFile { struct FtpFile {
@@ -53,7 +51,7 @@ int main(void)
CURL *curl; CURL *curl;
CURLcode res; CURLcode res;
struct FtpFile ftpfile={ struct FtpFile ftpfile={
"curl.tar.gz", /* name to store the file as if succesful */ "curl.tar.gz", /* name to store the file as if successful */
NULL NULL
}; };

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -24,9 +24,9 @@
#include <curl/curl.h> #include <curl/curl.h>
/* /* <DESC>
* This is an example showing how to check a single file's size and mtime * Checks a single file's size and mtime from an FTP server.
* from an FTP server. * </DESC>
*/ */
static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data) static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -23,13 +23,11 @@
#include <curl/curl.h> #include <curl/curl.h>
/* /* <DESC>
* Similar to ftpget.c but this also stores the received response-lines * Similar to ftpget.c but also stores the received response-lines
* in a separate file using our own callback! * in a separate file using our own callback!
* * </DESC>
* This functionality was introduced in libcurl 7.9.3.
*/ */
static size_t static size_t
write_response(void *ptr, size_t size, size_t nmemb, void *data) write_response(void *ptr, size_t size, size_t nmemb, void *data)
{ {

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -24,11 +24,9 @@
#include <curl/curl.h> #include <curl/curl.h>
/* /* <DESC>
* This is an example showing how to get a single file from an FTPS server. * Get a single file from an FTPS server.
* It delays the actual destination file creation until the first write * </DESC>
* callback so that it won't create an empty file in case the remote file
* doesn't exist or something else fails.
*/ */
struct FtpFile { struct FtpFile {
@@ -55,7 +53,7 @@ int main(void)
CURL *curl; CURL *curl;
CURLcode res; CURLcode res;
struct FtpFile ftpfile={ struct FtpFile ftpfile={
"yourfile.bin", /* name to store the file as if succesful */ "yourfile.bin", /* name to store the file as if successful */
NULL NULL
}; };

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -33,11 +33,10 @@
#include <unistd.h> #include <unistd.h>
#endif #endif
/* /* <DESC>
* This example shows an FTP upload, with a rename of the file just after * Performs an FTP upload and renames the file just after a successful
* a successful upload. * transfer.
* * </DESC>
* Example based on source code provided by Erick Nuwendam. Thanks!
*/ */
#define LOCAL_FILE "/tmp/uploadthis.txt" #define LOCAL_FILE "/tmp/uploadthis.txt"

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,13 +19,9 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* Upload to FTP, resuming failed transfers /* <DESC>
* * Upload to FTP, resuming failed transfers.
* Compile for MinGW like this: * </DESC>
* gcc -Wall -pedantic -std=c99 ftpuploadwithresume.c -o ftpuploadresume.exe
* -lcurl -lmsvcr70
*
* Written by Philip Bock
*/ */
#include <stdlib.h> #include <stdlib.h>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* Use getinfo to get content-type after completed transfer.
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <curl/curl.h> #include <curl/curl.h>
@@ -27,18 +31,14 @@ int main(void)
CURL *curl; CURL *curl;
CURLcode res; CURLcode res;
/* http://curl.haxx.se/libcurl/c/curl_easy_init.html */
curl = curl_easy_init(); curl = curl_easy_init();
if(curl) { if(curl) {
/* http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTURL */
curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/"); curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/");
/* http://curl.haxx.se/libcurl/c/curl_easy_perform.html */
res = curl_easy_perform(curl); res = curl_easy_perform(curl);
if(CURLE_OK == res) { if(CURLE_OK == res) {
char *ct; char *ct;
/* ask for the content-type */ /* ask for the content-type */
/* http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html */
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct); res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
if((CURLE_OK == res) && ct) if((CURLE_OK == res) && ct)
@@ -46,7 +46,6 @@ int main(void)
} }
/* always cleanup */ /* always cleanup */
/* http://curl.haxx.se/libcurl/c/curl_easy_cleanup.html */
curl_easy_cleanup(curl); curl_easy_cleanup(curl);
} }
return 0; return 0;

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,8 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* Example source code to show how the callback function can be used to /* <DESC>
* download data into a chunk of memory instead of storing it in a file. * Shows how the write callback function can be used to download data into a
* chunk of memory instead of storing it in a file.
* </DESC>
*/ */
#include <stdio.h> #include <stdio.h>
@@ -34,7 +36,6 @@ struct MemoryStruct {
size_t size; size_t size;
}; };
static size_t static size_t
WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp) WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)
{ {
@@ -55,7 +56,6 @@ WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)
return realsize; return realsize;
} }
int main(void) int main(void)
{ {
CURL *curl_handle; CURL *curl_handle;
@@ -106,8 +106,7 @@ int main(void)
/* cleanup curl stuff */ /* cleanup curl stuff */
curl_easy_cleanup(curl_handle); curl_easy_cleanup(curl_handle);
if(chunk.memory) free(chunk.memory);
free(chunk.memory);
/* we're done with libcurl, so clean it up */ /* we're done with libcurl, so clean it up */
curl_global_cleanup(); curl_global_cleanup();

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* multi socket API usage together with with glib2
* </DESC>
*/
/* Example application source code using the multi socket interface to /* Example application source code using the multi socket interface to
* download many files at once. * download many files at once.
* *

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* multi socket API usage with libevent 2
* </DESC>
*/
/* Example application source code using the multi socket interface to /* Example application source code using the multi socket interface to
download many files at once. download many files at once.
@@ -326,7 +330,7 @@ static void new_conn(char *url, GlobalInfo *g )
conn->url = strdup(url); conn->url = strdup(url);
curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url); curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb); curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, &conn); curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, conn);
curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L); curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error); curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn); curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -20,13 +20,13 @@
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* Uses the "Streaming HTML parser" to extract the href pieces in a streaming
* manner from a downloaded HTML.
* </DESC>
*/
/* /*
* This example uses the "Streaming HTML parser" to extract the href pieces in * The HTML parser is found at http://code.google.com/p/htmlstreamparser/
* a streaming manner from a downloaded HTML. Kindly donated by Michał
* Kowalczyk.
*
* The parser is found at
* http://code.google.com/p/htmlstreamparser/
*/ */
#include <stdio.h> #include <stdio.h>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,13 +19,12 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* Download a document and use libtidy to parse the HTML. /* <DESC>
* Written by Jeff Pohlmeyer * Download a document and use libtidy to parse the HTML.
* * </DESC>
*/
/*
* LibTidy => http://tidy.sourceforge.net * LibTidy => http://tidy.sourceforge.net
*
* gcc -Wall -I/usr/local/include tidycurl.c -lcurl -ltidy -o tidycurl
*
*/ */
#include <stdio.h> #include <stdio.h>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,8 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
// Get a web page, parse it with libxml. /* <DESC>
// * Get a web page, extract the title with libxml.
* </DESC>
*/
// Written by Lars Nilsson // Written by Lars Nilsson
// //
// GNU C++ compile command line suggestion (edit paths accordingly): // GNU C++ compile command line suggestion (edit paths accordingly):

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* simple HTTP POST using the easy interface
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <curl/curl.h> #include <curl/curl.h>

View File

@@ -0,0 +1,292 @@
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
***************************************************************************/
/* <DESC>
* Multiplexed HTTP/2 downloads over a single connection
* </DESC>
*/
#include <stdio.h>
#include <stdlib.h>
/* somewhat unix-specific */
#include <sys/time.h>
#include <unistd.h>
/* curl stuff */
#include <curl/curl.h>
#ifndef CURLPIPE_MULTIPLEX
/* This little trick will just make sure that we don't enable pipelining for
libcurls old enough to not have this symbol. It is _not_ defined to zero in
a recent libcurl header. */
#define CURLPIPE_MULTIPLEX 0
#endif
#define NUM_HANDLES 1000
void *curl_hnd[NUM_HANDLES];
int num_transfers;
/* a handle to number lookup, highly ineffective when we do many
transfers... */
static int hnd2num(CURL *hnd)
{
int i;
for(i=0; i< num_transfers; i++) {
if(curl_hnd[i] == hnd)
return i;
}
return 0; /* weird, but just a fail-safe */
}
static
void dump(const char *text, int num, unsigned char *ptr, size_t size,
char nohex)
{
size_t i;
size_t c;
unsigned int width=0x10;
if(nohex)
/* without the hex output, we can fit more on screen */
width = 0x40;
fprintf(stderr, "%d %s, %ld bytes (0x%lx)\n",
num, text, (long)size, (long)size);
for(i=0; i<size; i+= width) {
fprintf(stderr, "%4.4lx: ", (long)i);
if(!nohex) {
/* hex not disabled, show it */
for(c = 0; c < width; c++)
if(i+c < size)
fprintf(stderr, "%02x ", ptr[i+c]);
else
fputs(" ", stderr);
}
for(c = 0; (c < width) && (i+c < size); c++) {
/* check for 0D0A; if found, skip past and start a new line of output */
if (nohex && (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
i+=(c+2-width);
break;
}
fprintf(stderr, "%c",
(ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.');
/* check again for 0D0A, to avoid an extra \n if it's at width */
if (nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
i+=(c+3-width);
break;
}
}
fputc('\n', stderr); /* newline */
}
}
static
int my_trace(CURL *handle, curl_infotype type,
char *data, size_t size,
void *userp)
{
const char *text;
int num = hnd2num(handle);
(void)handle; /* prevent compiler warning */
(void)userp;
switch (type) {
case CURLINFO_TEXT:
fprintf(stderr, "== %d Info: %s", num, data);
default: /* in case a new one is introduced to shock us */
return 0;
case CURLINFO_HEADER_OUT:
text = "=> Send header";
break;
case CURLINFO_DATA_OUT:
text = "=> Send data";
break;
case CURLINFO_SSL_DATA_OUT:
text = "=> Send SSL data";
break;
case CURLINFO_HEADER_IN:
text = "<= Recv header";
break;
case CURLINFO_DATA_IN:
text = "<= Recv data";
break;
case CURLINFO_SSL_DATA_IN:
text = "<= Recv SSL data";
break;
}
dump(text, num, (unsigned char *)data, size, 1);
return 0;
}
static void setup(CURL *hnd, int num)
{
FILE *out;
char filename[128];
sprintf(filename, "dl-%d", num);
out = fopen(filename, "wb");
/* write to this file */
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out);
/* set the same URL */
curl_easy_setopt(hnd, CURLOPT_URL, "https://localhost:8443/index.html");
/* send it verbose for max debuggaility */
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace);
/* HTTP/2 please */
curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
/* we use a self-signed test server, skip verification during debugging */
curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
#if (CURLPIPE_MULTIPLEX > 0)
/* wait for pipe connection to confirm */
curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);
#endif
curl_hnd[num] = hnd;
}
/*
* Simply download two files over HTTP/2, using the same physical connection!
*/
int main(int argc, char **argv)
{
CURL *easy[NUM_HANDLES];
CURLM *multi_handle;
int i;
int still_running; /* keep number of running handles */
if(argc > 1)
/* if given a number, do that many transfers */
num_transfers = atoi(argv[1]);
if(!num_transfers || (num_transfers > NUM_HANDLES))
num_transfers = 3; /* a suitable low default */
/* init a multi stack */
multi_handle = curl_multi_init();
for(i=0; i<num_transfers; i++) {
easy[i] = curl_easy_init();
/* set options */
setup(easy[i], i);
/* add the individual transfer */
curl_multi_add_handle(multi_handle, easy[i]);
}
curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
/* we start some action by calling perform right away */
curl_multi_perform(multi_handle, &still_running);
do {
struct timeval timeout;
int rc; /* select() return code */
CURLMcode mc; /* curl_multi_fdset() return code */
fd_set fdread;
fd_set fdwrite;
fd_set fdexcep;
int maxfd = -1;
long curl_timeo = -1;
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
FD_ZERO(&fdexcep);
/* set a suitable timeout to play around with */
timeout.tv_sec = 1;
timeout.tv_usec = 0;
curl_multi_timeout(multi_handle, &curl_timeo);
if(curl_timeo >= 0) {
timeout.tv_sec = curl_timeo / 1000;
if(timeout.tv_sec > 1)
timeout.tv_sec = 1;
else
timeout.tv_usec = (curl_timeo % 1000) * 1000;
}
/* get file descriptors from the transfers */
mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
if(mc != CURLM_OK)
{
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
break;
}
/* On success the value of maxfd is guaranteed to be >= -1. We call
select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
to sleep 100ms, which is the minimum suggested value in the
curl_multi_fdset() doc. */
if(maxfd == -1) {
#ifdef _WIN32
Sleep(100);
rc = 0;
#else
/* Portable sleep for platforms other than Windows. */
struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
rc = select(0, NULL, NULL, NULL, &wait);
#endif
}
else {
/* Note that on some platforms 'timeout' may be modified by select().
If you need access to the original value save a copy beforehand. */
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
}
switch(rc) {
case -1:
/* select error */
break;
case 0:
default:
/* timeout or readable/writable sockets */
curl_multi_perform(multi_handle, &still_running);
break;
}
} while(still_running);
curl_multi_cleanup(multi_handle);
for(i=0; i<num_transfers; i++)
curl_easy_cleanup(easy[i]);
return 0;
}

View File

@@ -0,0 +1,317 @@
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
***************************************************************************/
/* <DESC>
* HTTP/2 server push
* </DESC>
*/
#include <stdio.h>
#include <stdlib.h>
/* somewhat unix-specific */
#include <sys/time.h>
#include <unistd.h>
/* curl stuff */
#include <curl/curl.h>
#ifndef CURLPIPE_MULTIPLEX
#error "too old libcurl, can't do HTTP/2 server push!"
#endif
static
void dump(const char *text, unsigned char *ptr, size_t size,
char nohex)
{
size_t i;
size_t c;
unsigned int width=0x10;
if(nohex)
/* without the hex output, we can fit more on screen */
width = 0x40;
fprintf(stderr, "%s, %ld bytes (0x%lx)\n",
text, (long)size, (long)size);
for(i=0; i<size; i+= width) {
fprintf(stderr, "%4.4lx: ", (long)i);
if(!nohex) {
/* hex not disabled, show it */
for(c = 0; c < width; c++)
if(i+c < size)
fprintf(stderr, "%02x ", ptr[i+c]);
else
fputs(" ", stderr);
}
for(c = 0; (c < width) && (i+c < size); c++) {
/* check for 0D0A; if found, skip past and start a new line of output */
if (nohex && (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
i+=(c+2-width);
break;
}
fprintf(stderr, "%c",
(ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.');
/* check again for 0D0A, to avoid an extra \n if it's at width */
if (nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
i+=(c+3-width);
break;
}
}
fputc('\n', stderr); /* newline */
}
}
static
int my_trace(CURL *handle, curl_infotype type,
char *data, size_t size,
void *userp)
{
const char *text;
(void)handle; /* prevent compiler warning */
(void)userp;
switch (type) {
case CURLINFO_TEXT:
fprintf(stderr, "== Info: %s", data);
default: /* in case a new one is introduced to shock us */
return 0;
case CURLINFO_HEADER_OUT:
text = "=> Send header";
break;
case CURLINFO_DATA_OUT:
text = "=> Send data";
break;
case CURLINFO_SSL_DATA_OUT:
text = "=> Send SSL data";
break;
case CURLINFO_HEADER_IN:
text = "<= Recv header";
break;
case CURLINFO_DATA_IN:
text = "<= Recv data";
break;
case CURLINFO_SSL_DATA_IN:
text = "<= Recv SSL data";
break;
}
dump(text, (unsigned char *)data, size, 1);
return 0;
}
static void setup(CURL *hnd)
{
FILE *out = fopen("dl", "wb");
/* write to this file */
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out);
/* set the same URL */
curl_easy_setopt(hnd, CURLOPT_URL, "https://localhost:8443/index.html");
/* send it verbose for max debuggaility */
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace);
/* HTTP/2 please */
curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
/* we use a self-signed test server, skip verification during debugging */
curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
#if (CURLPIPE_MULTIPLEX > 0)
/* wait for pipe connection to confirm */
curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);
#endif
}
/* called when there's an incoming push */
static int server_push_callback(CURL *parent,
CURL *easy,
size_t num_headers,
struct curl_pushheaders *headers,
void *userp)
{
char *headp;
size_t i;
int *transfers = (int *)userp;
char filename[128];
FILE *out;
static unsigned int count = 0;
(void)parent; /* we have no use for this */
sprintf(filename, "push%u", count++);
/* here's a new stream, save it in a new file for each new push */
out = fopen(filename, "wb");
/* write to this file */
curl_easy_setopt(easy, CURLOPT_WRITEDATA, out);
fprintf(stderr, "**** push callback approves stream %u, got %d headers!\n",
count, (int)num_headers);
for(i=0; i<num_headers; i++) {
headp = curl_pushheader_bynum(headers, i);
fprintf(stderr, "**** header %u: %s\n", (int)i, headp);
}
headp = curl_pushheader_byname(headers, ":path");
if(headp) {
fprintf(stderr, "**** The PATH is %s\n", headp /* skip :path + colon */ );
}
(*transfers)++; /* one more */
return CURL_PUSH_OK;
}
/*
* Download a file over HTTP/2, take care of server push.
*/
int main(void)
{
CURL *easy;
CURLM *multi_handle;
int still_running; /* keep number of running handles */
int transfers=1; /* we start with one */
struct CURLMsg *m;
/* init a multi stack */
multi_handle = curl_multi_init();
easy = curl_easy_init();
/* set options */
setup(easy);
/* add the easy transfer */
curl_multi_add_handle(multi_handle, easy);
curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
curl_multi_setopt(multi_handle, CURLMOPT_PUSHFUNCTION, server_push_callback);
curl_multi_setopt(multi_handle, CURLMOPT_PUSHDATA, &transfers);
/* we start some action by calling perform right away */
curl_multi_perform(multi_handle, &still_running);
do {
struct timeval timeout;
int rc; /* select() return code */
CURLMcode mc; /* curl_multi_fdset() return code */
fd_set fdread;
fd_set fdwrite;
fd_set fdexcep;
int maxfd = -1;
long curl_timeo = -1;
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
FD_ZERO(&fdexcep);
/* set a suitable timeout to play around with */
timeout.tv_sec = 1;
timeout.tv_usec = 0;
curl_multi_timeout(multi_handle, &curl_timeo);
if(curl_timeo >= 0) {
timeout.tv_sec = curl_timeo / 1000;
if(timeout.tv_sec > 1)
timeout.tv_sec = 1;
else
timeout.tv_usec = (curl_timeo % 1000) * 1000;
}
/* get file descriptors from the transfers */
mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
if(mc != CURLM_OK) {
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
break;
}
/* On success the value of maxfd is guaranteed to be >= -1. We call
select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
to sleep 100ms, which is the minimum suggested value in the
curl_multi_fdset() doc. */
if(maxfd == -1) {
#ifdef _WIN32
Sleep(100);
rc = 0;
#else
/* Portable sleep for platforms other than Windows. */
struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
rc = select(0, NULL, NULL, NULL, &wait);
#endif
}
else {
/* Note that on some platforms 'timeout' may be modified by select().
If you need access to the original value save a copy beforehand. */
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
}
switch(rc) {
case -1:
/* select error */
break;
case 0:
default:
/* timeout or readable/writable sockets */
curl_multi_perform(multi_handle, &still_running);
break;
}
/*
* A little caution when doing server push is that libcurl itself has
* created and added one or more easy handles but we need to clean them up
* when we are done.
*/
do {
int msgq = 0;;
m = curl_multi_info_read(multi_handle, &msgq);
if(m && (m->msg == CURLMSG_DONE)) {
CURL *e = m->easy_handle;
transfers--;
curl_multi_remove_handle(multi_handle, e);
curl_easy_cleanup(e);
}
} while(m);
} while(transfers); /* as long as we have transfers going */
curl_multi_cleanup(multi_handle);
return 0;
}

View File

@@ -0,0 +1,356 @@
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
***************************************************************************/
/* <DESC>
* Multiplexed HTTP/2 uploads over a single connection
* </DESC>
*/
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/stat.h>
/* somewhat unix-specific */
#include <sys/time.h>
#include <unistd.h>
/* curl stuff */
#include <curl/curl.h>
#ifndef CURLPIPE_MULTIPLEX
/* This little trick will just make sure that we don't enable pipelining for
libcurls old enough to not have this symbol. It is _not_ defined to zero in
a recent libcurl header. */
#define CURLPIPE_MULTIPLEX 0
#endif
#define NUM_HANDLES 1000
void *curl_hnd[NUM_HANDLES];
int num_transfers;
/* a handle to number lookup, highly ineffective when we do many
transfers... */
static int hnd2num(CURL *hnd)
{
int i;
for(i=0; i< num_transfers; i++) {
if(curl_hnd[i] == hnd)
return i;
}
return 0; /* weird, but just a fail-safe */
}
static
void dump(const char *text, int num, unsigned char *ptr, size_t size,
char nohex)
{
size_t i;
size_t c;
unsigned int width=0x10;
if(nohex)
/* without the hex output, we can fit more on screen */
width = 0x40;
fprintf(stderr, "%d %s, %ld bytes (0x%lx)\n",
num, text, (long)size, (long)size);
for(i=0; i<size; i+= width) {
fprintf(stderr, "%4.4lx: ", (long)i);
if(!nohex) {
/* hex not disabled, show it */
for(c = 0; c < width; c++)
if(i+c < size)
fprintf(stderr, "%02x ", ptr[i+c]);
else
fputs(" ", stderr);
}
for(c = 0; (c < width) && (i+c < size); c++) {
/* check for 0D0A; if found, skip past and start a new line of output */
if (nohex && (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
i+=(c+2-width);
break;
}
fprintf(stderr, "%c",
(ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.');
/* check again for 0D0A, to avoid an extra \n if it's at width */
if (nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
i+=(c+3-width);
break;
}
}
fputc('\n', stderr); /* newline */
}
}
static
int my_trace(CURL *handle, curl_infotype type,
char *data, size_t size,
void *userp)
{
char timebuf[20];
const char *text;
int num = hnd2num(handle);
static time_t epoch_offset;
static int known_offset;
struct timeval tv;
time_t secs;
struct tm *now;
(void)handle; /* prevent compiler warning */
(void)userp;
gettimeofday(&tv, NULL);
if(!known_offset) {
epoch_offset = time(NULL) - tv.tv_sec;
known_offset = 1;
}
secs = epoch_offset + tv.tv_sec;
now = localtime(&secs); /* not thread safe but we don't care */
snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld",
now->tm_hour, now->tm_min, now->tm_sec, (long)tv.tv_usec);
switch (type) {
case CURLINFO_TEXT:
fprintf(stderr, "%s [%d] Info: %s", timebuf, num, data);
default: /* in case a new one is introduced to shock us */
return 0;
case CURLINFO_HEADER_OUT:
text = "=> Send header";
break;
case CURLINFO_DATA_OUT:
text = "=> Send data";
break;
case CURLINFO_SSL_DATA_OUT:
text = "=> Send SSL data";
break;
case CURLINFO_HEADER_IN:
text = "<= Recv header";
break;
case CURLINFO_DATA_IN:
text = "<= Recv data";
break;
case CURLINFO_SSL_DATA_IN:
text = "<= Recv SSL data";
break;
}
dump(text, num, (unsigned char *)data, size, 1);
return 0;
}
struct input {
FILE *in;
size_t bytes_read; /* count up */
CURL *hnd;
};
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
{
struct input *i = userp;
size_t retcode = fread(ptr, size, nmemb, i->in);
i->bytes_read += retcode;
return retcode;
}
struct input indata[NUM_HANDLES];
static void setup(CURL *hnd, int num, const char *upload)
{
FILE *out;
char url[256];
char filename[128];
struct stat file_info;
curl_off_t uploadsize;
sprintf(filename, "dl-%d", num);
out = fopen(filename, "wb");
sprintf(url, "https://localhost:8443/upload-%d", num);
/* get the file size of the local file */
stat(upload, &file_info);
uploadsize = file_info.st_size;
indata[num].in = fopen(upload, "rb");
indata[num].hnd = hnd;
/* write to this file */
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out);
/* we want to use our own read function */
curl_easy_setopt(hnd, CURLOPT_READFUNCTION, read_callback);
/* read from this file */
curl_easy_setopt(hnd, CURLOPT_READDATA, &indata[num]);
/* provide the size of the upload */
curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, uploadsize);
/* send in the URL to store the upload as */
curl_easy_setopt(hnd, CURLOPT_URL, url);
/* upload please */
curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L);
/* send it verbose for max debuggaility */
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace);
/* HTTP/2 please */
curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
/* we use a self-signed test server, skip verification during debugging */
curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
#if (CURLPIPE_MULTIPLEX > 0)
/* wait for pipe connection to confirm */
curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);
#endif
curl_hnd[num] = hnd;
}
/*
* Upload all files over HTTP/2, using the same physical connection!
*/
int main(int argc, char **argv)
{
CURL *easy[NUM_HANDLES];
CURLM *multi_handle;
int i;
int still_running; /* keep number of running handles */
const char *filename = "index.html";
if(argc > 1)
/* if given a number, do that many transfers */
num_transfers = atoi(argv[1]);
if(argc > 2)
/* if given a file name, upload this! */
filename = argv[2];
if(!num_transfers || (num_transfers > NUM_HANDLES))
num_transfers = 3; /* a suitable low default */
/* init a multi stack */
multi_handle = curl_multi_init();
for(i=0; i<num_transfers; i++) {
easy[i] = curl_easy_init();
/* set options */
setup(easy[i], i, filename);
/* add the individual transfer */
curl_multi_add_handle(multi_handle, easy[i]);
}
curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
/* We do HTTP/2 so let's stick to one connection per host */
curl_multi_setopt(multi_handle, CURLMOPT_MAX_HOST_CONNECTIONS, 1L);
/* we start some action by calling perform right away */
curl_multi_perform(multi_handle, &still_running);
do {
struct timeval timeout;
int rc; /* select() return code */
CURLMcode mc; /* curl_multi_fdset() return code */
fd_set fdread;
fd_set fdwrite;
fd_set fdexcep;
int maxfd = -1;
long curl_timeo = -1;
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
FD_ZERO(&fdexcep);
/* set a suitable timeout to play around with */
timeout.tv_sec = 1;
timeout.tv_usec = 0;
curl_multi_timeout(multi_handle, &curl_timeo);
if(curl_timeo >= 0) {
timeout.tv_sec = curl_timeo / 1000;
if(timeout.tv_sec > 1)
timeout.tv_sec = 1;
else
timeout.tv_usec = (curl_timeo % 1000) * 1000;
}
/* get file descriptors from the transfers */
mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
if(mc != CURLM_OK)
{
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
break;
}
/* On success the value of maxfd is guaranteed to be >= -1. We call
select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
to sleep 100ms, which is the minimum suggested value in the
curl_multi_fdset() doc. */
if(maxfd == -1) {
#ifdef _WIN32
Sleep(100);
rc = 0;
#else
/* Portable sleep for platforms other than Windows. */
struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
rc = select(0, NULL, NULL, NULL, &wait);
#endif
}
else {
/* Note that on some platforms 'timeout' may be modified by select().
If you need access to the original value save a copy beforehand. */
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
}
switch(rc) {
case -1:
/* select error */
break;
case 0:
default:
/* timeout or readable/writable sockets */
curl_multi_perform(multi_handle, &still_running);
break;
}
} while(still_running);
curl_multi_cleanup(multi_handle);
for(i=0; i<num_transfers; i++)
curl_easy_cleanup(easy[i]);
return 0;
}

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* HTTP request with custom modified, removed and added headers
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <curl/curl.h> #include <curl/curl.h>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* HTTP PUT with easy interface and read callback
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/stat.h> #include <sys/stat.h>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* Simple HTTPS GET
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <curl/curl.h> #include <curl/curl.h>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* Simple IMAP APPEND use
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <curl/curl.h> #include <curl/curl.h>

View File

@@ -60,7 +60,7 @@ int main(void)
* they have mentioned in their server certificate's commonName (or * they have mentioned in their server certificate's commonName (or
* subjectAltName) fields, libcurl will refuse to connect. You can skip * subjectAltName) fields, libcurl will refuse to connect. You can skip
* this check, but this will make the connection less secure. */ * this check, but this will make the connection less secure. */
#ifdef SKIP_HOSTNAME_VERFICATION #ifdef SKIP_HOSTNAME_VERIFICATION
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
#endif #endif

View File

@@ -19,10 +19,6 @@
# KIND, either express or implied. # KIND, either express or implied.
# #
########################################################################### ###########################################################################
#
# Adapted for djgpp / Watt-32 / DOS by
# Gisle Vanem <gvanem@broadpark.no>
#
TOPDIR = ../.. TOPDIR = ../..

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,7 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* This is an example showing the multi interface and the debug callback. */ /* <DESC>
* multi interface and debug callback
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* multi interface code doing two parallel HTTP transfers
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,8 +19,11 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* This is an example application source code using the multi interface /* <DESC>
* to do a multipart formpost without "blocking". */ * using the multi interface to do a multipart formpost without blocking
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <sys/time.h> #include <sys/time.h>
@@ -64,7 +67,7 @@ int main(void)
curl = curl_easy_init(); curl = curl_easy_init();
multi_handle = curl_multi_init(); multi_handle = curl_multi_init();
/* initalize custom header list (stating that Expect: 100-continue is not /* initialize custom header list (stating that Expect: 100-continue is not
wanted */ wanted */
headerlist = curl_slist_append(headerlist, buf); headerlist = curl_slist_append(headerlist, buf);
if(curl && multi_handle) { if(curl && multi_handle) {

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,7 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* This is a very simple example using the multi interface. */ /* <DESC>
* using the multi interface to do a single download
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@@ -76,12 +79,12 @@ int main(void)
if(mc != CURLM_OK) if(mc != CURLM_OK)
{ {
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc); fprintf(stderr, "curl_multi_wait() failed, code %d.\n", mc);
break; break;
} }
/* 'numfds' being zero means either a timeout or no file descriptors to /* 'numfds' being zero means either a timeout or no file descriptors to
wait for. Try timeout on first occurance, then assume no file wait for. Try timeout on first occurrence, then assume no file
descriptors and no file descriptors to wait for means wait for 100 descriptors and no file descriptors to wait for means wait for 100
milliseconds. */ milliseconds. */

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -20,6 +20,10 @@
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* multi_socket API using libuv
* </DESC>
*/
/* Example application code using the multi socket interface to download /* Example application code using the multi socket interface to download
multiple files at once, but instead of using curl_multi_perform and multiple files at once, but instead of using curl_multi_perform and
curl_multi_wait, which uses select(), we use libuv. curl_multi_wait, which uses select(), we use libuv.

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,8 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* A multi-threaded example that uses pthreads extensively to fetch /* <DESC>
* X remote files at once */ * A multi-threaded example that uses pthreads to fetch several files at once
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <pthread.h> #include <pthread.h>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,16 +19,17 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* Example source code to show one way to set the necessary OpenSSL locking /* <DESC>
* callbacks if you want to do multi-threaded transfers with HTTPS/FTPS with * one way to set the necessary OpenSSL locking callbacks if you want to do
* libcurl built to use OpenSSL. * multi-threaded transfers with HTTPS/FTPS with libcurl built to use OpenSSL.
* * </DESC>
*/
/*
* This is not a complete stand-alone example. * This is not a complete stand-alone example.
* *
* Author: Jeremy Brown * Author: Jeremy Brown
*/ */
#include <stdio.h> #include <stdio.h>
#include <pthread.h> #include <pthread.h>
#include <openssl/err.h> #include <openssl/err.h>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,6 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* <DESC>
* re-using handles to do HTTP persistent connections
* </DESC>
*/
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <curl/curl.h> #include <curl/curl.h>

View File

@@ -69,7 +69,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
/* This will retreive message 1 from the user's mailbox */ /* This will retrieve message 1 from the user's mailbox */
curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1"); curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
/* Tell the multi stack about our easy handle */ /* Tell the multi stack about our easy handle */

View File

@@ -39,7 +39,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
/* This will retreive message 1 from the user's mailbox */ /* This will retrieve message 1 from the user's mailbox */
curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1"); curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
/* Perform the retr */ /* Perform the retr */

View File

@@ -40,7 +40,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
/* This will retreive message 1 from the user's mailbox. Note the use of /* This will retrieve message 1 from the user's mailbox. Note the use of
* pop3s:// rather than pop3:// to request a SSL based connection. */ * pop3s:// rather than pop3:// to request a SSL based connection. */
curl_easy_setopt(curl, CURLOPT_URL, "pop3s://pop.example.com/1"); curl_easy_setopt(curl, CURLOPT_URL, "pop3s://pop.example.com/1");
@@ -60,7 +60,7 @@ int main(void)
* they have mentioned in their server certificate's commonName (or * they have mentioned in their server certificate's commonName (or
* subjectAltName) fields, libcurl will refuse to connect. You can skip * subjectAltName) fields, libcurl will refuse to connect. You can skip
* this check, but this will make the connection less secure. */ * this check, but this will make the connection less secure. */
#ifdef SKIP_HOSTNAME_VERFICATION #ifdef SKIP_HOSTNAME_VERIFICATION
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
#endif #endif

View File

@@ -40,7 +40,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_USERNAME, "user"); curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
/* This will retreive message 1 from the user's mailbox */ /* This will retrieve message 1 from the user's mailbox */
curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1"); curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
/* In this example, we'll start with a plain text connection, and upgrade /* In this example, we'll start with a plain text connection, and upgrade

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@@ -19,8 +19,10 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
***************************************************************************/ ***************************************************************************/
/* An example source code that issues a HTTP POST and we provide the actual /* <DESC>
* An example source code that issues a HTTP POST and we provide the actual
* data through a read callback. * data through a read callback.
* </DESC>
*/ */
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

Some files were not shown because too many files have changed in this diff Show More