Compare commits

...

299 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
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
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
Daniel Stenberg
e58bd8e41a Merge branch 'master' into HTTPS-proxy 2015-06-30 00:32:37 +02: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
332 changed files with 9820 additions and 3100 deletions

62
.gitignore vendored
View File

@@ -1,51 +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
*~
aclocal.m4.bak
CHANGES.dist
.project
.cproject
.settings
.dirstamp
test-driver test-driver
/build/
/builds/

View File

@@ -1,5 +1,15 @@
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

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

@@ -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

@@ -122,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)
@@ -186,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)
@@ -355,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)
@@ -365,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)
@@ -448,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()
@@ -463,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)
@@ -496,7 +500,7 @@ if(CMAKE_USE_GSSAPI)
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)
@@ -532,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}")
@@ -552,12 +556,25 @@ else()
unset(USE_UNIX_SOCKETS CACHE) unset(USE_UNIX_SOCKETS CACHE)
endif() endif()
# Check for header files # Check for header files
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("ws2tcpip.h" HAVE_WS2TCPIP_H)
check_include_file_concat("winsock2.h" HAVE_WINSOCK2_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("stdio.h" HAVE_STDIO_H)
@@ -1136,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
@@ -1146,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.

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

View File

@@ -1,81 +1,73 @@
Curl and libcurl 7.44.0 Curl and libcurl 7.46.0
Public curl releases: 148 Public curl releases: 150
Command line options: 176 Command line options: 177
curl_easy_setopt() options: 219 curl_easy_setopt() options: 221
Public functions in libcurl: 58 Public functions in libcurl: 61
Contributors: 1291 Contributors: 1322
This release includes the following changes: This release includes the following changes:
o http2: added CURLMOPT_PUSHFUNCTION and CURLMOPT_PUSHDATA [6] o configure: build silently by default
o examples: added http2-serverpush.c [7] o cookies: Add support for Publix Suffix List with libpsl
o http2: added curl_pushheader_byname() and curl_pushheader_bynum() o vtls: added support for mbedTLS [7]
o docs: added CODE_OF_CONDUCT.md [8] o Added CURLOPT_STREAM_DEPENDS [8]
o curl: Add --ssl-no-revoke to disable certificate revocation checks [5] o Added CURLOPT_STREAM_DEPENDS_E [9]
o libcurl: New value CURLSSLOPT_NO_REVOKE for CURLOPT_SSL_OPTIONS [9] o Added CURLOPT_STREAM_WEIGHT [10]
o makefile: Added support for VC14 o Added CURLFORM_CONTENTLEN [14]
o build: Added Visual Studio 2015 (VC14) project files o oauth2: Added support for OAUTHBEARER SASL mechanism to IMAP, POP3 and SNMP
o build: Added wolfSSL configurations to VC10+ project files [18]
This release includes the following bugfixes: This release includes the following bugfixes:
o FTP: fix HTTP CONNECT logic regression [1] o des: Fix header conditional for Curl_des_set_odd_parity
o openssl: Fix build with openssl < ~ 0.9.8f o ntlm: get rid of unconditional use of long long [1]
o openssl: fix build with BoringSSL o CURLOPT_CERTINFO.3: fix reference to CURLINFO_CERTINFO
o curl_easy_setopt.3: option order doesn't matter o docs: CURLINFO_LASTSOCKET => CURLINFO_ACTIVESOCKET [2]
o openssl: fix use of uninitialized buffer [2] o http2: Fix http2_recv to return -1 if recv returned -1
o RTSP: removed dead code o curl_global_init_mem: set function pointers before doing init
o Makefile.m32: add support for CURL_LDFLAG_EXTRAS o ntlm: error out without 64bit support as the code needs it [1]
o curl: always provide negotiate/kerberos options o openssl: Fix set up of pkcs12 certificate verification chain
o cookie: Fix bug in export if any-domain cookie is present o acinclude: remove PKGCONFIG override [3]
o curl_easy_setopt.3: mention CURLOPT_PIPEWAIT o test1531: case the size to fix the test on non-largefile builds
o INSTALL: Advise use of non-native SSL for Windows <= XP o fread_func: move callback pointer from set to state struct [4]
o tool_help: fix --tlsv1 help text to use >= for TLSv1 o test1601: fix compilation with --enable-debug and --disable-crypto-auth
o HTTP: POSTFIELDSIZE set after added to multi handle [3] o http2: Don't pass unitialized name+len pairs to nghttp2_submit_request [5]
o SSL-PROBLEMS: mention WinSSL problems in WinXP o curlbuild.h: Fix non-configure compiling to mips and sh4 targets
o setup-vms.h: Symbol case fixups o tool: Generate easysrc with last cache linked-list [6]
o SSL: Pinned public key hash support o cmake: Fix for add_subdirectory(curl) use-case
o libtest: call PR_Cleanup() on exit if NSPR is used o vtls: fix compiler warning for TLS backends without sha256
o ntlm_wb: Fix theoretical memory leak o build: fix for MSDOS/djgpp
o runtests: Allow for spaces in curl custom path o checksrc: add crude // detection
o http2: add stream != NULL checks for reliability o http2: on_frame_recv: trust the conn/data input
o schannel: Replace deprecated GetVersion with VerifyVersionInfo o ftp: allow CURLOPT_IGNORE_CONTENT_LENGTH to ignore size [11]
o http2: verify success of strchr() in http2_send() o polarssl/mbedtls: fix name space pollution
o configure: add --disable-rt option o build: Fix mingw ssl gdi32 order [12]
o openssl: work around MSVC warning o build: Fix support for PKG_CONFIG
o HTTP: ignore "Content-Encoding: compress" o MacOSX-Framework: sdk regex fix for sdk 10.10 and later
o configure: check if OpenSSL linking wants -ldl o socks: Fix incorrect port numbers in failed connect messages
o build-openssl.bat: Show syntax if required args are missing o curl.1: -E: s/private certificate/client certificate
o test1902: attempt to make the test more reliable o curl.h: s/HTTPPOST_/CURL_HTTPOST_ [13]
o libcurl-thread.3: Consolidate thread safety info o curl_formadd: support >2GB files on windows [14]
o maketgz: Fixed some VC makefiles missing from the release tarball o http redirects: %-encode bytes outside of ascii range [15]
o libcurl-multi.3: mention curl_multi_wait [10] o rawstr: Speed up Curl_raw_toupper by 40%
o ABI doc: use secure URL o curl_ntlm_core: fix 2 curl_off_t constant overflows.
o http: move HTTP/2 cleanup code off http_disconnect() [11] o getinfo: CURLINFO_ACTIVESOCKET: fix bad socket value
o libcurl-thread.3: Warn memory functions must be thread safe [12] o tftp tests: verify sent options too
o curl_global_init_mem.3: Warn threaded resolver needs thread safe funcs [13] o imap: Don't call imap_atom() when no mailbox specified in LIST command
o docs: formpost needs the full size at start of upload [14] o imap: Fixed double quote in LIST command when mailbox contains spaces
o curl_gssapi: remove 'const' to fix compiler warnings o imap: Don't check for continuation when executing a CUSTOMREQUEST [16]
o SSH: three state machine fixups [15] o acinclude: Remove check for 16-bit curl_off_t
o libcurl.3: fix a single typo [16] o BoringSSL: Work with stricter BIO_get_mem_data() [17]
o generate.bat: Only clean prerequisite files when in ALL mode o cmake: Add missing feature macros in config header [18]
o curl_slist_append.3: add error checking to the example o sasl_sspi: fixed unicode build for digest authentication [19]
o buildconf.bat: Added support for file clean-up via -clean o sasl_sspi: fix identity memory leak in digest authentication
o generate.bat: Use buildconf.bat for prerequisite file clean-up o unit1602: Fixed failure in torture test
o NTLM: handle auth for only a single request [17] o unit1603: Added unit tests for hash functions
o curl_multi_remove_handle.3: fix formatting [19] o vtls/openssl: remove unused traces of yassl ifdefs
o checksrc.bat: Fixed error when [directory] isn't a curl source directory o openssl: remove #ifdefs for < 0.9.7 support
o checksrc.bat: Fixed error when missing *.c and *.h files o typecheck-gcc.h: add some missing options
o CURLOPT_RESOLVE.3: Note removal support was added in 7.42 [20] o curl: mark two more options strings for --libcurl output
o test46: update cookie expire time o openssl: Free modules on cleanup [20]
o SFTP: fix range request off-by-one in size check [21]
o CMake: fix GSSAPI builds [22]
o build: refer to fixed libidn versions [4]
o http2: discard frames with no SessionHandle [23]
o curl_easy_recv.3: fix formatting
o libcurl-tutorial.3: fix formatting [24]
o curl_formget.3: correct return code [25]
This release includes the following known bugs: This release includes the following known bugs:
@@ -84,41 +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:
Anders Bakken, Cédric Connes, Dan Fandrich, Daniel Stenberg, David Woodhouse, Anders Bakken, Dan Fandrich, Daniel Hwang, Daniel Stenberg, Dmitry S. Baikov,
Eric Ridge, Feist Josselin, Gustavo Grieco, Inca R, Isaac Boukris, Douglas Creager, Erik Johansson, Gisle Vanem, Javier G. Sogo, John Levon,
Jakub Zakrzewski, John E. Malmberg, Kamil Dudka, Lior Kaplan, Marcel Raad, Jonas Minnberg, Justin Ehlert, Kamil Dudka, Kang Lin, Kurt Fankhauser,
Michael Kaufmann, Michał Fita, Patrick Monnerat, Paul Howarth, Ray Satiro, Lauri Kasanen, Marcel Raad, Patrick Monnerat, Rainer Jung, Ray Satiro,
Roger Leigh, Stefan Bühler, Štefan Kremeň, Steve Holme, Svyatoslav Mishyn, Richard Hosking, Sebastian Pohlschmidt, Stefan Bühler, Steve Holme,
Tatsuhiro Tsujikawa, Terri Oda, Tim Stack, TJ Saunders, Tomas Tomecek, Svyatoslav Mishyn, Tatsuhiro Tsujikawa, Tim Rühsen, xiangbin li,
Viktor Szakáts, (28 contributors)
(31 contributors)
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] = https://github.com/bagder/curl/issues/278 [1] = http://curl.haxx.se/bug/?i=478
[2] = https://github.com/bagder/curl/issues/318 [2] = http://curl.haxx.se/bug/?i=479
[3] = http://curl.haxx.se/mail/lib-2015-06/0122.html [3] = http://curl.haxx.se/mail/lib-2015-10/0035.html
[4] = http://curl.haxx.se/bug/?i=371 [4] = http://curl.haxx.se/bug/?i=346
[5] = https://github.com/bagder/curl/issues/264 [5] = http://curl.haxx.se/bug/?i=493
[6] = http://curl.haxx.se/libcurl/c/CURLMOPT_PUSHFUNCTION.html [6] = http://curl.haxx.se/bug/?i=452
[7] = http://curl.haxx.se/libcurl/c/http2-serverpush.html [7] = http://curl.haxx.se/bug/?i=496
[8] = https://github.com/bagder/curl/blob/master/docs/CODE_OF_CONDUCT.md [8] = http://curl.haxx.se/libcurl/c/CURLOPT_STREAM_DEPENDS.html
[9] = http://curl.haxx.se/libcurl/c/CURLOPT_SSL_OPTIONS.html [9] = http://curl.haxx.se/libcurl/c/CURLOPT_STREAM_DEPENDS_E.html
[10] = https://github.com/bagder/curl/issues/356 [10] = http://curl.haxx.se/libcurl/c/CURLOPT_STREAM_WEIGHT.html
[11] = https://bugzilla.redhat.com/1248389 [11] = http://curl.haxx.se/bug/?i=480
[12] = http://curl.haxx.se/mail/lib-2015-07/0149.html [12] = https://github.com/bagder/curl/pull/501
[13] = http://curl.haxx.se/mail/lib-2015-07/0149.html [13] = http://curl.haxx.se/bug/?i=506
[14] = http://curl.haxx.se/bug/?i=360 [14] = http://curl.haxx.se/bug/?i=425
[15] = http://curl.haxx.se/bug/?i=357 [15] = http://curl.haxx.se/bug/?i=473
[16] = https://github.com/bagder/curl/issues/361 [16] = http://curl.haxx.se/bug/?i=486
[17] = https://github.com/bagder/curl/issues/363 [17] = http://curl.haxx.se/bug/?i=524
[18] = https://github.com/bagder/curl/pull/174 [18] = http://curl.haxx.se/bug/?i=523
[19] = https://github.com/bagder/curl/issues/366 [19] = http://curl.haxx.se/bug/?i=525
[20] = http://curl.haxx.se/mail/lib-2015-08/0019.html [20] = http://curl.haxx.se/bug/?i=526
[21] = http://curl.haxx.se/bug/?i=359
[22] = http://curl.haxx.se/bug/?i=370
[23] = http://curl.haxx.se/bug/?i=372
[24] = http://curl.haxx.se/bug/?i=374
[25] = http://curl.haxx.se/bug/?i=375

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
@@ -2837,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
@@ -2845,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
@@ -2881,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
@@ -3052,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

@@ -107,8 +107,8 @@ rem
set BASIC_HUGEHELP=0 set BASIC_HUGEHELP=0
rem Create Makefile rem Create Makefile
echo * %CD%\Makefile
if exist Makefile.dist ( if exist Makefile.dist (
echo * %CD%\Makefile
copy /Y Makefile.dist Makefile 1>NUL 2>&1 copy /Y Makefile.dist Makefile 1>NUL 2>&1
if errorlevel 1 ( if errorlevel 1 (
if "%OS%" == "Windows_NT" endlocal if "%OS%" == "Windows_NT" endlocal
@@ -129,8 +129,8 @@ rem
cmd /c exit 0 cmd /c exit 0
rem Create curlbuild.h rem Create curlbuild.h
echo * %CD%\include\curl\curlbuild.h
if exist include\curl\curlbuild.h.dist ( if exist include\curl\curlbuild.h.dist (
echo * %CD%\include\curl\curlbuild.h
copy /Y include\curl\curlbuild.h.dist include\curl\curlbuild.h 1>NUL 2>&1 copy /Y include\curl\curlbuild.h.dist include\curl\curlbuild.h 1>NUL 2>&1
if errorlevel 1 ( if errorlevel 1 (
if "%OS%" == "Windows_NT" endlocal if "%OS%" == "Windows_NT" endlocal
@@ -189,7 +189,7 @@ rem
del include\curl\curlbuild.h 2>NUL del include\curl\curlbuild.h 2>NUL
if exist include\curl\curlbuild.h ( if exist include\curl\curlbuild.h (
exit /B 3 exit /B 3
/) )
) )
exit /B exit /B
@@ -333,7 +333,6 @@ rem
echo the manual is not required and a summary of the options will still be available 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 (curl --help^). To integrate the manual your PATH is required to have
echo groff/nroff, perl and optionally gzip for compression. echo groff/nroff, perl and optionally gzip for compression.
echo.
goto success goto success
:error :error

View File

@@ -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
@@ -148,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)"
@@ -166,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}
@@ -1397,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
@@ -1475,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"
@@ -1620,7 +1622,8 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
dnl Older versions of Cyassl (some time before 2.9.4) don't have 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 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 as it's a macro that needs the header files be included)
dnl BoringSSL doesn't have DES_set_odd_parity 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 \
@@ -1632,14 +1635,22 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
DES_set_odd_parity ) DES_set_odd_parity )
AC_MSG_CHECKING([for BoringSSL]) AC_MSG_CHECKING([for BoringSSL])
if test "x$ac_cv_func_DES_set_odd_parity" != "xyes"; then AC_COMPILE_IFELSE([
curl_ssl_msg="enabled (BoringSSL)" AC_LANG_PROGRAM([[
AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1, #include <openssl/base.h>
[Define to 1 if using BoringSSL.]) ]],[[
AC_MSG_RESULT([yes]) #ifndef OPENSSL_IS_BORINGSSL
else #error not boringssl
AC_MSG_RESULT([no]) #endif
fi ]])
],[
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1,
[Define to 1 if using BoringSSL.])
],[
AC_MSG_RESULT([no])
])
AC_MSG_CHECKING([for libressl]) AC_MSG_CHECKING([for libressl])
AC_COMPILE_IFELSE([ AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[ AC_LANG_PROGRAM([[
@@ -1827,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
@@ -1964,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 ----------------------------------------------------
@@ -2288,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
@@ -2303,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 **********************************************************************
@@ -3526,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"
@@ -3731,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

@@ -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:
https://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] = https://www.gnu.org/philosophy/bsd.html
[3] = https://www.gnu.org/licenses/gpl.html
[4] = http://curl.haxx.se/docs/copyright.html
[5] = https://www.openssl.org/source/license.html
[6] = https://www.gnu.org/licenses/gpl.html end of section 3
[7] = https://www.gnu.org/licenses/lgpl.html
[8] = https://en.wikipedia.org/wiki/OpenSSL_exception
Feedback/Updates provided by
Eric Cooper

View File

@@ -1536,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?
@@ -1547,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

@@ -950,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.
@@ -970,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)
@@ -983,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
@@ -993,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.

View File

@@ -3,6 +3,9 @@ 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 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, 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 when it deems the server response to be too large truncating it to 40
@@ -32,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
@@ -58,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:
@@ -245,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

@@ -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 SECURITY RELEASE-PROCEDURE \ MAIL-ETIQUETTE HTTP-COOKIES SECURITY RELEASE-PROCEDURE SSL-PROBLEMS \
SSL-PROBLEMS HTTP2.md ROADMAP.md CODE_OF_CONDUCT.md HTTP2.md ROADMAP.md CODE_OF_CONDUCT.md
MAN2HTML= roffit < $< >$@ MAN2HTML= roffit < $< >$@

View File

@@ -24,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
-------------------- --------------------
@@ -78,9 +80,7 @@ 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):
- June 17, 2015 (version 7.43.0) - October 7, 2015 (version 7.45.0)
- August 12, 2015
- October 7, 2015
- December 2, 2015 - December 2, 2015
- January 27, 2016 - January 27, 2016
- March 23, 2016 - March 23, 2016

View File

@@ -18,20 +18,6 @@ HTTP/2
To decide: if we need to bundle parts of the nghttp2 stuff that probably To decide: if we need to bundle parts of the nghttp2 stuff that probably
won't be shipped by many distros. won't be shipped by many distros.
- stream properties API
Provide options for setting priorities and dependencies among the streams
(easy handles). They are mostly information set for the stream and sent to
the server so we don't have to add much logic for this.
- server push
Not exactly clear exactly how to support this API-wise, but by adding
handles without asking for a resource it could be a way to be prepared to
receive pushes in case such are sent. We probably need it to still specify
a URL with host name, port etc but we probably need a special option to
tell libcurl it is for server push purposes.
- provide option for HTTP/2 "prior knowledge" over clear text - provide option for HTTP/2 "prior knowledge" over clear text
As it would avoid the roundtrip-heavy Upgrade: procedures when you _know_ As it would avoid the roundtrip-heavy Upgrade: procedures when you _know_
@@ -117,7 +103,7 @@ 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

View File

@@ -131,12 +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 Bert Huijben
Bertrand Demiddelaer Bertrand Demiddelaer
Bertrand Simonnet
Bill Doyle Bill Doyle
Bill Egert Bill Egert
Bill Hoffman Bill Hoffman
@@ -234,6 +236,7 @@ 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 Da-Yoon Chung
@@ -252,9 +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 Melani
Daniel Mentz Daniel Mentz
Daniel Seither
Daniel Steinberg Daniel Steinberg
Daniel Stenberg Daniel Stenberg
Daniel Theron Daniel Theron
@@ -297,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
@@ -364,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
@@ -384,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
@@ -453,6 +464,7 @@ 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
@@ -497,6 +509,7 @@ 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
@@ -507,6 +520,7 @@ 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
@@ -720,6 +734,7 @@ Linas Vepstas
Lindley French Lindley French
Ling Thio Ling Thio
Linus Nielsen Feltzing Linus Nielsen Feltzing
Lior Kaplan
Lisa Xu Lisa Xu
Liviu Chircu Liviu Chircu
Liza Alenchery Liza Alenchery
@@ -742,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
@@ -825,6 +841,7 @@ Michael Day
Michael Goffioul Michael Goffioul
Michael Jahn Michael Jahn
Michael Jerris Michael Jerris
Michael Kalinin
Michael Kaufmann Michael Kaufmann
Michael Mealling Michael Mealling
Michael Mueller Michael Mueller
@@ -835,6 +852,7 @@ 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 Michel Promonet
@@ -868,6 +886,7 @@ 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
@@ -903,6 +922,7 @@ Oliver Gondža
Oliver Kuckertz Oliver Kuckertz
Oliver Schindler Oliver Schindler
Olivier Berger Olivier Berger
Orange Tsai
Oren Souroujon Oren Souroujon
Oren Tirosh Oren Tirosh
Orgad Shaneh Orgad Shaneh
@@ -998,6 +1018,7 @@ 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
@@ -1007,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
@@ -1031,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
@@ -1054,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
@@ -1078,6 +1102,7 @@ Salvador Dávila
Salvatore Sorrentino Salvatore Sorrentino
Sam Deane Sam Deane
Sam Hurst Sam Hurst
Sam Roth
Sam Schanken Sam Schanken
Sampo Kellomaki Sampo Kellomaki
Samuel Díaz García Samuel Díaz García
@@ -1157,15 +1182,18 @@ 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 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
@@ -1174,6 +1202,7 @@ Thomas Lopatic
Thomas Ruecker 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
@@ -1186,6 +1215,7 @@ 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
@@ -1195,7 +1225,6 @@ 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
@@ -1255,6 +1284,7 @@ Vojtech Janota
Vojtech Minarik Vojtech Minarik
Vojtěch Král 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
@@ -1294,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

@@ -50,3 +50,4 @@ s/Jiří Hruška/Jiri Hruska/
s/Viktor Szakats/Viktor Szakáts/ s/Viktor Szakats/Viktor Szakáts/
s/Jonathan Cardoso/Jonathan Cardoso Machado/ s/Jonathan Cardoso/Jonathan Cardoso Machado/
s/Linus Nielsen/Linus Nielsen Feltzing/ s/Linus Nielsen/Linus Nielsen Feltzing/
s/Todd Ouska$/Todd A Ouska/

View File

@@ -52,6 +52,7 @@
5.4 SPDY 5.4 SPDY
5.5 auth= in URLs 5.5 auth= in URLs
5.6 Refuse "downgrade" redirects 5.6 Refuse "downgrade" redirects
5.7 More compressions
6. TELNET 6. TELNET
6.1 ditch stdin 6.1 ditch stdin
@@ -372,6 +373,14 @@ This is not detailed in any FTP specification.
Consider a way to tell curl to refuse to "downgrade" protocol with a redirect 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. 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

View File

@@ -171,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.
@@ -212,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
@@ -222,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
@@ -253,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>"
@@ -475,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
@@ -548,7 +561,7 @@ used several times, the last one will be used.
(SSL) Tells curl to use the specified public key file (or hashes) to verify the (SSL) Tells curl to use the specified public key file (or hashes) to verify the
peer. This can be a path to a file which contains a single public key in PEM or 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 DER format, or any number of base64 encoded sha256 hashes preceded by
\'sha256//\' and seperated 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
@@ -776,10 +789,12 @@ This option can be used multiple times to add/replace/remove multiple headers.
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...
@@ -1250,21 +1265,21 @@ this option set you tell it not to do that.
(Added in 7.42.0) (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
@@ -1311,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"
@@ -1428,13 +1474,10 @@ 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 .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
@@ -1760,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"

View File

@@ -330,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

@@ -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

@@ -26,7 +26,8 @@ curl_easy_escape - URL encodes the given string
.SH SYNOPSIS .SH SYNOPSIS
.B #include <curl/curl.h> .B #include <curl/curl.h>
.sp .sp
.BI "char *curl_easy_escape( CURL *" curl ", char *" string ", int "length " );" .BI "char *curl_easy_escape( CURL *" curl ", const char *" string
.BI ", int "length " );"
.ad .ad
.SH DESCRIPTION .SH DESCRIPTION
This function converts the given input \fIstring\fP to a URL encoded string This function converts the given input \fIstring\fP to a URL encoded string
@@ -48,10 +49,10 @@ CURL *curl = curl_easy_init();
if(curl) { if(curl) {
char *output = curl_easy_escape(curl, "data to convert", 15); char *output = curl_easy_escape(curl, "data to convert", 15);
if(output) { if(output) {
printf("Encoded: %s\n", output); printf("Encoded: %s\\n", output);
curl_free(output); curl_free(output);
} }
}} }
.fi .fi
.SH "SEE ALSO" .SH "SEE ALSO"
.BR curl_easy_unescape "(3), " curl_free "(3), " RFC 3986 .BR curl_easy_unescape "(3), " curl_free "(3), " RFC 3986

View File

@@ -34,256 +34,190 @@ third argument \fBMUST\fP be a pointer to a long, a pointer to a char *, a
pointer to a struct curl_slist * or a pointer to a double (as this pointer to a struct curl_slist * or a pointer to a double (as this
documentation describes further down). The data pointed-to will be filled in documentation describes further down). The data pointed-to will be filled in
accordingly and can be relied upon only if the function returns CURLE_OK. Use accordingly and can be relied upon only if the function returns CURLE_OK. Use
this function AFTER a performed transfer if you want to get transfer- oriented this function AFTER a performed transfer if you want to get transfer related
data. data.
You should not free the memory returned by this function unless it is You should not free the memory returned by this function unless it is
explicitly mentioned below. explicitly mentioned below.
.SH AVAILABLE INFORMATION .SH AVAILABLE INFORMATION
The following information can be extracted: The following information can be extracted:
.IP CURLINFO_EFFECTIVE_URL .IP CURLINFO_EFFECTIVE_URL
Pass a pointer to a char pointer to receive the last used effective URL. Last used URL.
See \fICURLINFO_EFFECTIVE_URL(3)\fP
.IP CURLINFO_RESPONSE_CODE .IP CURLINFO_RESPONSE_CODE
Pass a pointer to a long to receive the last received HTTP, FTP or SMTP Last received response code.
response code. This option was previously known as CURLINFO_HTTP_CODE in See \fICURLINFO_RESPONSE_CODE(3)\fP
libcurl 7.10.7 and earlier. The value will be zero if no server response code
has been received. Note that a proxy's CONNECT response should be read with
\fICURLINFO_HTTP_CONNECTCODE\fP and not this.
Support for SMTP responses added in 7.25.0.
.IP CURLINFO_HTTP_CONNECTCODE .IP CURLINFO_HTTP_CONNECTCODE
Pass a pointer to a long to receive the last received proxy response code to a Last proxy CONNECT response code.
CONNECT request. See \fICURLINFO_HTTP_CONNECTCODE(3)\fP
.IP CURLINFO_FILETIME .IP CURLINFO_FILETIME
Pass a pointer to a long to receive the remote time of the retrieved document Remote time of the retrieved document.
(in number of seconds since 1 jan 1970 in the GMT/UTC time zone). If you get See \fICURLINFO_FILETIME(3)\fP
-1, it can be because of many reasons (unknown, the server hides it or the
server doesn't support the command that tells document time etc) and the time
of the document is unknown. Note that you must tell the server to collect this
information before the transfer is made, by using the
\fICURLOPT_FILETIME(3)\fP option to \fIcurl_easy_setopt(3)\fP or you will
unconditionally get a -1 back. (Added in 7.5)
.IP CURLINFO_TOTAL_TIME .IP CURLINFO_TOTAL_TIME
Pass a pointer to a double to receive the total time in seconds for the Total time of previous transfer.
previous transfer, including name resolving, TCP connect etc. See \fICURLINFO_TOTAL_TIME(3)\fP
.IP CURLINFO_NAMELOOKUP_TIME .IP CURLINFO_NAMELOOKUP_TIME
Pass a pointer to a double to receive the time, in seconds, it took from the Time from start until name resolving completed.
start until the name resolving was completed. See \fICURLINFO_NAMELOOKUP_TIME(3)\fP
.IP CURLINFO_CONNECT_TIME .IP CURLINFO_CONNECT_TIME
Pass a pointer to a double to receive the time, in seconds, it took from the Time from start until remote host or proxy completed.
start until the connect to the remote host (or proxy) was completed. See \fICURLINFO_CONNECT_TIME(3)\fP
.IP CURLINFO_APPCONNECT_TIME .IP CURLINFO_APPCONNECT_TIME
Pass a pointer to a double to receive the time, in seconds, it took from the Time from start until SSL/SSH handshake completed.
start until the SSL/SSH connect/handshake to the remote host was completed. See \fICURLINFO_APPCONNECT_TIME(3)\fP
This time is most often very near to the PRETRANSFER time, except for cases
such as HTTP pipelining where the pretransfer time can be delayed due to waits
in line for the pipeline and more. (Added in 7.19.0)
.IP CURLINFO_PRETRANSFER_TIME .IP CURLINFO_PRETRANSFER_TIME
Pass a pointer to a double to receive the time, in seconds, it took from the Time from start until just before the transfer begins.
start until the file transfer is just about to begin. This includes all See \fICURLINFO_PRETRANSFER_TIME(3)\fP
pre-transfer commands and negotiations that are specific to the particular
protocol(s) involved. It does \fInot\fP involve the sending of the protocol-
specific request that triggers a transfer.
.IP CURLINFO_STARTTRANSFER_TIME .IP CURLINFO_STARTTRANSFER_TIME
Pass a pointer to a double to receive the time, in seconds, it took from the Time from start until just when the first byte is received.
start until the first byte is received by libcurl. This includes See \fICURLINFO_STARTTRANSFER_TIME(3)\fP
CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate the
result.
.IP CURLINFO_REDIRECT_TIME .IP CURLINFO_REDIRECT_TIME
Pass a pointer to a double to receive the total time, in seconds, it took for Time taken for all redirect steps before the final transfer.
all redirection steps include name lookup, connect, pretransfer and transfer See \fICURLINFO_REDIRECT_TIME(3)\fP
before final transaction was started. CURLINFO_REDIRECT_TIME contains the
complete execution time for multiple redirections. (Added in 7.9.7)
.IP CURLINFO_REDIRECT_COUNT .IP CURLINFO_REDIRECT_COUNT
Pass a pointer to a long to receive the total number of redirections that were Total number of redirects that were followed.
actually followed. (Added in 7.9.7) See \fICURLINFO_REDIRECT_COUNT(3)\fP
.IP CURLINFO_REDIRECT_URL .IP CURLINFO_REDIRECT_URL
Pass a pointer to a char pointer to receive the URL a redirect \fIwould\fP URL a redirect would take you to, had you enabled redirects.
take you to if you would enable \fICURLOPT_FOLLOWLOCATION(3)\fP. This can come See \fICURLINFO_REDIRECT_URL(3)\fP
very handy if you think using the built-in libcurl redirect logic isn't good
enough for you but you would still prefer to avoid implementing all the magic
of figuring out the new URL. (Added in 7.18.2)
.IP CURLINFO_SIZE_UPLOAD .IP CURLINFO_SIZE_UPLOAD
Pass a pointer to a double to receive the total amount of bytes that were Number of bytes uploaded.
uploaded. See \fICURLINFO_SIZE_UPLOAD(3)\fP
.IP CURLINFO_SIZE_DOWNLOAD .IP CURLINFO_SIZE_DOWNLOAD
Pass a pointer to a double to receive the total amount of bytes that were Number of bytes downloaded.
downloaded. The amount is only for the latest transfer and will be reset again See \fICURLINFO_SIZE_DOWNLOAD(3)\fP
for each new transfer. This counts actual payload data, what's also commonly
called body. All meta and header data are excluded and will not be counted in
this number.
.IP CURLINFO_SPEED_DOWNLOAD .IP CURLINFO_SPEED_DOWNLOAD
Pass a pointer to a double to receive the average download speed that curl Average download speed.
measured for the complete download. Measured in bytes/second. See \fICURLINFO_SPEED_DOWNLOAD(3)\fP
.IP CURLINFO_SPEED_UPLOAD .IP CURLINFO_SPEED_UPLOAD
Pass a pointer to a double to receive the average upload speed that curl Average upload speed.
measured for the complete upload. Measured in bytes/second. See \fICURLINFO_SPEED_UPLOAD(3)\fP
.IP CURLINFO_HEADER_SIZE .IP CURLINFO_HEADER_SIZE
Pass a pointer to a long to receive the total size of all the headers Number of bytes of all headers received.
received. Measured in number of bytes. See \fICURLINFO_HEADER_SIZE(3)\fP
.IP CURLINFO_REQUEST_SIZE .IP CURLINFO_REQUEST_SIZE
Pass a pointer to a long to receive the total size of the issued Number of bytes sent in the issued HTTP requests.
requests. This is so far only for HTTP requests. Note that this may be more See \fICURLINFO_REQUEST_SIZE(3)\fP
than one request if FOLLOWLOCATION is true.
.IP CURLINFO_SSL_VERIFYRESULT .IP CURLINFO_SSL_VERIFYRESULT
Pass a pointer to a long to receive the result of the certification Certificate verification result.
verification that was requested (using the \fICURLOPT_SSL_VERIFYPEER(3)\fP See \fICURLINFO_SSL_VERIFYRESULT(3)\fP
option to \fIcurl_easy_setopt(3)\fP).
.IP CURLINFO_SSL_ENGINES .IP CURLINFO_SSL_ENGINES
Pass the address of a 'struct curl_slist *' to receive a linked-list of A list of OpenSSL crypto engines.
OpenSSL crypto-engines supported. Note that engines are normally implemented See \fICURLINFO_SSL_ENGINES(3)\fP
in separate dynamic libraries. Hence not all the returned engines may be
available at run-time. \fBNOTE:\fP you must call \fIcurl_slist_free_all(3)\fP
on the list pointer once you're done with it, as libcurl will not free the
data for you. (Added in 7.12.3)
.IP CURLINFO_CONTENT_LENGTH_DOWNLOAD .IP CURLINFO_CONTENT_LENGTH_DOWNLOAD
Pass a pointer to a double to receive the content-length of the download. This Content length from the Content-Length header.
is the value read from the Content-Length: field. Since 7.19.4, this returns -1 See \fICURLINFO_CONTENT_LENGTH_DOWNLOAD(3)\fP
if the size isn't known.
.IP CURLINFO_CONTENT_LENGTH_UPLOAD .IP CURLINFO_CONTENT_LENGTH_UPLOAD
Pass a pointer to a double to receive the specified size of the upload. Since Upload size.
7.19.4, this returns -1 if the size isn't known. See \fICURLINFO_CONTENT_LENGTH_UPLOAD(3)\fP
.IP CURLINFO_CONTENT_TYPE .IP CURLINFO_CONTENT_TYPE
Pass a pointer to a char pointer to receive the content-type of the downloaded Content type from the Content-Type header.
object. This is the value read from the Content-Type: field. If you get NULL, See \fICURLINFO_CONTENT_TYPE(3)\fP
it means that the server didn't send a valid Content-Type header or that the
protocol used doesn't support this.
.IP CURLINFO_PRIVATE .IP CURLINFO_PRIVATE
Pass a pointer to a char pointer to receive the pointer to the private data User's private data pointer.
associated with the curl handle (set with the \fICURLOPT_PRIVATE(3)\fP option See \fICURLINFO_PRIVATE(3)\fP
to \fIcurl_easy_setopt(3)\fP). Please note that for internal reasons, the
value is returned as a char pointer, although effectively being a 'void *'.
(Added in 7.10.3)
.IP CURLINFO_HTTPAUTH_AVAIL .IP CURLINFO_HTTPAUTH_AVAIL
Pass a pointer to a long to receive a bitmask indicating the authentication Available HTTP authentication methods.
method(s) available. The meaning of the bits is explained in the See \fICURLINFO_HTTPAUTH_AVAIL(3)\fP
\fICURLOPT_HTTPAUTH(3)\fP option for \fIcurl_easy_setopt(3)\fP. (Added in
7.10.8)
.IP CURLINFO_PROXYAUTH_AVAIL .IP CURLINFO_PROXYAUTH_AVAIL
Pass a pointer to a long to receive a bitmask indicating the authentication Available HTTP proxy authentication methods.
method(s) available for your proxy authentication. (Added in 7.10.8) See \fICURLINFO_PROXYAUTH_AVAIL(3)\fP
.IP CURLINFO_OS_ERRNO .IP CURLINFO_OS_ERRNO
Pass a pointer to a long to receive the errno variable from a connect failure. The errno from the last failure to connect.
Note that the value is only set on failure, it is not reset upon a See \fICURLINFO_OS_ERRNO(3)\fP
successful operation. (Added in 7.12.2)
.IP CURLINFO_NUM_CONNECTS .IP CURLINFO_NUM_CONNECTS
Pass a pointer to a long to receive how many new connections libcurl had to Number of new successful connections used for previous transfer.
create to achieve the previous transfer (only the successful connects are See \fICURLINFO_NUM_CONNECTS(3)\fP
counted). Combined with \fICURLINFO_REDIRECT_COUNT\fP you are able to know
how many times libcurl successfully reused existing connection(s) or not. See
the Connection Options of \fIcurl_easy_setopt(3)\fP to see how libcurl tries
to make persistent connections to save time. (Added in 7.12.3)
.IP CURLINFO_PRIMARY_IP .IP CURLINFO_PRIMARY_IP
Pass a pointer to a char pointer to receive the pointer to a zero-terminated IP address of the last connection.
string holding the IP address of the most recent connection done with this See \fICURLINFO_PRIMARY_IP(3)\fP
\fBcurl\fP handle. This string may be IPv6 if that's enabled. Note that you
get a pointer to a memory area that will be re-used at next request so you
need to copy the string if you want to keep the information. (Added in 7.19.0)
.IP CURLINFO_PRIMARY_PORT .IP CURLINFO_PRIMARY_PORT
Pass a pointer to a long to receive the destination port of the most recent Port of the last connection.
connection done with this \fBcurl\fP handle. (Added in 7.21.0) See \fICURLINFO_PRIMARY_PORT(3)\fP
.IP CURLINFO_LOCAL_IP .IP CURLINFO_LOCAL_IP
Pass a pointer to a char pointer to receive the pointer to a zero-terminated Local-end IP address of last connection.
string holding the local (source) IP address of the most recent connection done See \fICURLINFO_LOCAL_IP(3)\fP
with this \fBcurl\fP handle. This string may be IPv6 if that's enabled. The
same restrictions apply as to \fICURLINFO_PRIMARY_IP\fP. (Added in 7.21.0)
.IP CURLINFO_LOCAL_PORT .IP CURLINFO_LOCAL_PORT
Pass a pointer to a long to receive the local (source) port of the most recent Local-end port of last connection.
connection done with this \fBcurl\fP handle. (Added in 7.21.0) See \fICURLINFO_LOCAL_PORT(3)\fP
.IP CURLINFO_COOKIELIST .IP CURLINFO_COOKIELIST
Pass a pointer to a 'struct curl_slist *' to receive a linked-list of all List of all known cookies.
cookies cURL knows (expired ones, too). Don't forget to See \fICURLINFO_COOKIELIST(3)\fP
\fIcurl_slist_free_all(3)\fP the list after it has been used. If there are no
cookies (cookies for the handle have not been enabled or simply none have been
received) 'struct curl_slist *' will be set to point to NULL. (Added in
7.14.1)
.IP CURLINFO_LASTSOCKET .IP CURLINFO_LASTSOCKET
Pass a pointer to a long to receive the last socket used by this curl Last socket used.
session. If the socket is no longer valid, -1 is returned. When you finish See \fICURLINFO_LASTSOCKET(3)\fP
working with the socket, you must call curl_easy_cleanup() as usual and let
libcurl close the socket and cleanup other resources associated with the .IP CURLINFO_ACTIVESOCKET
handle. This is typically used in combination with The session's active socket.
\fICURLOPT_CONNECT_ONLY(3)\fP. (Added in 7.15.2) See \fICURLINFO_ACTIVESOCKET(3)\fP
NOTE: this API is not really working on win64, since the SOCKET type on win64
is 64 bit large while its 'long' is only 32 bits.
.IP CURLINFO_FTP_ENTRY_PATH .IP CURLINFO_FTP_ENTRY_PATH
Pass a pointer to a char pointer to receive a pointer to a string holding the The entry path after logging in to an FTP server.
path of the entry path. That is the initial path libcurl ended up in when See \fICURLINFO_FTP_ENTRY_PATH(3)\fP
logging on to the remote FTP server. This stores a NULL as pointer if
something is wrong. (Added in 7.15.4)
Also works for SFTP since 7.21.4
.IP CURLINFO_CERTINFO .IP CURLINFO_CERTINFO
Pass a pointer to a 'struct curl_certinfo *' and you'll get it set to point to Certificate chain.
struct that holds a number of linked lists with info about the certificate See \fICURLINFO_CERTINFO(3)\fP
chain, assuming you had \fICURLOPT_CERTINFO(3)\fP enabled when the previous
request was done. The struct reports how many certs it found and then you can
extract info for each of those certs by following the linked lists. The info
chain is provided in a series of data in the format "name:content" where the
content is for the specific named data. See also the certinfo.c example. NOTE:
this option is only available in libcurl built with OpenSSL, NSS or GSKit
support. (Added in 7.19.1)
.IP CURLINFO_TLS_SESSION .IP CURLINFO_TLS_SESSION
Pass a pointer to a 'struct curl_tlssessioninfo *'. The pointer will be TLS session info that can be used for further processing.
initialized to refer to a 'struct curl_tlssessioninfo *' that will contain an See \fICURLINFO_TLS_SESSION(3)\fP
enum indicating the SSL library used for the handshake and the respective
internal TLS session structure of this underlying SSL library.
This may then be used to extract certificate information in a format
convenient for further processing, such as manual validation. NOTE: this
option may not be available for all SSL backends; unsupported SSL backends
will return 'CURLSSLBACKEND_NONE' to indicate that they are not supported;
this does not mean that no SSL backend was used. (Added in 7.34.0)
.nf
struct curl_tlssessioninfo {
curl_sslbackend backend;
void *internals;
};
.fi
The \fIinternals\fP struct member will point to a TLS library specific pointer
with the following underlying types:
.RS
.IP OpenSSL
SSL_CTX *
.IP GnuTLS
gnutls_session_t
.IP NSS
PRFileDesc *
.IP gskit
gsk_handle
.RE
.IP CURLINFO_CONDITION_UNMET .IP CURLINFO_CONDITION_UNMET
Pass a pointer to a long to receive the number 1 if the condition provided in Whether or not a time conditional was met.
the previous request didn't match (see \fICURLOPT_TIMECONDITION(3)\fP). Alas, See \fICURLINFO_CONDITION_UNMET(3)\fP
if this returns a 1 you know that the reason you didn't get data in return is
because it didn't fulfill the condition. The long ths argument points to will
get a zero stored if the condition instead was met. (Added in 7.19.4)
.IP CURLINFO_RTSP_SESSION_ID .IP CURLINFO_RTSP_SESSION_ID
Pass a pointer to a char pointer to receive a pointer to a string holding the RTSP session ID.
most recent RTSP Session ID. See \fICURLINFO_RTSP_SESSION_ID(3)\fP
Applications wishing to resume an RTSP session on another connection should
retrieve this info before closing the active connection.
.IP CURLINFO_RTSP_CLIENT_CSEQ .IP CURLINFO_RTSP_CLIENT_CSEQ
Pass a pointer to a long to receive the next CSeq that will be used by the RTSP CSeq that will next be used.
application. See \fICURLINFO_RTSP_CLIENT_CSEQ(3)\fP
.IP CURLINFO_RTSP_SERVER_CSEQ .IP CURLINFO_RTSP_SERVER_CSEQ
Pass a pointer to a long to receive the next server CSeq that will be expected RTSP CSeq that will next be expected.
by the application. See \fICURLINFO_RTSP_SERVER_CSEQ(3)\fP
\fI(NOTE: listening for server initiated requests is currently
unimplemented).\fP
Applications wishing to resume an RTSP session on another connection should
retrieve this info before closing the active connection.
.IP CURLINFO_RTSP_CSEQ_RECV .IP CURLINFO_RTSP_CSEQ_RECV
Pass a pointer to a long to receive the most recently received CSeq from the RTSP CSeq last received.
server. If your application encounters a \fICURLE_RTSP_CSEQ_ERROR\fP then you See \fICURLINFO_RTSP_CSEQ_RECV(3)\fP
may wish to troubleshoot and/or fix the CSeq mismatch by peeking at this value.
.SH TIMES .SH TIMES
.nf .nf
An overview of the six time values available from curl_easy_getinfo() An overview of the six time values available from curl_easy_getinfo()

View File

@@ -62,7 +62,7 @@ function is called again without this bit set. Thus, the read callback
.IP CURLPAUSE_ALL .IP CURLPAUSE_ALL
Convenience define that pauses both directions. Convenience define that pauses both directions.
.IP CURLPAUSE_CONT .IP CURLPAUSE_CONT
Convenience define that unpauses both directions Convenience define that unpauses both directions.
.SH RETURN VALUE .SH RETURN VALUE
CURLE_OK (zero) means that the option was set properly, and a non-zero return CURLE_OK (zero) means that the option was set properly, and a non-zero return
code means something wrong occurred after the new state was set. See the code means something wrong occurred after the new state was set. See the

View File

@@ -49,7 +49,7 @@ this option.
You must ensure that the socket has data to read before calling You must ensure that the socket has data to read before calling
\fIcurl_easy_recv(3)\fP, otherwise the call will return \fBCURLE_AGAIN\fP - \fIcurl_easy_recv(3)\fP, otherwise the call will return \fBCURLE_AGAIN\fP -
the socket is used in non-blocking mode internally. Use the socket is used in non-blocking mode internally. Use
\fIcurl_easy_getinfo(3)\fP with \fBCURLINFO_LASTSOCKET\fP to obtain the \fIcurl_easy_getinfo(3)\fP with \fBCURLINFO_ACTIVESOCKET(3)\fP to obtain the
socket; use your operating system facilities like \fIselect(2)\fP to check if socket; use your operating system facilities like \fIselect(2)\fP to check if
it has any data you can read. it has any data you can read.
.SH AVAILABILITY .SH AVAILABILITY

View File

@@ -47,7 +47,7 @@ this option.
You must ensure that the socket is writable before calling You must ensure that the socket is writable before calling
\fIcurl_easy_send(3)\fP, otherwise the call will return \fBCURLE_AGAIN\fP - \fIcurl_easy_send(3)\fP, otherwise the call will return \fBCURLE_AGAIN\fP -
the socket is used in non-blocking mode internally. Use the socket is used in non-blocking mode internally. Use
\fIcurl_easy_getinfo(3)\fP with \fBCURLINFO_LASTSOCKET\fP to obtain the \fIcurl_easy_getinfo(3)\fP with \fBCURLINFO_ACTIVESOCKET(3)\fP to obtain the
socket; use your operating system facilities like \fIselect(2)\fP to check if socket; use your operating system facilities like \fIselect(2)\fP to check if
it can be written to. it can be written to.
.SH AVAILABILITY .SH AVAILABILITY

View File

@@ -153,6 +153,8 @@ Disable squashing /../ and /./ sequences in the path. See \fICURLOPT_PATH_AS_IS(
Allowed protocols. See \fICURLOPT_PROTOCOLS(3)\fP Allowed protocols. See \fICURLOPT_PROTOCOLS(3)\fP
.IP CURLOPT_REDIR_PROTOCOLS .IP CURLOPT_REDIR_PROTOCOLS
Protocols to allow redirects to. See \fICURLOPT_REDIR_PROTOCOLS(3)\fP Protocols to allow redirects to. See \fICURLOPT_REDIR_PROTOCOLS(3)\fP
.IP CURLOPT_DEFAULT_PROTOCOL
Default protocol. See \fICURLOPT_DEFAULT_PROTOCOL(3)\fP
.IP CURLOPT_PROXY .IP CURLOPT_PROXY
Proxy to use. See \fICURLOPT_PROXY(3)\fP Proxy to use. See \fICURLOPT_PROXY(3)\fP
.IP CURLOPT_PROXYPORT .IP CURLOPT_PROXYPORT
@@ -295,6 +297,13 @@ Disable Transfer decoding. See \fICURLOPT_HTTP_TRANSFER_DECODING(3)\fP
100-continue timeout. See \fICURLOPT_EXPECT_100_TIMEOUT_MS(3)\fP 100-continue timeout. See \fICURLOPT_EXPECT_100_TIMEOUT_MS(3)\fP
.IP CURLOPT_PIPEWAIT .IP CURLOPT_PIPEWAIT
Wait on connection to pipeline on it. See \fICURLOPT_PIPEWAIT(3)\fP Wait on connection to pipeline on it. See \fICURLOPT_PIPEWAIT(3)\fP
.IP CURLOPT_STREAM_DEPENDS
This HTTP/2 stream depends on another. See \fICURLOPT_STREAM_DEPENDS(3)\fP
.IP CURLOPT_STREAM_DEPENDS_E
This HTTP/2 stream depends on another exclusively. See
\fICURLOPT_STREAM_DEPENDS_E(3)\fP
.IP CURLOPT_STREAM_WEIGHT
Set this HTTP/2 stream's weight. See \fICURLOPT_STREAM_WEIGHT(3)\fP
.SH SMTP OPTIONS .SH SMTP OPTIONS
.IP CURLOPT_MAIL_FROM .IP CURLOPT_MAIL_FROM
Address of the sender. See \fICURLOPT_MAIL_FROM(3)\fP Address of the sender. See \fICURLOPT_MAIL_FROM(3)\fP
@@ -527,8 +536,8 @@ if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
res = curl_easy_perform(curl); res = curl_easy_perform(curl);
curl_easy_cleanup(curl); curl_easy_cleanup(curl);
}} }
.fi .fi
.SH "SEE ALSO" .SH "SEE ALSO"
.BR curl_easy_init "(3), " curl_easy_cleanup "(3), " curl_easy_reset "(3), " .BR curl_easy_init "(3), " curl_easy_cleanup "(3), " curl_easy_reset "(3), "
.BR curl_multi_setopt "(3), " .BR curl_easy_getinfo "(3), " curl_multi_setopt "(3), "

View File

@@ -26,8 +26,8 @@ curl_easy_unescape - URL decodes the given string
.SH SYNOPSIS .SH SYNOPSIS
.B #include <curl/curl.h> .B #include <curl/curl.h>
.sp .sp
.BI "char *curl_easy_unescape( CURL *" curl ", char *" url ", int "inlength .BI "char *curl_easy_unescape( CURL *" curl ", const char *" url
.BI ", int *" outlength " );" .BI ", int "inlength ", int *" outlength " );"
.ad .ad
.SH DESCRIPTION .SH DESCRIPTION
This function converts the given URL encoded input string to a "plain string" This function converts the given URL encoded input string to a "plain string"

View File

@@ -25,7 +25,7 @@ curl_escape - URL encodes the given string
.SH SYNOPSIS .SH SYNOPSIS
.B #include <curl/curl.h> .B #include <curl/curl.h>
.sp .sp
.BI "char *curl_escape( char *" url ", int "length " );" .BI "char *curl_escape( const char *" url ", int "length " );"
.ad .ad
.SH DESCRIPTION .SH DESCRIPTION
Obsolete function. Use \fIcurl_easy_escape(3)\fP instead! Obsolete function. Use \fIcurl_easy_escape(3)\fP instead!

View File

@@ -83,7 +83,18 @@ to send away. libcurl will use the pointer and refer to the data in your
application, so you must make sure it remains until curl no longer needs it. application, so you must make sure it remains until curl no longer needs it.
If the data isn't NUL-terminated, or if you'd like it to contain zero bytes, If the data isn't NUL-terminated, or if you'd like it to contain zero bytes,
you must set its length with \fBCURLFORM_CONTENTSLENGTH\fP. you must set its length with \fBCURLFORM_CONTENTSLENGTH\fP.
.IP CURLFORM_CONTENTLEN
followed by a curl_off_t value giving the length of the contents. Note that
for \fICURLFORM_STREAM\fP contents, this option is mandatory.
If you pass a 0 (zero) for this option, libcurl will instead do a strlen() on
the contents to figure out the size. If you really want to send a zero byte
content then you must make sure strlen() on the data pointer returns zero.
(Option added in 7.46.0)
.IP CURLFORM_CONTENTSLENGTH .IP CURLFORM_CONTENTSLENGTH
(This option is deprecated. Use \fICURLFORM_CONTENTLEN\fP instead!)
followed by a long giving the length of the contents. Note that for followed by a long giving the length of the contents. Note that for
\fICURLFORM_STREAM\fP contents, this option is mandatory. \fICURLFORM_STREAM\fP contents, this option is mandatory.

View File

@@ -36,12 +36,13 @@ This function works exactly as \fIcurl_global_init(3)\fP with one addition: it
allows the application to set callbacks to replace the otherwise used internal allows the application to set callbacks to replace the otherwise used internal
memory functions. memory functions.
When you use this function, all callback arguments must be set to valid If you are using libcurl from multiple threads or libcurl was built with the
function pointers. \fBIf you are using libcurl from multiple threads or with threaded resolver option then the callback functions must be thread safe. The
the threaded resolver (the default in Windows) the callback replacement threaded resolver is a common build option to enable (and in some cases the
functions must be thread safe.\fP default) so we strongly urge you to make your callback functions thread safe.
The prototypes for the given callbacks should match these: All callback arguments must be set to valid function pointers. The
prototypes for the given callbacks must match these:
.IP "void *malloc_callback(size_t size);" .IP "void *malloc_callback(size_t size);"
To replace malloc() To replace malloc()
.IP "void free_callback(void *ptr);" .IP "void free_callback(void *ptr);"

View File

@@ -31,7 +31,7 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle);
Adds a standard easy handle to the multi stack. This function call will make Adds a standard easy handle to the multi stack. This function call will make
this \fImulti_handle\fP control the specified \fIeasy_handle\fP. this \fImulti_handle\fP control the specified \fIeasy_handle\fP.
While an easy handle is added to a multi stack, you can not and you must not While an easy handle is added to a multi stack, you cannot and you must not
use \fIcurl_easy_perform(3)\fP on that handle. After having removed the easy use \fIcurl_easy_perform(3)\fP on that handle. After having removed the easy
handle from the multi stack again, it is perfectly fine to use it with the handle from the multi stack again, it is perfectly fine to use it with the
easy interface again. easy interface again.

View File

@@ -25,7 +25,7 @@ curl_unescape - URL decodes the given string
.SH SYNOPSIS .SH SYNOPSIS
.B #include <curl/curl.h> .B #include <curl/curl.h>
.sp .sp
.BI "char *curl_unescape( char *" url ", int "length " );" .BI "char *curl_unescape( const char *" url ", int "length " );"
.ad .ad
.SH DESCRIPTION .SH DESCRIPTION
Obsolete function. Use \fIcurl_easy_unescape(3)\fP instead! Obsolete function. Use \fIcurl_easy_unescape(3)\fP instead!

View File

@@ -247,6 +247,10 @@ Chunk callback reported error.
.IP "CURLE_NO_CONNECTION_AVAILABLE (89)" .IP "CURLE_NO_CONNECTION_AVAILABLE (89)"
(For internal use only, will never be returned by libcurl) No connection (For internal use only, will never be returned by libcurl) No connection
available, the session will be queued. (added in 7.30.0) available, the session will be queued. (added in 7.30.0)
.IP "CURLE_SSL_PINNEDPUBKEYNOTMATCH (90)"
Failed to match the pinned key specified with \fICURLOPT_PINNEDPUBLICKEY(3)\fP.
.IP "CURLE_SSL_INVALIDCERTSTATUS (91)"
Status returned failure when asked with \fICURLOPT_SSL_VERIFYSTATUS(3)\fP.
.IP "CURLE_OBSOLETE*" .IP "CURLE_OBSOLETE*"
These error codes will never be returned. They were used in an old libcurl These error codes will never be returned. They were used in an old libcurl
version and are currently unused. version and are currently unused.

View File

@@ -1086,11 +1086,15 @@ NTLM authentication, HTTPS, FTPS, SCP and SFTP are a few examples.
.IP "Redirects" .IP "Redirects"
The \fICURLOPT_FOLLOWLOCATION(3)\fP option automatically follows HTTP The \fICURLOPT_FOLLOWLOCATION(3)\fP option automatically follows HTTP
redirects sent by a remote server. These redirects can refer to any kind of redirects sent by a remote server. These redirects can refer to any kind of
URL, not just HTTP. A redirect to a file: URL would cause the libcurl to read URL, not just HTTP. By default libcurl will allow all protocols on redirect
(or write) arbitrary files from the local filesystem. If the application except several disabled for security reasons: Since 7.19.4 FILE and SCP are
returns the data back to the user (as would happen in some kinds of CGI disabled, and since 7.40.0 SMB and SMBS are also disabled.
scripts), an attacker could leverage this to read otherwise forbidden data
(e.g. file://localhost/etc/passwd). A redirect to a file: URL would cause the libcurl to read (or write) arbitrary
files from the local filesystem. If the application returns the data back to
the user (as would happen in some kinds of CGI scripts), an attacker could
leverage this to read otherwise forbidden data (e.g.
file://localhost/etc/passwd).
If authentication credentials are stored in the ~/.netrc file, or Kerberos If authentication credentials are stored in the ~/.netrc file, or Kerberos
is in use, any other URL type (not just file:) that requires is in use, any other URL type (not just file:) that requires

View File

@@ -178,7 +178,7 @@ x=CURLOPT_WRITEDATA;
x=CURLOPT_ERRORBUFFER; x=CURLOPT_ERRORBUFFER;
x=CURLOPT_STDERR; x=CURLOPT_STDERR;
x=CURLOPT_VERBOSE; x=CURLOPT_VERBOSE;
if (x) ; if (x) {;}
]])],libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no) ]])],libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
CPPFLAGS=$_libcurl_save_cppflags CPPFLAGS=$_libcurl_save_cppflags

View File

@@ -0,0 +1,51 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_ACTIVESOCKET 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_ACTIVESOCKET \- get the active socket
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_ACTIVESOCKET,
curl_socket_t *socket);
.SH DESCRIPTION
Pass a pointer to a curl_socket_t to receive the active socket used by this
curl session. If the socket is no longer valid, \fICURL_SOCKET_BAD\fP is
returned. When you finish working with the socket, you must call
\fIcurl_easy_cleanup(3)\fP as usual on the easy handle and let libcurl close
the socket and cleanup other resources associated with the handle. This is
typically used in combination with \fICURLOPT_CONNECT_ONLY(3)\fP.
This option was added as a replacement for \fICURLINFO_LASTSOCKET(3)\fP since
that one isn't working on all platforms.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.45.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_LASTSOCKET "(3), "

View File

@@ -0,0 +1,47 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_APPCONNECT_TIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_APPCONNECT_TIME \- get the time until the SSL/SSH handshake is completed
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_APPCONNECT_TIME, double *timep);
.SH DESCRIPTION
Pass a pointer to a double to receive the time, in seconds, it took from the
start until the SSL/SSH connect/handshake to the remote host was completed.
This time is most often very near to the \fICURLINFO_PRETRANSFER_TIME(3)\fP
time, except for cases such as HTTP pipelining where the pretransfer time can
be delayed due to waits in line for the pipeline and more.
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.19.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,51 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CERTINFO 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_CERTINFO \- get the TLS certificate chain
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CERTINFO,
struct curl_certinfo *chainp);
.SH DESCRIPTION
Pass a pointer to a 'struct curl_certinfo *' and you'll get it set to point to
struct that holds a number of linked lists with info about the certificate
chain, assuming you had \fICURLOPT_CERTINFO(3)\fP enabled when the request was
made. The struct reports how many certs it found and then you can extract info
for each of those certs by following the linked lists. The info chain is
provided in a series of data in the format "name:content" where the content is
for the specific named data. See also the certinfo.c example.
.SH PROTOCOLS
All TLS-based
.SH EXAMPLE
TODO
.SH AVAILABILITY
This option is only working in libcurl built with OpenSSL, NSS or GSKit
support.
Added in 7.19.1
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,45 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONDITION_UNMET 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_CONDITION_UNMET \- get info on unmet time conditional
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONDITION_UNMET, long *unmet);
.SH DESCRIPTION
Pass a pointer to a long to receive the number 1 if the condition provided in
the previous request didn't match (see \fICURLOPT_TIMECONDITION(3)\fP). Alas,
if this returns a 1 you know that the reason you didn't get data in return is
because it didn't fulfill the condition. The long ths argument points to will
get a zero stored if the condition instead was met.
.SH PROTOCOLS
HTTP and some
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.19.4
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,44 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONNECT_TIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_CONNECT_TIME \- get the time until connect
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONNECT_TIME, double *timep);
.SH DESCRIPTION
Pass a pointer to a double to receive the total time in seconds from the start
until the connection to the remote host (or proxy) was completed.
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.4.1
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,45 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_CONTENT_LENGTH_DOWNLOAD \- get content-length of download
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD,
double *content_length);
.SH DESCRIPTION
Pass a pointer to a double to receive the content-length of the download. This
is the value read from the Content-Length: field. Since 7.19.4, this returns
-1 if the size isn't known.
.SH PROTOCOLS
HTTP(S)
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.6.1
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_CONTENT_LENGTH_UPLOAD "(3), "

View File

@@ -0,0 +1,43 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONTENT_LENGTH_UPLOAD 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_CONTENT_LENGTH_UPLOAD \- get the specified size of the upload
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_UPLOAD,
double *content_length);
.SH DESCRIPTION
Pass a pointer to a double to receive the specified size of the upload. Since
7.19.4, this returns -1 if the size isn't known.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.6.1
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,48 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONTENT_TYPE 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_CONTENT_TYPE \- get Content-Type
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_TYPE, char **ct);
.SH DESCRIPTION
Pass a pointer to a char pointer to receive the content-type of the downloaded
object. This is the value read from the Content-Type: field. If you get NULL,
it means that the server didn't send a valid Content-Type header or that the
protocol used doesn't support this.
The \fBct\fP pointer will be NULL or pointing to private memory you MUST NOT
free it - it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the
corresponding CURL handle.
.SH PROTOCOLS
HTTP(S)
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.9.4
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,49 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_COOKIELIST 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_COOKIELIST \- get all known cookies
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_COOKIELIST,
struct curl_slist **cookies);
.SH DESCRIPTION
Pass a pointer to a 'struct curl_slist *' to receive a linked-list of all
cookies cURL knows (expired ones, too). Don't forget to call
\fIcurl_slist_free_all(3)\fP on the list after it has been used. If there are
no cookies (cookies for the handle have not been enabled or simply none have
been received) 'struct curl_slist *' will be set to point to NULL.
Since 7.43.0 cookies that were imported in the Set-Cookie format without a
domain name are not exported by this option.
.SH PROTOCOLS
HTTP(S)
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.14.1
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,48 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_EFFECTIVE_URL 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_EFFECTIVE_URL \- get the last used URL
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_EFFECTIVE_URL, char **urlp);
.SH DESCRIPTION
Pass in a pointer to a char pointer and get the last used effective URL.
In cases when you've asked libcurl to follow redirects, it may very well not
be the same value you set with \fICURLOPT_URL(3)\fP.
The \fBurlp\fP pointer will be NULL or pointing to private memory you MUST NOT
free - it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the
corresponding CURL handle.
.SH PROTOCOLS
HTTP(S)
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.4
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,49 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_FILETIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_FILETIME \- get the remote time of the retrieved document
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_FILETIME, long *timep);
.SH DESCRIPTION
Pass a pointer to a long to receive the remote time of the retrieved document
(in number of seconds since 1 jan 1970 in the GMT/UTC time zone). If you get
-1, it can be because of many reasons (it might be unknown, the server might
hide it or the server doesn't support the command that tells document time
etc) and the time of the document is unknown.
Note that you must tell the server to collect this information before the
transfer is made, by using the \fICURLOPT_FILETIME(3)\fP option to
\fIcurl_easy_setopt(3)\fP or you will unconditionally get a -1 back.
.SH PROTOCOLS
HTTP(S), FTP(S)
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.5
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,48 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_FTP_ENTRY_PATH 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_FTP_ENTRY_PATH \- get entry path in FTP server
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_FTP_ENTRY_PATH, char **path);
.SH DESCRIPTION
Pass a pointer to a char pointer to receive a pointer to a string holding the
path of the entry path. That is the initial path libcurl ended up in when
logging on to the remote FTP server. This stores a NULL as pointer if
something is wrong.
The \fBpath\fP pointer will be NULL or pointing to private memory you MUST NOT
free - it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the
corresponding CURL handle.
.SH PROTOCOLS
FTP(S) and SFTP
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.15.4. Works for SFTP since 7.21.4
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,44 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_HEADER_SIZE 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_HEADER_SIZE \- get size of retrieved headers
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HEADER_SIZE, long *sizep);
.SH DESCRIPTION
Pass a pointer to a long to receive the total size of all the headers
received. Measured in number of bytes.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.4.1
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_REQUEST_SIZE "(3), "
.BR CURLINFO_SIZE_DOWNLOAD "(3), "

View File

@@ -0,0 +1,44 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_HTTPAUTH_AVAIL 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_HTTPAUTH_AVAIL \- get available HTTP authentication methods
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HTTPAUTH_AVAIL, long *authp);
.SH DESCRIPTION
Pass a pointer to a long to receive a bitmask indicating the authentication
method(s) available according to the previous response. The meaning of the
bits is explained in the \fICURLOPT_HTTPAUTH(3)\fP option for
\fIcurl_easy_setopt(3)\fP.
.SH PROTOCOLS
HTTP(S)
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.10.8
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,44 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_HTTP_CONNECTCODE 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_HTTP_CONNECTCODE \- get the CONNECT response code
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HTTP_CONNECTCODE, long *p);
.SH DESCRIPTION
Pass a pointer to a long to receive the last received HTTP proxy response code
to a CONNECT request. The returned value will be zero if no such response code
was available.
.SH PROTOCOLS
HTTP
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.10.7
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR CURLINFO_RESPONSE_CODE "(3), "
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,53 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_LASTSOCKET 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_LASTSOCKET \- get the last socket used
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_LASTSOCKET, long *socket);
.SH DESCRIPTION
Deprecated since 7.45.0. Use \fICURLINFO_ACTIVESOCKET(3)\fP instead.
Pass a pointer to a long to receive the last socket used by this curl
session. If the socket is no longer valid, -1 is returned. When you finish
working with the socket, you must call curl_easy_cleanup() as usual and let
libcurl close the socket and cleanup other resources associated with the
handle. This is typically used in combination with
\fICURLOPT_CONNECT_ONLY(3)\fP.
NOTE: this API is deprecated since it is not working on win64 where the SOCKET
type is 64 bits large while its 'long' is 32 bits. Use the
\fICURLINFO_ACTIVESOCKET(3)\fP instead, if possible.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.15.2
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_ACTIVESOCKET "(3), "

View File

@@ -0,0 +1,51 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_LOCAL_IP 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_LOCAL_IP \- get local IP address of last connection
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_LOCAL_IP, char **ip);
.SH DESCRIPTION
Pass a pointer to a char pointer to receive the pointer to a zero-terminated
string holding the IP address of the local end of most recent connection done
with this \fBcurl\fP handle. This string may be IPv6 when that is
enabled. Note that you get a pointer to a memory area that will be re-used at
next request so you need to copy the string if you want to keep the
information.
The \fBip\fP pointer will be NULL or pointing to private memory you MUST NOT
free - it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the
corresponding CURL handle.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.21.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_PRIMARY_IP "(3), "

View File

@@ -0,0 +1,43 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_LOCAL_PORT 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_LOCAL_PORT \- get the latest local port number
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_LOCAL_PORT, long *portp);
.SH DESCRIPTION
Pass a pointer to a long to receive the local port number of the most recent
connection done with this \fBcurl\fP handle.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.21.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_PRIMARY_PORT "(3), " CURLINFO_LOCAL_IP "(3), "

View File

@@ -0,0 +1,44 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_NAMELOOKUP_TIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_NAMELOOKUP_TIME \- get the name lookup time
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_NAMELOOKUP_TIME, double *timep);
.SH DESCRIPTION
Pass a pointer to a double to receive the total time in seconds from the start
until the name resolving was completed.
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.4.1
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,46 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_NUM_CONNECTS 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_NUM_CONNECTS \- get number of created connections
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_NUM_CONNECTS, long *nump);
.SH DESCRIPTION
Pass a pointer to a long to receive how many new connections libcurl had to
create to achieve the previous transfer (only the successful connects are
counted). Combined with \fICURLINFO_REDIRECT_COUNT(3)\fP you are able to know
how many times libcurl successfully reused existing connection(s) or not. See
the connection options of \fIcurl_easy_setopt(3)\fP to see how libcurl tries
to make persistent connections to save time.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.12.3
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,43 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_OS_ERRNO 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_OS_ERRNO \- get errno number from last connect failure
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_OS_ERRNO, long *errnop);
.SH DESCRIPTION
Pass a pointer to a long to receive the errno variable from a connect failure.
Note that the value is only set on failure, it is not reset upon a successful
operation. The number is OS and system specific.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.12.2
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,47 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PRETRANSFER_TIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_PRETRANSFER_TIME \- get the time until the file transfer start
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRETRANSFER_TIME, double *timep);
.SH DESCRIPTION
Pass a pointer to a double to receive the time, in seconds, it took from the
start until the file transfer is just about to begin. This includes all
pre-transfer commands and negotiations that are specific to the particular
protocol(s) involved. It does \fInot\fP involve the sending of the protocol-
specific request that triggers a transfer.
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.4.1
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,49 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PRIMARY_IP 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_PRIMARY_IP \- get IP address of last connection
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRIMARY_IP, char **ip);
.SH DESCRIPTION
Pass a pointer to a char pointer to receive the pointer to a zero-terminated
string holding the IP address of the most recent connection done with this
\fBcurl\fP handle. This string may be IPv6 when that is enabled. Note that you
get a pointer to a memory area that will be re-used at next request so you
need to copy the string if you want to keep the information.
The \fBip\fP pointer will be NULL or pointing to private memory you MUST NOT
free - it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the
corresponding CURL handle.
.SH PROTOCOLS
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.19.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_PRIMARY_PORT "(3), " CURLINFO_LOCAL_IP "(3), "

View File

@@ -0,0 +1,42 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PRIMARY_PORT 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_PRIMARY_PORT \- get the latest destination port number
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRIMARY_PORT, long *portp);
.SH DESCRIPTION
Pass a pointer to a long to receive the destination port of the most recent
connection done with this \fBcurl\fP handle.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.21.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,45 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PRIVATE 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_PRIVATE \- get the private pointer
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRIVATE, char **private);
.SH DESCRIPTION
Pass a pointer to a char pointer to receive the pointer to the private data
associated with the curl handle (set with the \fICURLOPT_PRIVATE(3)\fP).
Please note that for internal reasons, the value is returned as a char
pointer, although effectively being a 'void *'.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.10.3
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLOPT_PRIVATE "(3), "

View File

@@ -0,0 +1,44 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PROXYAUTH_AVAIL 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_PROXYAUTH_AVAIL \- get available HTTP proxy authentication methods
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROXYAUTH_AVAIL, long *authp);
.SH DESCRIPTION
Pass a pointer to a long to receive a bitmask indicating the authentication
method(s) available according to the previous response. The meaning of the
bits is explained in the \fICURLOPT_PROXYAUTH(3)\fP option for
\fIcurl_easy_setopt(3)\fP.
.SH PROTOCOLS
HTTP(S)
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.10.8
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,42 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_REDIRECT_COUNT 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_REDIRECT_COUNT \- get the number of redirects
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REDIRECT_COUNT, long *countp);
.SH DESCRIPTION
Pass a pointer to a long to receive the total number of redirections that were
actually followed.
.SH PROTOCOLS
HTTP(S)
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.9.7
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,46 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_REDIRECT_TIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_REDIRECT_TIME \- get the time for all redirection steps
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REDIRECT_TIME, double *timep);
.SH DESCRIPTION
Pass a pointer to a double to receive the total time, in seconds, it took for
all redirection steps include name lookup, connect, pretransfer and transfer
before final transaction was started. CURLINFO_REDIRECT_TIME contains the
complete execution time for multiple redirections.
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.9.7
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,45 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_REDIRECT_URL 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_REDIRECT_URL \- get the URL a redirect would go to
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REDIRECT_URL, char **urlp);
.SH DESCRIPTION
Pass a pointer to a char pointer to receive the URL a redirect \fIwould\fP
take you to if you would enable \fICURLOPT_FOLLOWLOCATION(3)\fP. This can come
very handy if you think using the built-in libcurl redirect logic isn't good
enough for you but you would still prefer to avoid implementing all the magic
of figuring out the new URL.
.SH PROTOCOLS
HTTP(S)
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.18.2
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,45 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_REQUEST_SIZE 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_REQUEST_SIZE \- get size of sent request
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REQUEST_SIZE, long *sizep);
.SH DESCRIPTION
Pass a pointer to a long to receive the total size of the issued
requests. This is so far only for HTTP requests. Note that this may be more
than one request if \fICURLOPT_FOLLOWLOCATION(3)\fP is enabled.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.4.1
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_HEADER_SIZE "(3), "
.BR CURLINFO_SIZE_DOWNLOAD "(3), "

View File

@@ -0,0 +1,48 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_RESPONSE_CODE 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_RESPONSE_CODE \- get the last response code
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RESPONSE_CODE, long *codep);
.SH DESCRIPTION
Pass a pointer to a long to receive the last received HTTP, FTP or SMTP
response code. This option was previously known as CURLINFO_HTTP_CODE in
libcurl 7.10.7 and earlier. The stored value will be zero if no server
response code has been received. Note that a proxy's CONNECT response should
be read with \fICURLINFO_HTTP_CONNECTCODE(3)\fP and not this.
Support for SMTP responses added in 7.25.0.
.SH PROTOCOLS
HTTP, FTP and SMTP
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.10.8. CURLINFO_HTTP_CODE was added in 7.4.1.
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_HTTP_CONNECTCODE "(3), "

View File

@@ -0,0 +1,42 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_RTSP_CLIENT_CSEQ 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_RTSP_CLIENT_CSEQ \- get the next RTSP client CSeq
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_CLIENT_CSEQ, long *cseq);
.SH DESCRIPTION
Pass a pointer to a long to receive the next CSeq that will be used by the
application.
.SH PROTOCOLS
RTSP
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.20.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,44 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_RTSP_CSEQ_RECV 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_RTSP_CSEQ_RECV \- get the recently received CSeq
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_CSEQ_RECV, long *cseq);
.SH DESCRIPTION
Pass a pointer to a long to receive the most recently received CSeq from the
server. If your application encounters a \fICURLE_RTSP_CSEQ_ERROR\fP then you
may wish to troubleshoot and/or fix the CSeq mismatch by peeking at this
value.
.SH PROTOCOLS
RTSP
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.20.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,47 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_RTSP_SERVER_CSEQ 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_RTSP_SERVER_CSEQ \- get the next RTSP server CSeq
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_SERVER_CSEQ, long *cseq);
.SH DESCRIPTION
Pass a pointer to a long to receive the next CSeq that will be expected by the
application.
Llistening for server initiated requests is currently unimplemented!
Applications wishing to resume an RTSP session on another connection should
retrieve this info before closing the active connection.
.SH PROTOCOLS
RTSP
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.20.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,49 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_RTSP_SESSION_ID 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_RTSP_SESSION_ID \- get RTSP session ID
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_SESSION_ID, char **id);
.SH DESCRIPTION
Pass a pointer to a char pointer to receive a pointer to a string holding the
most recent RTSP Session ID.
Applications wishing to resume an RTSP session on another connection should
retrieve this info before closing the active connection.
The \fBid\fP pointer will be NULL or pointing to private memory you MUST NOT
free - it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the
corresponding CURL handle.
.SH PROTOCOLS
RTSP
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.20.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,45 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SIZE_DOWNLOAD 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_SIZE_DOWNLOAD \- get the number of downloaded bytes
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_DOWNLOAD, double *dlp);
.SH DESCRIPTION
Pass a pointer to a double to receive the total amount of bytes that were
downloaded. The amount is only for the latest transfer and will be reset
again for each new transfer. This counts actual payload data, what's also
commonly called body. All meta and header data are excluded and will not be
counted in this number.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.4.1
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,42 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SIZE_UPLOAD 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_SIZE_UPLOAD \- get the number of uploaded bytes
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_UPLOAD, double *uploadp);
.SH DESCRIPTION
Pass a pointer to a double to receive the total amount of bytes that were
uploaded.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.4.1
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,42 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SPEED_DOWNLOAD 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_SPEED_DOWNLOAD \- get download speed
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_DOWNLOAD, double *speed);
.SH DESCRIPTION
Pass a pointer to a double to receive the average download speed that curl
measured for the complete download. Measured in bytes/second.
.SH PROTOCOLS
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.4.1
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_SPEED_UPLOAD "(3), "

View File

@@ -0,0 +1,42 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SPEED_UPLOAD 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_SPEED_UPLOAD \- get upload speed
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_UPLOAD, double *speed);
.SH DESCRIPTION
Pass a pointer to a double to receive the average upload speed that curl
measured for the complete upload. Measured in bytes/second.
.SH PROTOCOLS
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_SPEED_DOWNLOAD "(3), "

View File

@@ -0,0 +1,47 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SSL_ENGINES 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_SSL_ENGINES \- get an slist of OpenSSL crypto-engines
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SSL_ENGINES,
struct curl_slist **engine_list);
.SH DESCRIPTION
Pass the address of a 'struct curl_slist *' to receive a linked-list of
OpenSSL crypto-engines supported. Note that engines are normally implemented
in separate dynamic libraries. Hence not all the returned engines may be
available at run-time. \fBNOTE:\fP you must call \fIcurl_slist_free_all(3)\fP
on the list pointer once you're done with it, as libcurl will not free the
data for you.
.SH PROTOCOLS
All TLS based ones.
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.12.3. Available in OpenSSL builds with "engine" support.
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,43 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SSL_VERIFYRESULT 3 "1 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_SSL_VERIFYRESULT \- get the result of the certification verification
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SSL_VERIFYRESULT, long *result);
.SH DESCRIPTION
Pass a pointer to a long to receive the result of the certification
verification that was requested (using the \fICURLOPT_SSL_VERIFYPEER(3)\fP
option.
.SH PROTOCOLS
All using TLS
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.5
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,46 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_STARTTRANSFER_TIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_STARTTRANSFER_TIME \- get the time until the first byte is received
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_STARTTRANSFER_TIME, double *timep);
.SH DESCRIPTION
Pass a pointer to a double to receive the time, in seconds, it took from the
start until the first byte is received by libcurl. This includes
\fICURLINFO_PRETRANSFER_TIME(3)\fP and also the time the server needs to
calculate the result.
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.9.2
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,80 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_TLS_SESSION 3 "12 Sep 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_TLS_SESSION \- get TLS session info
.SH SYNOPSIS
.nf
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_TLS_SESSION,
struct curl_tlssessioninfo **session);
.SH DESCRIPTION
Pass a pointer to a 'struct curl_tlssessioninfo *'. The pointer will be
initialized to refer to a 'struct curl_tlssessioninfo *' that will contain an
enum indicating the SSL library used for the handshake and the respective
internal TLS session structure of this underlying SSL library.
This may then be used to extract certificate information in a format
convenient for further processing, such as manual validation. NOTE: this
option may not be available for all SSL backends; unsupported SSL backends
will always return NULL in the \fIinternals\fP pointer to indicate that they
are not supported.
.nf
struct curl_tlssessioninfo {
curl_sslbackend backend;
void *internals;
};
.fi
The \fIbackend\fP struct member is one of the defines in the CURLSSLBACKEND_*
series: CURLSSLBACKEND_NONE (when built without TLS support),
CURLSSLBACKEND_OPENSSL, CURLSSLBACKEND_GNUTLS, CURLSSLBACKEND_NSS,
CURLSSLBACKEND_GSKIT, CURLSSLBACKEND_POLARSSL, CURLSSLBACKEND_CYASSL,
CURLSSLBACKEND_SCHANNEL, CURLSSLBACKEND_DARWINSSL or
CURLSSLBACKEND_AXTLS. (Note that the OpenSSL forks are all reported as just
OpenSSL here.)
The \fIinternals\fP struct member will point to a TLS library specific pointer
with the following underlying types:
.RS
.IP OpenSSL
SSL_CTX *
.IP GnuTLS
gnutls_session_t
.IP NSS
PRFileDesc *
.IP gskit
gsk_handle
.RE
.SH PROTOCOLS
All TLS-based
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.34.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -0,0 +1,45 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_TOTAL_TIME 3 "28 Aug 2015" "libcurl 7.44.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_TOTAL_TIME \- get total time of previous transfer
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_TOTAL_TIME, double *timep);
.SH DESCRIPTION
Pass a pointer to a double to receive the total time in seconds for the
previous transfer, including name resolving, TCP connect etc. The double
represents the time in seconds, including fractions.
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
.SH PROTOCOLS
All
.SH EXAMPLE
TODO
.SH AVAILABILITY
Added in 7.4.1
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "

View File

@@ -27,8 +27,8 @@ CURLMOPT_PUSHFUNCTION \- callback that approves or denies server pushes
.nf .nf
#include <curl/curl.h> #include <curl/curl.h>
char *curl_pushheader_bynum(push_headers, int num); char *curl_pushheader_bynum(struct curl_pushheaders *h, size_t num);
char *curl_pushheader_byname(push_headers, const char *name); char *curl_pushheader_byname(struct curl_pushheaders *h, const char *name);
int curl_push_callback(CURL *parent, int curl_push_callback(CURL *parent,
CURL *easy, CURL *easy,
@@ -69,7 +69,7 @@ multi handle, the callback must not do that by itself.
The callback can access PUSH_PROMISE headers with two accessor The callback can access PUSH_PROMISE headers with two accessor
functions. These functions can only be used from within this callback and they functions. These functions can only be used from within this callback and they
can only access the PUSH_PROMISE headers. The normal response headers will be can only access the PUSH_PROMISE headers. The normal response headers will be
pased to the header callback for pushed streams just as for normal streams. passed to the header callback for pushed streams just as for normal streams.
.IP curl_pushheader_bynum .IP curl_pushheader_bynum
Returns the header at index 'num' (or NULL). The returned pointer points to a Returns the header at index 'num' (or NULL). The returned pointer points to a
"name:value" string that will be freed when this callback returns. "name:value" string that will be freed when this callback returns.
@@ -77,7 +77,8 @@ Returns the header at index 'num' (or NULL). The returned pointer points to a
Returns the value for the given header name (or NULL). This is a shortcut so Returns the value for the given header name (or NULL). This is a shortcut so
that the application doesn't have to loop through all headers to find the one that the application doesn't have to loop through all headers to find the one
it is interested in. The data pointed will be freed when this callback it is interested in. The data pointed will be freed when this callback
returns. returns. If more than one header field use the same name, this returns only
the first one.
.SH CALLBACK RETURN VALUE .SH CALLBACK RETURN VALUE
.IP "CURL_PUSH_OK (0)" .IP "CURL_PUSH_OK (0)"
The application has accepted the stream and it can now start receiving data, The application has accepted the stream and it can now start receiving data,
@@ -105,7 +106,7 @@ int push_callback(CURL *parent,
FILE *out; FILE *out;
headp = curl_pushheader_byname(headers, ":path"); headp = curl_pushheader_byname(headers, ":path");
if(headp && !strncmp(headp, "/push-", 6)) { if(headp && !strncmp(headp, "/push-", 6)) {
fprintf(stderr, "The PATH is %s\n", headp); fprintf(stderr, "The PATH is %s\\n", headp);
/* save the push here */ /* save the push here */
out = fopen("pushed-stream", "wb"); out = fopen("pushed-stream", "wb");

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
@@ -43,7 +43,7 @@ If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
.SH DEFAULT .SH DEFAULT
Built-in system specific Built-in system specific
.SH PROTOCOLS .SH PROTOCOLS
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc. All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
.SH EXAMPLE .SH EXAMPLE
TODO TODO
.SH AVAILABILITY .SH AVAILABILITY

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,7 +39,7 @@ to some limitation in openssl.
.SH DEFAULT .SH DEFAULT
NULL NULL
.SH PROTOCOLS .SH PROTOCOLS
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc. All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
.SH EXAMPLE .SH EXAMPLE
TODO TODO
.SH AVAILABILITY .SH AVAILABILITY

View File

@@ -30,9 +30,9 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CERTINFO, long certinfo);
.SH DESCRIPTION .SH DESCRIPTION
Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With
this enabled, libcurl will extract lots of information and data about the this enabled, libcurl will extract lots of information and data about the
certificates in the certificate chain used in the SSL connection. This data may certificates in the certificate chain used in the SSL connection. This data
then be retrieved after a transfer using \fIcurl_easy_getinfo(3)\fP and its may then be retrieved after a transfer using \fIcurl_easy_getinfo(3)\fP and
option \fICURLINFO_CERTINFO\fP. its option \fICURLINFO_CERTINFO(3)\fP.
.SH DEFAULT .SH DEFAULT
0 0
.SH PROTOCOLS .SH PROTOCOLS

View File

@@ -33,7 +33,7 @@ the required proxy authentication and connection setup, but no data transfer,
and then return. and then return.
The option can be used to simply test a connection to a server, but is more The option can be used to simply test a connection to a server, but is more
useful when used with the \fICURLINFO_LASTSOCKET\fP option to useful when used with the \fICURLINFO_ACTIVESOCKET(3)\fP option to
\fIcurl_easy_getinfo(3)\fP as the library can set up the connection and then \fIcurl_easy_getinfo(3)\fP as the library can set up the connection and then
the application can obtain the most recently used socket for special data the application can obtain the most recently used socket for special data
transfers. transfers.

View File

@@ -43,6 +43,14 @@ cookies.
This option only \fBreads\fP cookies. To make libcurl write cookies to file, This option only \fBreads\fP cookies. To make libcurl write cookies to file,
see \fICURLOPT_COOKIEJAR(3)\fP. see \fICURLOPT_COOKIEJAR(3)\fP.
Exercise caution if you are using this option and multiple transfers may occur.
If you 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 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 you use this option multiple times, you just add more files to read. If you use this option multiple times, you just add more files to read.
Subsequent files will add more cookies. Subsequent files will add more cookies.
.SH DEFAULT .SH DEFAULT

View File

@@ -43,6 +43,9 @@ If the cookie jar file can't be created or written to (when the
error for this. Using \fICURLOPT_VERBOSE(3)\fP or error for this. Using \fICURLOPT_VERBOSE(3)\fP or
\fICURLOPT_DEBUGFUNCTION(3)\fP will get a warning to display, but that is the \fICURLOPT_DEBUGFUNCTION(3)\fP will get a warning to display, but that is the
only visible feedback you get about this possibly lethal situation. only visible feedback you get about this possibly 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.
.SH DEFAULT .SH DEFAULT
NULL NULL
.SH PROTOCOLS .SH PROTOCOLS
@@ -55,4 +58,5 @@ Along with HTTP
Returns CURLE_OK if HTTP is supported, CURLE_UNKNOWN_OPTION if not, or Returns CURLE_OK if HTTP is supported, CURLE_UNKNOWN_OPTION if not, or
CURLE_OUT_OF_MEMORY if there was insufficient heap space. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
.SH "SEE ALSO" .SH "SEE ALSO"
.BR CURLOPT_COOKIEFILE "(3), " CURLOPT_COOKIE "(3), " CURLOPT_COOKIELIST "(3), " .BR CURLOPT_COOKIEFILE "(3), " CURLOPT_COOKIE "(3), "
.BR CURLOPT_COOKIELIST "(3), "

View File

@@ -36,16 +36,15 @@ Such a cookie can be either a single line in Netscape / Mozilla format or just
regular HTTP-style header (Set-Cookie: ...) format. This will also enable the regular HTTP-style header (Set-Cookie: ...) format. This will also enable the
cookie engine. This adds that single cookie to the internal cookie store. cookie engine. This adds that single cookie to the internal cookie store.
If you use the Set-Cookie format and don't specify a domain then the cookie Exercise caution if you are using this option and multiple transfers may occur.
is sent for any domain and will not be modified. If a server sets a cookie of If you use the Set-Cookie format and don't specify a domain then the cookie is
the same name (or maybe you've imported one) then both will be sent on a future sent for any domain (even after redirects are followed) and cannot be modified
transfer to that server, likely not what you intended. Either set a domain in by a server-set cookie. If a server sets a cookie of the same name (or maybe
Set-Cookie (doing that will include sub domains) or use the Netscape format as you've imported one) 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 as
shown in EXAMPLE. shown in EXAMPLE.
Starting in 7.43.0 the aforementioned any-domain cookies will not appear in the
lists exported by \fICURLINFO_COOKIELIST(3)\fP and \fICURLOPT_COOKIEJAR(3)\fP.
Additionally, there are commands available that perform actions if you pass in Additionally, there are commands available that perform actions if you pass in
these exact strings: these exact strings:
.IP ALL .IP ALL
@@ -117,4 +116,4 @@ RELOAD was added in 7.39.0
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
CURLE_OUT_OF_MEMORY if there was insufficient heap space. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
.SH "SEE ALSO" .SH "SEE ALSO"
.BR CURLOPT_COOKIEFILE "(3), " CURLOPT_COOKIEJAR "(3), " CURLOPT_COOKIE "(3), " .BR CURLOPT_COOKIEFILE "(3), " CURLOPT_COOKIEJAR "(3), " CURLOPT_COOKIE "(3), "

View File

@@ -88,7 +88,7 @@ void dump(const char *text,
size_t c; size_t c;
unsigned int width=0x10; unsigned int width=0x10;
fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n", fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\\n",
text, (long)size, (long)size); text, (long)size, (long)size);
for(i=0; i<size; i+= width) { for(i=0; i<size; i+= width) {
@@ -106,7 +106,7 @@ void dump(const char *text,
for(c = 0; (c < width) && (i+c < size); c++) for(c = 0; (c < width) && (i+c < size); c++)
fputc(ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.', stream); fputc(ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.', stream);
fputc('\n', stream); /* newline */ fputc('\\n', stream); /* newline */
} }
} }
@@ -167,7 +167,7 @@ int main(void)
res = curl_easy_perform(curl); res = curl_easy_perform(curl);
/* Check for errors */ /* Check for errors */
if(res != CURLE_OK) if(res != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n", fprintf(stderr, "curl_easy_perform() failed: %s\\n",
curl_easy_strerror(res)); curl_easy_strerror(res));
/* always cleanup */ /* always cleanup */

View File

@@ -0,0 +1,79 @@
.\" **************************************************************************
.\" * _ _ ____ _
.\" * 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.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DEFAULT_PROTOCOL 3 "18 Aug 2015" "libcurl 7.45.0" "curl_easy_setopt options"
.SH NAME
CURLOPT_DEFAULT_PROTOCOL \- default protocol to use if the URL is missing a
scheme name
.SH SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DEFAULT_PROTOCOL, char
*protocol);
.SH DESCRIPTION
This option tells libcurl to use \fIprotocol\fP if the URL is missing a scheme
name.
Use one of these protocol (scheme) names:
dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3,
pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
An unknown or unsupported protocol causes error
\fICURLE_UNSUPPORTED_PROTOCOL\fP when libcurl parses a schemeless URL. Parsing
happens when \fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP is
called. The protocols supported by libcurl will vary depending on how it was
built. Use \fIcurl_version_info(3)\fP if you need a list of protocol names
supported by the build of libcurl that you are using.
This option does not change the default proxy protocol (http).
Without this option libcurl would make a guess based on the host, see
\fICURLOPT_URL(3)\fP for details.
.SH DEFAULT
NULL (make a guess based on the host)
.SH PROTOCOLS
All
.SH EXAMPLE
.nf
curl = curl_easy_init();
if(curl) {
/* set a URL without a scheme */
curl_easy_setopt(curl, CURLOPT_URL, "example.com");
/* set the default protocol (scheme) for schemeless URLs */
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
/* Perform the request */
curl_easy_perform(curl);
}
.fi
.SH AVAILABILITY
Added in 7.45.0
.SH RETURN VALUE
CURLE_OK if the option is supported.
CURLE_OUT_OF_MEMORY if there was insufficient heap space.
CURLE_UNKNOWN_OPTION if the option is not supported.
.SH "SEE ALSO"
.BR CURLOPT_URL "(3), "

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,7 +33,7 @@ socket. It will be used to seed the random engine for SSL.
.SH DEFAULT .SH DEFAULT
NULL NULL
.SH PROTOCOLS .SH PROTOCOLS
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc. All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
.SH EXAMPLE .SH EXAMPLE
TODO TODO
.SH AVAILABILITY .SH AVAILABILITY

View File

@@ -31,8 +31,8 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FILETIME, long gettime);
Pass a long. If it is 1, libcurl will attempt to get the modification time of Pass a long. If it is 1, libcurl will attempt to get the modification time of
the remote document in this operation. This requires that the remote server the remote document in this operation. This requires that the remote server
sends the time or replies to a time querying command. The sends the time or replies to a time querying command. The
\fIcurl_easy_getinfo(3)\fP function with the \fICURLINFO_FILETIME\fP argument \fIcurl_easy_getinfo(3)\fP function with the \fICURLINFO_FILETIME(3)\fP
can be used after a transfer to extract the received time (if any). argument can be used after a transfer to extract the received time (if any).
.SH DEFAULT .SH DEFAULT
0 0
.SH PROTOCOLS .SH PROTOCOLS

View File

@@ -37,7 +37,7 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FNMATCH_FUNCTION,
Pass a pointer to your callback function, which should match the prototype Pass a pointer to your callback function, which should match the prototype
shown above. shown above.
This callback s used for wildcard matching. This callback is used for wildcard matching.
Return \fICURL_FNMATCHFUNC_MATCH\fP if pattern matches the string, Return \fICURL_FNMATCHFUNC_MATCH\fP if pattern matches the string,
\fICURL_FNMATCHFUNC_NOMATCH\fP if not or \fICURL_FNMATCHFUNC_FAIL\fP if an \fICURL_FNMATCHFUNC_NOMATCH\fP if not or \fICURL_FNMATCHFUNC_FAIL\fP if an

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
@@ -28,22 +28,31 @@ CURLOPT_FOLLOWLOCATION \- follow HTTP 3xx redirects
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FOLLOWLOCATION, long enable); CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FOLLOWLOCATION, long enable);
.SH DESCRIPTION .SH DESCRIPTION
A parameter set to 1 tells the library to follow any Location: header that the A long parameter set to 1 tells the library to follow any Location: header
server sends as part of a HTTP header in a 3xx response. that the server sends as part of a HTTP header in a 3xx response. The
Location: header can specify a relative or an absolute URL to follow.
This means that libcurl will re-send the same request on the new location and libcurl will issue another request for the new URL and follow new Location:
follow new Location: headers all the way until no more such headers are headers all the way until no more such headers are returned.
returned. \fICURLOPT_MAXREDIRS(3)\fP can be used to limit the number of \fICURLOPT_MAXREDIRS(3)\fP can be used to limit the number of redirects
redirects libcurl will follow. libcurl will follow.
libcurl can limit to what protocols it will automatically follow. The accepted libcurl limits what protocols it automatically follows to. The accepted
protocols are set with \fICURLOPT_REDIR_PROTOCOLS(3)\fP and it excludes the protocols are set with \fICURLOPT_REDIR_PROTOCOLS(3)\fP. By default libcurl
FILE protocol by default. will allow all protocols on redirect except those disabled for security
reasons: Since 7.19.4 FILE and SCP are disabled, and since 7.40.0 SMB and SMBS
are also disabled.
When following a Location:, the 3xx response code that redirected it also
dictates which request method it will use in the subsequent request: For 301,
302 and 303 responses libcurl will switch method to GET unless
\fICURLOPT_POSTREDIR(3)\fP instructs libcurl otherwise. All other 3xx codes
will make libcurl send the same method again.
For users who think the existing location following is too naive, too simple For users who think the existing location following is too naive, too simple
or just lacks features, it is very easy to instead implement your own redirect or just lacks features, it is very easy to instead implement your own redirect
follow logic with the use of \fIcurl_easy_getinfo(3)\fP's follow logic with the use of \fIcurl_easy_getinfo(3)\fP's
\fICURLINFO_REDIRECT_URL\fP option instead of using \fICURLINFO_REDIRECT_URL(3)\fP option instead of using
\fICURLOPT_FOLLOWLOCATION(3)\fP. \fICURLOPT_FOLLOWLOCATION(3)\fP.
.SH DEFAULT .SH DEFAULT
0, disabled 0, disabled
@@ -68,3 +77,4 @@ Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO" .SH "SEE ALSO"
.BR CURLOPT_REDIR_PROTOCOLS "(3), " CURLOPT_PROTOCOLS "(3), " .BR CURLOPT_REDIR_PROTOCOLS "(3), " CURLOPT_PROTOCOLS "(3), "
.BR CURLOPT_POSTREDIR "(3), " .BR CURLOPT_POSTREDIR "(3), "
.BR CURLINFO_REDIRECT_URL "(3), ", CURLINFO_REDIRECT_COUNT "(3), "

View File

@@ -28,11 +28,15 @@ CURLOPT_HTTP_VERSION \- specify HTTP protocol version to use
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP_VERSION, long version); CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP_VERSION, long version);
.SH DESCRIPTION .SH DESCRIPTION
Pass \fIversion\fP a long, set to one of the values described below. They Pass \fIversion\fP a long, set to one of the values described below. They ask
force libcurl to use the specific HTTP versions. This is not sensible to do libcurl to use the specific HTTP versions. This is not sensible to do unless
unless you have a good reason. You have to set this option if you want to use you have a good reason. You have to set this option if you want to use
libcurl's HTTP/2 support. libcurl's HTTP/2 support.
Note that the HTTP version is just a request. libcurl will still prioritize to
re-use an existing connection so it might then re-use a connection using a
HTTP version you haven't asked for.
.IP CURL_HTTP_VERSION_NONE .IP CURL_HTTP_VERSION_NONE
We don't care about what version the library uses. libcurl will use whatever We don't care about what version the library uses. libcurl will use whatever
it thinks fit. it thinks fit.

View File

@@ -22,7 +22,7 @@
.\" .\"
.TH CURLOPT_IGNORE_CONTENT_LENGTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" .TH CURLOPT_IGNORE_CONTENT_LENGTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
.SH NAME .SH NAME
CURLOPT_IGNORE_CONTENT_LENGTH \- ignore Content-Length in HTTP response CURLOPT_IGNORE_CONTENT_LENGTH \- ignore content length
.SH SYNOPSIS .SH SYNOPSIS
.nf .nf
#include <curl/curl.h> #include <curl/curl.h>
@@ -30,12 +30,18 @@ CURLOPT_IGNORE_CONTENT_LENGTH \- ignore Content-Length in HTTP response
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IGNORE_CONTENT_LENGTH, CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IGNORE_CONTENT_LENGTH,
long ignore); long ignore);
.SH DESCRIPTION .SH DESCRIPTION
If \fIignore\fP is set to 1, ignore the Content-Length header in the HTTP If \fIignore\fP is set to 1L, ignore the Content-Length header in the HTTP
response. This is useful for Apache 1.x (and similar servers) which will response and ignore asking for or relying on it for FTP transfers.
This is useful for HTTP with Apache 1.x (and similar servers) which will
report incorrect content length for files over 2 gigabytes. If this option is report incorrect content length for files over 2 gigabytes. If this option is
used, curl will not be able to accurately report progress, and will simply used, curl will not be able to accurately report progress, and will simply
stop the download when the server ends the connection. stop the download when the server ends the connection.
It is also useful with FTP when for example the file is growing while the
transfer is in progress which otherwise will unconditionally cause libcurl to
report error.
Only use this option if strictly necessary. Only use this option if strictly necessary.
.SH DEFAULT .SH DEFAULT
0 0
@@ -54,7 +60,7 @@ if(curl) {
} }
.fi .fi
.SH AVAILABILITY .SH AVAILABILITY
Added in 7.14.1 Added in 7.14.1. Support for FTP added in 7.46.0.
.SH RETURN VALUE .SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO" .SH "SEE ALSO"

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
@@ -35,7 +35,7 @@ phrase to load a certificate but you need one to load your private key.
.SH DEFAULT .SH DEFAULT
NULL NULL
.SH PROTOCOLS .SH PROTOCOLS
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc. All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
.SH EXAMPLE .SH EXAMPLE
TODO TODO
.SH AVAILABILITY .SH AVAILABILITY

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