Compare commits
149 Commits
HTTPS-prox
...
curl-7_47_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
06bf874bbc | ||
![]() |
87a5d3d13e | ||
![]() |
d41dcba4e9 | ||
![]() |
3017d8a8d8 | ||
![]() |
cea1fd7a94 | ||
![]() |
14f92f2d2c | ||
![]() |
53d1e42c41 | ||
![]() |
b9da2cfed1 | ||
![]() |
5a28126b22 | ||
![]() |
1783070801 | ||
![]() |
b03f01742d | ||
![]() |
d58ba66eec | ||
![]() |
d566371130 | ||
![]() |
1074cca8cd | ||
![]() |
be538e0766 | ||
![]() |
be79d83b00 | ||
![]() |
35083ca60e | ||
![]() |
fdcc4d6daa | ||
![]() |
133cd19244 | ||
![]() |
4bed87f8fa | ||
![]() |
3ea77f6add | ||
![]() |
13b6d3b7dd | ||
![]() |
3d209b5fb0 | ||
![]() |
ebfe00c050 | ||
![]() |
fb7cbf75a5 | ||
![]() |
92a20413ac | ||
![]() |
5d7c9379ef | ||
![]() |
036c465e88 | ||
![]() |
bf93a1217c | ||
![]() |
5da7461a55 | ||
![]() |
b019af41e7 | ||
![]() |
325686ef9e | ||
![]() |
c338d8cf9c | ||
![]() |
984d1e9e23 | ||
![]() |
d9b4d1ce20 | ||
![]() |
336e8feec4 | ||
![]() |
89a1eb7b1c | ||
![]() |
973ee6bdd3 | ||
![]() |
3de2d48d4c | ||
![]() |
a2cae9aafd | ||
![]() |
46cb70e9fa | ||
![]() |
19ca40100b | ||
![]() |
b82359643d | ||
![]() |
1d15a509dd | ||
![]() |
a3b8a9e036 | ||
![]() |
2e503441ed | ||
![]() |
e45059214c | ||
![]() |
1c9298ff1b | ||
![]() |
ddfa0d850b | ||
![]() |
752171f016 | ||
![]() |
2aec4359db | ||
![]() |
38b055446a | ||
![]() |
4ca246c3a8 | ||
![]() |
a9ebd1bddc | ||
![]() |
90c2d215d7 | ||
![]() |
8fb8e16ea4 | ||
![]() |
2eb933e8aa | ||
![]() |
08554dff65 | ||
![]() |
7bf5f6e054 | ||
![]() |
520bd9e49f | ||
![]() |
24cf20ec68 | ||
![]() |
7cbe4d8d79 | ||
![]() |
fcabed6cd8 | ||
![]() |
18c95d4bc0 | ||
![]() |
328771981a | ||
![]() |
b064ff0c35 | ||
![]() |
bfe6f1f788 | ||
![]() |
a464f33843 | ||
![]() |
04cb90948e | ||
![]() |
c208c783f5 | ||
![]() |
bd431eef04 | ||
![]() |
5e0e81a9c4 | ||
![]() |
9e093f0e74 | ||
![]() |
58ac23dd16 | ||
![]() |
28533d3277 | ||
![]() |
c3eeb526ae | ||
![]() |
234abd9013 | ||
![]() |
f4646b9069 | ||
![]() |
151da51404 | ||
![]() |
1ff3a07be9 | ||
![]() |
15cb03ad84 | ||
![]() |
871ad2a0f2 | ||
![]() |
6c2c019654 | ||
![]() |
b4a39491ca | ||
![]() |
afcab2c2b6 | ||
![]() |
18ecdd0430 | ||
![]() |
8fbaf6749a | ||
![]() |
63a5a756a8 | ||
![]() |
15cf5a98b7 | ||
![]() |
727f775e59 | ||
![]() |
536f5f442e | ||
![]() |
4bcc532de5 | ||
![]() |
7f683b0ea8 | ||
![]() |
dd1b44c612 | ||
![]() |
fa9332d3ca | ||
![]() |
3b51652328 | ||
![]() |
f08fea7169 | ||
![]() |
034317d2af | ||
![]() |
12f6bf5e58 | ||
![]() |
b6d5cb40d7 | ||
![]() |
6c2a10e963 | ||
![]() |
df40b20e44 | ||
![]() |
e1b6b2219d | ||
![]() |
ec26399bf9 | ||
![]() |
b1f9424fa7 | ||
![]() |
738b0ba09e | ||
![]() |
a62000ecc9 | ||
![]() |
f606435419 | ||
![]() |
5eba895b4c | ||
![]() |
e643c5c908 | ||
![]() |
e7d8d8e257 | ||
![]() |
e2ae32ff5f | ||
![]() |
6623a485d3 | ||
![]() |
940c2f51aa | ||
![]() |
a47137c4a5 | ||
![]() |
5648f0a32c | ||
![]() |
2fddc4e3e1 | ||
![]() |
e55f15454e | ||
![]() |
fe7c39d353 | ||
![]() |
8f281fb76d | ||
![]() |
8cbd80686e | ||
![]() |
a14fa8f8ff | ||
![]() |
81ae6d01fa | ||
![]() |
19a8afb3c0 | ||
![]() |
78c25c854a | ||
![]() |
db05d7a731 | ||
![]() |
cd2b73b3ed | ||
![]() |
5b96b5e79e | ||
![]() |
99d17a5e2b | ||
![]() |
facf2925c7 | ||
![]() |
be0d4141af | ||
![]() |
40c349ada9 | ||
![]() |
bb9ec5ebb2 | ||
![]() |
c341311a0e | ||
![]() |
fc5d783589 | ||
![]() |
98acebb526 | ||
![]() |
06b288a72d | ||
![]() |
d55f9071fb | ||
![]() |
b7f3f1b68f | ||
![]() |
c2f1730e17 | ||
![]() |
8d17117683 | ||
![]() |
c90e348579 | ||
![]() |
f024ece8c7 | ||
![]() |
ad6f6e17d3 | ||
![]() |
0ddc59be0a | ||
![]() |
bbb34b6f15 | ||
![]() |
41efdadf09 | ||
![]() |
6af80afe49 | ||
![]() |
80562083da |
10
.dir-locals.el
Normal file
10
.dir-locals.el
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
;;; Directory Local Variables
|
||||||
|
;;; See Info node `(emacs) Directory Variables' for more information.
|
||||||
|
|
||||||
|
((nil . ((indent-tabs-mode . nil)
|
||||||
|
(show-trailing-whitespace . t)))
|
||||||
|
(c-mode . ((c-basic-offset . 2)
|
||||||
|
))
|
||||||
|
(c++-mode . ((c-basic-offset . 2)
|
||||||
|
))
|
||||||
|
)
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -49,3 +49,4 @@ missing
|
|||||||
mkinstalldirs
|
mkinstalldirs
|
||||||
tags
|
tags
|
||||||
test-driver
|
test-driver
|
||||||
|
scripts/_curl
|
||||||
|
2
COPYING
2
COPYING
@@ -1,6 +1,6 @@
|
|||||||
COPYRIGHT AND PERMISSION NOTICE
|
COPYRIGHT AND PERMISSION NOTICE
|
||||||
|
|
||||||
Copyright (c) 1996 - 2015, Daniel Stenberg, <daniel@haxx.se>.
|
Copyright (c) 1996 - 2016, Daniel Stenberg, <daniel@haxx.se>.
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
|
@@ -140,7 +140,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \
|
|||||||
|
|
||||||
bin_SCRIPTS = curl-config
|
bin_SCRIPTS = curl-config
|
||||||
|
|
||||||
SUBDIRS = lib src include
|
SUBDIRS = lib src include scripts
|
||||||
DIST_SUBDIRS = $(SUBDIRS) tests packages docs
|
DIST_SUBDIRS = $(SUBDIRS) tests packages docs
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
@@ -160,10 +160,10 @@ dist-hook:
|
|||||||
done)
|
done)
|
||||||
|
|
||||||
html:
|
html:
|
||||||
cd docs; make html
|
cd docs && make html
|
||||||
|
|
||||||
pdf:
|
pdf:
|
||||||
cd docs; make pdf
|
cd docs && make pdf
|
||||||
|
|
||||||
check: test examples check-docs
|
check: test examples check-docs
|
||||||
|
|
||||||
|
194
RELEASE-NOTES
194
RELEASE-NOTES
@@ -1,73 +1,78 @@
|
|||||||
Curl and libcurl 7.46.0
|
Curl and libcurl 7.47.0
|
||||||
|
|
||||||
Public curl releases: 150
|
Public curl releases: 151
|
||||||
Command line options: 177
|
Command line options: 179
|
||||||
curl_easy_setopt() options: 221
|
curl_easy_setopt() options: 221
|
||||||
Public functions in libcurl: 61
|
Public functions in libcurl: 61
|
||||||
Contributors: 1322
|
Contributors: 1340
|
||||||
|
|
||||||
This release includes the following changes:
|
This release includes the following changes:
|
||||||
|
|
||||||
o configure: build silently by default
|
o version: Add flag CURL_VERSION_PSL for libpsl
|
||||||
o cookies: Add support for Publix Suffix List with libpsl
|
o http: added CURL_HTTP_VERSION_2TLS to do HTTP/2 for HTTPS only [8]
|
||||||
o vtls: added support for mbedTLS [7]
|
o curl: use 2TLS by default
|
||||||
o Added CURLOPT_STREAM_DEPENDS [8]
|
o curl --expect100-timeout: added [10]
|
||||||
o Added CURLOPT_STREAM_DEPENDS_E [9]
|
o Add .dir-locals and set c-basic-offset to 2 (for emacs) [16]
|
||||||
o Added CURLOPT_STREAM_WEIGHT [10]
|
|
||||||
o Added CURLFORM_CONTENTLEN [14]
|
|
||||||
o oauth2: Added support for OAUTHBEARER SASL mechanism to IMAP, POP3 and SNMP
|
|
||||||
|
|
||||||
This release includes the following bugfixes:
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
o des: Fix header conditional for Curl_des_set_odd_parity
|
o curl: avoid local drive traversal when saving file on Windows [33]
|
||||||
o ntlm: get rid of unconditional use of long long [1]
|
o NTLM: do not resuse proxy connections without diff proxy credentials [34]
|
||||||
o CURLOPT_CERTINFO.3: fix reference to CURLINFO_CERTINFO
|
o tests: Disable the OAUTHBEARER tests when using a non-default port number [1]
|
||||||
o docs: CURLINFO_LASTSOCKET => CURLINFO_ACTIVESOCKET [2]
|
o curl: remove keepalive #ifdef checks done on libcurl's behalf
|
||||||
o http2: Fix http2_recv to return -1 if recv returned -1
|
o formdata: Check if length is too large for memory [2]
|
||||||
o curl_global_init_mem: set function pointers before doing init
|
o lwip: Fix compatibility issues with later versions [3]
|
||||||
o ntlm: error out without 64bit support as the code needs it [1]
|
o openssl: BoringSSL doesn't have CONF_modules_free
|
||||||
o openssl: Fix set up of pkcs12 certificate verification chain
|
o config-win32: Fix warning HAVE_WINSOCK2_H undefined
|
||||||
o acinclude: remove PKGCONFIG override [3]
|
o build: fix compilation error with CURL_DISABLE_VERBOSE_STRINGS [4]
|
||||||
o test1531: case the size to fix the test on non-largefile builds
|
o http2: Fix hanging paused stream [5]
|
||||||
o fread_func: move callback pointer from set to state struct [4]
|
o scripts/Makefile: fix GNUism and survive no perl [6]
|
||||||
o test1601: fix compilation with --enable-debug and --disable-crypto-auth
|
o openssl: adapt to 1.1.0+ name changes
|
||||||
o http2: Don't pass unitialized name+len pairs to nghttp2_submit_request [5]
|
o openssl: adapt to openssl >= 1.1.0 X509 opaque structs [7]
|
||||||
o curlbuild.h: Fix non-configure compiling to mips and sh4 targets
|
o HTTP2.md: spell fix and remove TODO now implemented
|
||||||
o tool: Generate easysrc with last cache linked-list [6]
|
o setstropt: const-correctness [9]
|
||||||
o cmake: Fix for add_subdirectory(curl) use-case
|
o cyassl: fix compiler warning on type conversion
|
||||||
o vtls: fix compiler warning for TLS backends without sha256
|
o gskit: Fix host subject altname verification [11]
|
||||||
o build: fix for MSDOS/djgpp
|
o http2: Support trailer fields [12]
|
||||||
o checksrc: add crude // detection
|
o wolfssl: handle builds without SSLv3 support
|
||||||
o http2: on_frame_recv: trust the conn/data input
|
o cyassl: deal with lack of *get_peer_certificate [13]
|
||||||
o ftp: allow CURLOPT_IGNORE_CONTENT_LENGTH to ignore size [11]
|
o sockfilt: do not wait on unreliable file or pipe handle
|
||||||
o polarssl/mbedtls: fix name space pollution
|
o make: build zsh script even in an out-of-tree build
|
||||||
o build: Fix mingw ssl gdi32 order [12]
|
o test 1326: fix getting stuck on Windows
|
||||||
o build: Fix support for PKG_CONFIG
|
o test 87: fix file check on Windows
|
||||||
o MacOSX-Framework: sdk regex fix for sdk 10.10 and later
|
o configure: allow static builds on mingw [14]
|
||||||
o socks: Fix incorrect port numbers in failed connect messages
|
o configure: detect IPv6 support on Windows [15]
|
||||||
o curl.1: -E: s/private certificate/client certificate
|
o ConnectionExists: with *PIPEWAIT, wait for connections [17]
|
||||||
o curl.h: s/HTTPPOST_/CURL_HTTPOST_ [13]
|
o Makefile.inc: s/curl_SOURCES/CURL_FILES [18]
|
||||||
o curl_formadd: support >2GB files on windows [14]
|
o test 16: fixed for Windows
|
||||||
o http redirects: %-encode bytes outside of ascii range [15]
|
o test 252-255: use datacheck mode text for ASCII-mode LISTings
|
||||||
o rawstr: Speed up Curl_raw_toupper by 40%
|
o tftpd server: add Windows support by writing files in binary mode
|
||||||
o curl_ntlm_core: fix 2 curl_off_t constant overflows.
|
o ftplistparser: fix handling of file LISTings using Windows EOL
|
||||||
o getinfo: CURLINFO_ACTIVESOCKET: fix bad socket value
|
o tests first.c: fix calculation of sleep timeout on Windows
|
||||||
o tftp tests: verify sent options too
|
o tests (several): use datacheck mode text for ASCII-mode LISTings
|
||||||
o imap: Don't call imap_atom() when no mailbox specified in LIST command
|
o CURLOPT_RANGE.3: for HTTP servers, range support is optional
|
||||||
o imap: Fixed double quote in LIST command when mailbox contains spaces
|
o test 1515: add MSYS support by passing a relative path
|
||||||
o imap: Don't check for continuation when executing a CUSTOMREQUEST [16]
|
o curl_global_init.3: Add Windows-specific info for init via DLL [19]
|
||||||
o acinclude: Remove check for 16-bit curl_off_t
|
o http2: Fix client write for trailers on stream close [20]
|
||||||
o BoringSSL: Work with stricter BIO_get_mem_data() [17]
|
o mbedtls: Fix ALPN support
|
||||||
o cmake: Add missing feature macros in config header [18]
|
o connection reuse: IDN host names fixed [21]
|
||||||
o sasl_sspi: fixed unicode build for digest authentication [19]
|
o http2: Fix PUSH_PROMISE headers being treated as trailers [22]
|
||||||
o sasl_sspi: fix identity memory leak in digest authentication
|
o http2: handle the received SETTINGS frame [23]
|
||||||
o unit1602: Fixed failure in torture test
|
o http2: Ensure that http2_handle_stream_close is called [24]
|
||||||
o unit1603: Added unit tests for hash functions
|
o mbedtls: implement CURLOPT_PINNEDPUBLICKEY
|
||||||
o vtls/openssl: remove unused traces of yassl ifdefs
|
o runtests: Add mbedTLS to the SSL backends
|
||||||
o openssl: remove #ifdefs for < 0.9.7 support
|
o IDN host names: Remove the port number before converting to ACE [25]
|
||||||
o typecheck-gcc.h: add some missing options
|
o zsh.pl: fail if no curl is found
|
||||||
o curl: mark two more options strings for --libcurl output
|
o scripts: fix zsh completion generation
|
||||||
o openssl: Free modules on cleanup [20]
|
o scripts: don't generate and install zsh completion when cross-compiling [26]
|
||||||
|
o lib: Prefix URLs with lower-case protocol names/schemes [27]
|
||||||
|
o ConnectionExists: only do pipelining/multiplexing when asked [28]
|
||||||
|
o configure: assume IPv6 works when cross-compiled [29]
|
||||||
|
o openssl: for 1.1.0+ they now provide a SSLeay() macro of their own
|
||||||
|
o openssl: improved error detection/reporting
|
||||||
|
o ssh: CURLOPT_SSH_PUBLIC_KEYFILE now treats "" as NULL again [30]
|
||||||
|
o mbedtls: Fix pinned key return value on fail [31]
|
||||||
|
o maketgz: generate date stamp with LC_TIME=C [32]
|
||||||
|
|
||||||
This release includes the following known bugs:
|
This release includes the following known bugs:
|
||||||
|
|
||||||
@@ -76,35 +81,48 @@ 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, Dan Fandrich, Daniel Hwang, Daniel Stenberg, Dmitry S. Baikov,
|
Alessandro Ghedini, Anders Bakken, Christian Stewart, Dan Fandrich,
|
||||||
Douglas Creager, Erik Johansson, Gisle Vanem, Javier G. Sogo, John Levon,
|
Daniel Schauenberg, Daniel Stenberg, Francisco Moraes, Gisle Vanem,
|
||||||
Jonas Minnberg, Justin Ehlert, Kamil Dudka, Kang Lin, Kurt Fankhauser,
|
Isaac Boukris, Johannes Schindelin, John Kohl, Kamil Dudka, Marc Hoersken,
|
||||||
Lauri Kasanen, Marcel Raad, Patrick Monnerat, Rainer Jung, Ray Satiro,
|
Michael Kaufmann, Mohammad AlSaleh, Patrick Monnerat, Ray Satiro, Steve Holme,
|
||||||
Richard Hosking, Sebastian Pohlschmidt, Stefan Bühler, Steve Holme,
|
Tatsuhiro Tsujikawa, Thomas Glanzmann, Thomas Klausner,
|
||||||
Svyatoslav Mishyn, Tatsuhiro Tsujikawa, Tim Rühsen, xiangbin li,
|
(21 contributors)
|
||||||
(28 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] = http://curl.haxx.se/bug/?i=478
|
[1] = http://curl.haxx.se/mail/lib-2015-12/0003.html
|
||||||
[2] = http://curl.haxx.se/bug/?i=479
|
[2] = https://github.com/bagder/curl/issues/425#issuecomment-154518679
|
||||||
[3] = http://curl.haxx.se/mail/lib-2015-10/0035.html
|
[3] = http://curl.haxx.se/mail/lib-2015-12/0023.html
|
||||||
[4] = http://curl.haxx.se/bug/?i=346
|
[4] = http://curl.haxx.se/bug/?i=558
|
||||||
[5] = http://curl.haxx.se/bug/?i=493
|
[5] = http://curl.haxx.se/mail/lib-2015-11/0103.html
|
||||||
[6] = http://curl.haxx.se/bug/?i=452
|
[6] = http://curl.haxx.se/bug/?i=555
|
||||||
[7] = http://curl.haxx.se/bug/?i=496
|
[7] = http://curl.haxx.se/bug/?i=491
|
||||||
[8] = http://curl.haxx.se/libcurl/c/CURLOPT_STREAM_DEPENDS.html
|
[8] = http://curl.haxx.se/libcurl/c/CURLOPT_HTTP_VERSION.html
|
||||||
[9] = http://curl.haxx.se/libcurl/c/CURLOPT_STREAM_DEPENDS_E.html
|
[9] = http://curl.haxx.se/bug/?i=565
|
||||||
[10] = http://curl.haxx.se/libcurl/c/CURLOPT_STREAM_WEIGHT.html
|
[10] = http://curl.haxx.se/docs/manpage.html#--expect100-timeout
|
||||||
[11] = http://curl.haxx.se/bug/?i=480
|
[11] = http://curl.haxx.se/mail/lib-2015-12/0062.html
|
||||||
[12] = https://github.com/bagder/curl/pull/501
|
[12] = http://curl.haxx.se/bug/?i=564
|
||||||
[13] = http://curl.haxx.se/bug/?i=506
|
[13] = http://curl.haxx.se/bug/?i=565
|
||||||
[14] = http://curl.haxx.se/bug/?i=425
|
[14] = https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-curl
|
||||||
[15] = http://curl.haxx.se/bug/?i=473
|
[15] = https://github.com/Alexpux/MINGW-packages/commit/9253d0bf58a1486e91f7efb5316e7fdb48fa4007
|
||||||
[16] = http://curl.haxx.se/bug/?i=486
|
[16] = http://curl.haxx.se/bug/?i=574
|
||||||
[17] = http://curl.haxx.se/bug/?i=524
|
[17] = http://curl.haxx.se/bug/?i=575
|
||||||
[18] = http://curl.haxx.se/bug/?i=523
|
[18] = http://curl.haxx.se/bug/?i=577
|
||||||
[19] = http://curl.haxx.se/bug/?i=525
|
[19] = http://curl.haxx.se/bug/?i=586
|
||||||
[20] = http://curl.haxx.se/bug/?i=526
|
[20] = http://curl.haxx.se/bug/?i=564
|
||||||
|
[21] = http://curl.haxx.se/bug/?i=592
|
||||||
|
[22] = http://curl.haxx.se/bug/?i=564
|
||||||
|
[23] = http://curl.haxx.se/mail/lib-2016-01/0031.html
|
||||||
|
[24] = http://curl.haxx.se/bug/?i=564
|
||||||
|
[25] = http://curl.haxx.se/bug/?i=596
|
||||||
|
[26] = http://curl.haxx.se/bug/?i=582
|
||||||
|
[27] = http://curl.haxx.se/bug/?i=597
|
||||||
|
[28] = http://curl.haxx.se/bug/?i=584
|
||||||
|
[29] = http://curl.haxx.se/bug/?i=594
|
||||||
|
[30] = http://curl.haxx.se/mail/lib-2016-01/0072.html
|
||||||
|
[31] = http://curl.haxx.se/bug/?i=601
|
||||||
|
[32] = http://curl.haxx.se/mail/lib-2016-01/0123.html
|
||||||
|
[33] = http://curl.haxx.se/docs/adv_20160127B.html
|
||||||
|
[34] = http://curl.haxx.se/docs/adv_20160127A.html
|
||||||
|
59
configure.ac
59
configure.ac
@@ -5,7 +5,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 1998 - 2016, 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
|
||||||
@@ -1083,7 +1083,11 @@ AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
|
|||||||
|
|
||||||
AC_TRY_RUN([ /* is AF_INET6 available? */
|
AC_TRY_RUN([ /* is AF_INET6 available? */
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#else
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
#include <stdlib.h> /* for exit() */
|
#include <stdlib.h> /* for exit() */
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
@@ -1097,8 +1101,8 @@ main()
|
|||||||
ipv6=yes,
|
ipv6=yes,
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
ipv6=no,
|
ipv6=no,
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(yes)
|
||||||
ipv6=no
|
ipv6=yes
|
||||||
))
|
))
|
||||||
|
|
||||||
if test "$ipv6" = "yes"; then
|
if test "$ipv6" = "yes"; then
|
||||||
@@ -1110,7 +1114,12 @@ if test "$ipv6" = yes; then
|
|||||||
AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
|
AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
|
||||||
AC_TRY_COMPILE([
|
AC_TRY_COMPILE([
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <netinet/in.h>] ,
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#include <ws2tcpip.h>
|
||||||
|
#else
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#endif] ,
|
||||||
struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes)
|
struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes)
|
||||||
if test "$have_sin6_scope_id" = yes; then
|
if test "$have_sin6_scope_id" = yes; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -2166,11 +2175,11 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
|
|||||||
]])
|
]])
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
|
AC_DEFINE(USE_CYASSL, 1, [if CyaSSL/WolfSSL is enabled])
|
||||||
AC_SUBST(USE_CYASSL, [1])
|
AC_SUBST(USE_CYASSL, [1])
|
||||||
CYASSL_ENABLED=1
|
CYASSL_ENABLED=1
|
||||||
USE_CYASSL="yes"
|
USE_CYASSL="yes"
|
||||||
curl_ssl_msg="enabled (CyaSSL)"
|
curl_ssl_msg="enabled (WolfSSL)"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
@@ -2182,7 +2191,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$USE_CYASSL" = "xyes"; then
|
if test "x$USE_CYASSL" = "xyes"; then
|
||||||
AC_MSG_NOTICE([detected CyaSSL])
|
AC_MSG_NOTICE([detected $cyassllibname])
|
||||||
|
|
||||||
dnl cyassl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined!
|
dnl cyassl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined!
|
||||||
AC_CHECK_SIZEOF(long long)
|
AC_CHECK_SIZEOF(long long)
|
||||||
@@ -2195,6 +2204,16 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
|
|||||||
|
|
||||||
LIBS="-l$cyassllibname -lm $LIBS"
|
LIBS="-l$cyassllibname -lm $LIBS"
|
||||||
|
|
||||||
|
if test "x$cyassllibname" = "xwolfssl"; then
|
||||||
|
dnl Recent WolfSSL versions build without SSLv3 by default
|
||||||
|
dnl WolfSSL needs configure --enable-opensslextra to have *get_peer*
|
||||||
|
AC_CHECK_FUNCS(wolfSSLv3_client_method \
|
||||||
|
wolfSSL_get_peer_certificate)
|
||||||
|
else
|
||||||
|
dnl Cyassl needs configure --enable-opensslextra to have *get_peer*
|
||||||
|
AC_CHECK_FUNCS(CyaSSL_get_peer_certificate)
|
||||||
|
fi
|
||||||
|
|
||||||
if test -n "$cyassllib"; then
|
if test -n "$cyassllib"; then
|
||||||
dnl when shared libs were found in a path that the run-time
|
dnl when shared libs were found in a path that the run-time
|
||||||
dnl linker doesn't search through, we need to add it to
|
dnl linker doesn't search through, we need to add it to
|
||||||
@@ -3030,6 +3049,31 @@ if test X"$want_h2" != Xno; then
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl **********************************************************************
|
||||||
|
dnl Check for zsh completion path
|
||||||
|
dnl **********************************************************************
|
||||||
|
|
||||||
|
OPT_ZSH_FPATH=default
|
||||||
|
AC_ARG_WITH(zsh-functions-dir,
|
||||||
|
AC_HELP_STRING([--with-zsh-functions-dir=PATH],[Install zsh completions to PATH])
|
||||||
|
AC_HELP_STRING([--without-zsh-functions-dir],[Do not install zsh completions]),
|
||||||
|
[OPT_ZSH_FPATH=$withval])
|
||||||
|
case "$OPT_ZSH_FPATH" in
|
||||||
|
no)
|
||||||
|
dnl --without-zsh-functions-dir option used
|
||||||
|
;;
|
||||||
|
default|yes)
|
||||||
|
dnl --with-zsh-functions-dir option used without path
|
||||||
|
ZSH_FUNCTIONS_DIR="$datarootdir/zsh/site-functions"
|
||||||
|
AC_SUBST(ZSH_FUNCTIONS_DIR)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
dnl --with-zsh-functions-dir option used with path
|
||||||
|
ZSH_FUNCTIONS_DIR="$withval"
|
||||||
|
AC_SUBST(ZSH_FUNCTIONS_DIR)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
dnl Back to "normal" configuring
|
dnl Back to "normal" configuring
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
@@ -3797,6 +3841,7 @@ AC_CONFIG_FILES([Makefile \
|
|||||||
include/curl/Makefile \
|
include/curl/Makefile \
|
||||||
src/Makefile \
|
src/Makefile \
|
||||||
lib/Makefile \
|
lib/Makefile \
|
||||||
|
scripts/Makefile \
|
||||||
lib/libcurl.vers \
|
lib/libcurl.vers \
|
||||||
tests/Makefile \
|
tests/Makefile \
|
||||||
tests/certs/Makefile \
|
tests/certs/Makefile \
|
||||||
|
23
docs/FAQ
23
docs/FAQ
@@ -225,7 +225,9 @@ FAQ
|
|||||||
implement it for you, that is not a very friendly attitude. We spend a
|
implement it for you, that is not a very friendly attitude. We spend a
|
||||||
considerable time already on maintaining and developing curl. In order to
|
considerable time already on maintaining and developing curl. In order to
|
||||||
get more out of us, you should consider trading in some of your time and
|
get more out of us, you should consider trading in some of your time and
|
||||||
efforts in return.
|
efforts in return. Simply go to the GitHub repo which resides at
|
||||||
|
https://github.com/bagder/curl, fork the project, and create pull requests
|
||||||
|
with your proposed changes.
|
||||||
|
|
||||||
If you write the code, chances are bigger that it will get into curl faster.
|
If you write the code, chances are bigger that it will get into curl faster.
|
||||||
|
|
||||||
@@ -251,9 +253,10 @@ FAQ
|
|||||||
|
|
||||||
We still get help from companies. Haxx provides web site, bandwidth, mailing
|
We still get help from companies. Haxx provides web site, bandwidth, mailing
|
||||||
lists etc, sourceforge.net hosts project services we take advantage from,
|
lists etc, sourceforge.net hosts project services we take advantage from,
|
||||||
like the bug tracker and github hosts the primary git repository. Also
|
like the bug tracker, and GitHub hosts the primary git repository at
|
||||||
again, some companies have sponsored certain parts of the development in the
|
https://github.com/bagder/curl. Also again, some companies have sponsored
|
||||||
past and I hope some will continue to do so in the future.
|
certain parts of the development in the past and I hope some will continue to
|
||||||
|
do so in the future.
|
||||||
|
|
||||||
If you want to support our project, consider a donation or a banner-program
|
If you want to support our project, consider a donation or a banner-program
|
||||||
or even better: by helping us coding, documenting, testing etc.
|
or even better: by helping us coding, documenting, testing etc.
|
||||||
@@ -352,13 +355,15 @@ FAQ
|
|||||||
cryptography. When doing so, the Export Control Classification Number (ECCN)
|
cryptography. When doing so, the Export Control Classification Number (ECCN)
|
||||||
is used to identify the level of export control etc.
|
is used to identify the level of export control etc.
|
||||||
|
|
||||||
ASF gives a good explanation at https://www.apache.org/dev/crypto.html
|
Apache Software Foundation gives a good explanation of ECCNs at
|
||||||
|
https://www.apache.org/dev/crypto.html
|
||||||
|
|
||||||
We believe curl's number might be ECCN 5D002, another possibility is
|
We believe curl's number might be ECCN 5D002, another possibility is
|
||||||
5D992. It seems necessary to write them, asking to confirm.
|
5D992. It seems necessary to write them (the authority that administers ECCN
|
||||||
|
numbers), asking to confirm.
|
||||||
|
|
||||||
Comprehensible explanations of the meaning of such numbers and how to
|
Comprehensible explanations of the meaning of such numbers and how to obtain
|
||||||
obtain them (resp.) are here
|
them (resp.) are here
|
||||||
|
|
||||||
http://www.bis.doc.gov/licensing/exportingbasics.htm
|
http://www.bis.doc.gov/licensing/exportingbasics.htm
|
||||||
http://www.bis.doc.gov/licensing/do_i_needaneccn.html
|
http://www.bis.doc.gov/licensing/do_i_needaneccn.html
|
||||||
@@ -1087,7 +1092,7 @@ FAQ
|
|||||||
|
|
||||||
In such cases, the TCP/IP stack is responsible for detecting when the
|
In such cases, the TCP/IP stack is responsible for detecting when the
|
||||||
network connection is irrevocably lost. Since with some protocols it is
|
network connection is irrevocably lost. Since with some protocols it is
|
||||||
perfectly legal for the client wait indefinitely for data, the stack may
|
perfectly legal for the client to wait indefinitely for data, the stack may
|
||||||
never report a problem, and even when it does, it can take up to 20 minutes
|
never report a problem, and even when it does, it can take up to 20 minutes
|
||||||
for it to detect an issue. The curl option --keepalive-time enables
|
for it to detect an issue. The curl option --keepalive-time enables
|
||||||
keep-alive support in the TCP/IP stack which makes it periodically probe the
|
keep-alive support in the TCP/IP stack which makes it periodically probe the
|
||||||
|
@@ -100,8 +100,5 @@ automatically. [Spec](https://tools.ietf.org/html/draft-ietf-httpbis-alt-svc-05)
|
|||||||
TODO
|
TODO
|
||||||
----
|
----
|
||||||
|
|
||||||
- Provide API to set priorities / dependencies of individual streams
|
- Implement "prior-knowledge" HTTP/2 connections over clear text so that
|
||||||
|
|
||||||
- Implement "prior-knowledge" HTTP/2 connecitons over clear text so that
|
|
||||||
curl can connect with HTTP/2 at once without 1.1+Upgrade.
|
curl can connect with HTTP/2 at once without 1.1+Upgrade.
|
||||||
|
|
||||||
|
@@ -45,10 +45,10 @@ MAN2HTML= roffit < $< >$@
|
|||||||
SUFFIXES = .1 .html .pdf
|
SUFFIXES = .1 .html .pdf
|
||||||
|
|
||||||
html: $(HTMLPAGES)
|
html: $(HTMLPAGES)
|
||||||
cd libcurl; make html
|
cd libcurl && make html
|
||||||
|
|
||||||
pdf: $(PDFPAGES)
|
pdf: $(PDFPAGES)
|
||||||
cd libcurl; make pdf
|
cd libcurl && make pdf
|
||||||
|
|
||||||
.1.html:
|
.1.html:
|
||||||
$(MAN2HTML)
|
$(MAN2HTML)
|
||||||
|
@@ -23,13 +23,6 @@ HTTP/2
|
|||||||
As it would avoid the roundtrip-heavy Upgrade: procedures when you _know_
|
As it would avoid the roundtrip-heavy Upgrade: procedures when you _know_
|
||||||
it speaks HTTP/2.
|
it speaks HTTP/2.
|
||||||
|
|
||||||
- provide option to allow curl to default to HTTP/2 only when using HTTPS
|
|
||||||
|
|
||||||
We could switch on HTTP/2 by-default for HTTPS quite easily and it
|
|
||||||
shouldn't hurt anyone, while HTTP/2 for HTTP by default could introduce
|
|
||||||
lots of Upgrade: roundtrips that users won't like. So a separated option
|
|
||||||
alternative makes sense.
|
|
||||||
|
|
||||||
SRV records
|
SRV records
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
26
docs/THANKS
26
docs/THANKS
@@ -207,6 +207,7 @@ Christian Krause
|
|||||||
Christian Kurz
|
Christian Kurz
|
||||||
Christian Robottom Reis
|
Christian Robottom Reis
|
||||||
Christian Schmitz
|
Christian Schmitz
|
||||||
|
Christian Stewart
|
||||||
Christian Vogt
|
Christian Vogt
|
||||||
Christian Weisgerber
|
Christian Weisgerber
|
||||||
Christophe Demory
|
Christophe Demory
|
||||||
@@ -261,7 +262,9 @@ Daniel Kahn Gillmor
|
|||||||
Daniel Lee Hwang
|
Daniel Lee Hwang
|
||||||
Daniel Melani
|
Daniel Melani
|
||||||
Daniel Mentz
|
Daniel Mentz
|
||||||
|
Daniel Schauenberg
|
||||||
Daniel Seither
|
Daniel Seither
|
||||||
|
Daniel Shahaf
|
||||||
Daniel Steinberg
|
Daniel Steinberg
|
||||||
Daniel Stenberg
|
Daniel Stenberg
|
||||||
Daniel Theron
|
Daniel Theron
|
||||||
@@ -275,6 +278,7 @@ Dave May
|
|||||||
Dave Reisner
|
Dave Reisner
|
||||||
Dave Thompson
|
Dave Thompson
|
||||||
Dave Vasilevsky
|
Dave Vasilevsky
|
||||||
|
Davey Shafik
|
||||||
David Bau
|
David Bau
|
||||||
David Binderman
|
David Binderman
|
||||||
David Blaikie
|
David Blaikie
|
||||||
@@ -328,12 +332,14 @@ Dmitry Falko
|
|||||||
Dmitry Kurochkin
|
Dmitry Kurochkin
|
||||||
Dmitry Popov
|
Dmitry Popov
|
||||||
Dmitry Rechkin
|
Dmitry Rechkin
|
||||||
|
Dmitry S. Baikov
|
||||||
Dolbneff A.V
|
Dolbneff A.V
|
||||||
Domenico Andreoli
|
Domenico Andreoli
|
||||||
Dominick Meglio
|
Dominick Meglio
|
||||||
Dominique Leuenberger
|
Dominique Leuenberger
|
||||||
Doug Kaufman
|
Doug Kaufman
|
||||||
Doug Porter
|
Doug Porter
|
||||||
|
Douglas Creager
|
||||||
Douglas E. Wegscheid
|
Douglas E. Wegscheid
|
||||||
Douglas Kilpatrick
|
Douglas Kilpatrick
|
||||||
Douglas R. Horner
|
Douglas R. Horner
|
||||||
@@ -398,9 +404,11 @@ Feist Josselin
|
|||||||
Felix Yan
|
Felix Yan
|
||||||
Felix von Leitner
|
Felix von Leitner
|
||||||
Feng Tu
|
Feng Tu
|
||||||
|
Flavio Medeiros
|
||||||
Florian Schoppmann
|
Florian Schoppmann
|
||||||
Florian Weimer
|
Florian Weimer
|
||||||
Forrest Cahoon
|
Forrest Cahoon
|
||||||
|
Francisco Moraes
|
||||||
Frank Gevaerts
|
Frank Gevaerts
|
||||||
Frank Hempel
|
Frank Hempel
|
||||||
Frank Keeney
|
Frank Keeney
|
||||||
@@ -549,6 +557,7 @@ Jason Liu
|
|||||||
Jason McDonald
|
Jason McDonald
|
||||||
Jason S. Priebe
|
Jason S. Priebe
|
||||||
Javier Barroso
|
Javier Barroso
|
||||||
|
Javier G. Sogo
|
||||||
Jay Austin
|
Jay Austin
|
||||||
Jayesh A Shah
|
Jayesh A Shah
|
||||||
Jaz Fresh
|
Jaz Fresh
|
||||||
@@ -604,6 +613,7 @@ Johan Nilsson
|
|||||||
Johan van Selst
|
Johan van Selst
|
||||||
Johannes Bauer
|
Johannes Bauer
|
||||||
Johannes Ernst
|
Johannes Ernst
|
||||||
|
Johannes Schindelin
|
||||||
John Bradshaw
|
John Bradshaw
|
||||||
John Coffey
|
John Coffey
|
||||||
John Crow
|
John Crow
|
||||||
@@ -614,7 +624,9 @@ John Gardiner Myers
|
|||||||
John Janssen
|
John Janssen
|
||||||
John Joseph Bachir
|
John Joseph Bachir
|
||||||
John Kelly
|
John Kelly
|
||||||
|
John Kohl
|
||||||
John Lask
|
John Lask
|
||||||
|
John Levon
|
||||||
John Lightsey
|
John Lightsey
|
||||||
John Marino
|
John Marino
|
||||||
John Marshall
|
John Marshall
|
||||||
@@ -633,6 +645,7 @@ Jon Torrey
|
|||||||
Jon Travis
|
Jon Travis
|
||||||
Jon Turner
|
Jon Turner
|
||||||
Jonas Forsman
|
Jonas Forsman
|
||||||
|
Jonas Minnberg
|
||||||
Jonas Schnelli
|
Jonas Schnelli
|
||||||
Jonatan Lander
|
Jonatan Lander
|
||||||
Jonatan Vela
|
Jonatan Vela
|
||||||
@@ -661,6 +674,7 @@ Julien Nabet
|
|||||||
Julien Royer
|
Julien Royer
|
||||||
Jun-ichiro itojun Hagino
|
Jun-ichiro itojun Hagino
|
||||||
Jurij Smakov
|
Jurij Smakov
|
||||||
|
Justin Ehlert
|
||||||
Justin Fletcher
|
Justin Fletcher
|
||||||
Justin Karneges
|
Justin Karneges
|
||||||
Justin Maggard
|
Justin Maggard
|
||||||
@@ -672,6 +686,7 @@ Kai Sommerfeld
|
|||||||
Kai-Uwe Rommel
|
Kai-Uwe Rommel
|
||||||
Kalle Vahlman
|
Kalle Vahlman
|
||||||
Kamil Dudka
|
Kamil Dudka
|
||||||
|
Kang Lin
|
||||||
Kang-Jin Lee
|
Kang-Jin Lee
|
||||||
Karl Moerder
|
Karl Moerder
|
||||||
Karol Pietrzak
|
Karol Pietrzak
|
||||||
@@ -703,6 +718,7 @@ Krishnendu Majumdar
|
|||||||
Krister Johansen
|
Krister Johansen
|
||||||
Kristian Gunstone
|
Kristian Gunstone
|
||||||
Kristian Köhntopp
|
Kristian Köhntopp
|
||||||
|
Kurt Fankhauser
|
||||||
Kyle J. McKay
|
Kyle J. McKay
|
||||||
Kyle L. Huff
|
Kyle L. Huff
|
||||||
Kyle Sallee
|
Kyle Sallee
|
||||||
@@ -719,6 +735,7 @@ Lars Nilsson
|
|||||||
Lars Torben Wilson
|
Lars Torben Wilson
|
||||||
Lau Hang Kin
|
Lau Hang Kin
|
||||||
Laurent Rabret
|
Laurent Rabret
|
||||||
|
Lauri Kasanen
|
||||||
Legoff Vincent
|
Legoff Vincent
|
||||||
Lehel Bernadt
|
Lehel Bernadt
|
||||||
Leif W
|
Leif W
|
||||||
@@ -747,6 +764,7 @@ Lucas Adamski
|
|||||||
Lucas Pardue
|
Lucas Pardue
|
||||||
Ludek Finstrle
|
Ludek Finstrle
|
||||||
Ludovico Cavedon
|
Ludovico Cavedon
|
||||||
|
Lukas Ruzicka
|
||||||
Lukasz Czekierda
|
Lukasz Czekierda
|
||||||
Luke Amery
|
Luke Amery
|
||||||
Luke Call
|
Luke Call
|
||||||
@@ -855,6 +873,7 @@ Michal Marek
|
|||||||
Michał Fita
|
Michał Fita
|
||||||
Michał Górny
|
Michał Górny
|
||||||
Michał Kowalczyk
|
Michał Kowalczyk
|
||||||
|
Michał Piechowski
|
||||||
Michel Promonet
|
Michel Promonet
|
||||||
Michele Bini
|
Michele Bini
|
||||||
Miguel Angel
|
Miguel Angel
|
||||||
@@ -913,6 +932,7 @@ Nis Jorgensen
|
|||||||
Nobuhiro Ban
|
Nobuhiro Ban
|
||||||
Nodak Sodak
|
Nodak Sodak
|
||||||
Norbert Frese
|
Norbert Frese
|
||||||
|
Norbert Kett
|
||||||
Norbert Novotny
|
Norbert Novotny
|
||||||
Ofer
|
Ofer
|
||||||
Ola Mork
|
Ola Mork
|
||||||
@@ -1049,6 +1069,7 @@ Richard Bramante
|
|||||||
Richard Clayton
|
Richard Clayton
|
||||||
Richard Cooper
|
Richard Cooper
|
||||||
Richard Gorton
|
Richard Gorton
|
||||||
|
Richard Hosking
|
||||||
Richard Michael
|
Richard Michael
|
||||||
Richard Moore
|
Richard Moore
|
||||||
Richard Prescott
|
Richard Prescott
|
||||||
@@ -1122,6 +1143,7 @@ Scott Cantor
|
|||||||
Scott Davis
|
Scott Davis
|
||||||
Scott McCreary
|
Scott McCreary
|
||||||
Sean Boudreau
|
Sean Boudreau
|
||||||
|
Sebastian Pohlschmidt
|
||||||
Sebastian Rasmussen
|
Sebastian Rasmussen
|
||||||
Senthil Raja Velu
|
Senthil Raja Velu
|
||||||
Sergei Nikulov
|
Sergei Nikulov
|
||||||
@@ -1195,6 +1217,7 @@ Tatsuhiro Tsujikawa
|
|||||||
Temprimus
|
Temprimus
|
||||||
Terri Oda
|
Terri Oda
|
||||||
Thomas Braun
|
Thomas Braun
|
||||||
|
Thomas Glanzmann
|
||||||
Thomas J. Moore
|
Thomas J. Moore
|
||||||
Thomas Klausner
|
Thomas Klausner
|
||||||
Thomas L. Shinnick
|
Thomas L. Shinnick
|
||||||
@@ -1213,7 +1236,7 @@ Tim Costello
|
|||||||
Tim Harder
|
Tim Harder
|
||||||
Tim Heckman
|
Tim Heckman
|
||||||
Tim Newsome
|
Tim Newsome
|
||||||
Tim Ruehsen
|
Tim Rühsen
|
||||||
Tim Sneddon
|
Tim Sneddon
|
||||||
Tim Stack
|
Tim Stack
|
||||||
Tim Starling
|
Tim Starling
|
||||||
@@ -1302,6 +1325,7 @@ Wojciech Zwiefka
|
|||||||
Wouter Van Rooy
|
Wouter Van Rooy
|
||||||
Wu Yongzheng
|
Wu Yongzheng
|
||||||
Xavier Bouchoux
|
Xavier Bouchoux
|
||||||
|
Xiangbin Li
|
||||||
Yaakov Selkowitz
|
Yaakov Selkowitz
|
||||||
Yamada Yasuharu
|
Yamada Yasuharu
|
||||||
Yang Tse
|
Yang Tse
|
||||||
|
@@ -51,3 +51,4 @@ 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/
|
s/Todd Ouska$/Todd A Ouska/
|
||||||
|
s/Tim Ruehsen/Tim Rühsen/
|
||||||
|
112
docs/TODO
112
docs/TODO
@@ -27,11 +27,17 @@
|
|||||||
1.9 Cache negative name resolves
|
1.9 Cache negative name resolves
|
||||||
1.10 Support IDNA2008
|
1.10 Support IDNA2008
|
||||||
1.11 minimize dependencies with dynamicly loaded modules
|
1.11 minimize dependencies with dynamicly loaded modules
|
||||||
|
1.12 have form functions use CURL handle argument
|
||||||
|
1.13 Add CURLOPT_MAIL_CLIENT option
|
||||||
|
1.14 Typesafe curl_easy_setopt()
|
||||||
|
1.15 TCP Fast Open
|
||||||
|
1.16 Try to URL encode given URL
|
||||||
|
|
||||||
2. libcurl - multi interface
|
2. libcurl - multi interface
|
||||||
2.1 More non-blocking
|
2.1 More non-blocking
|
||||||
2.2 Fix HTTP Pipelining for PUT
|
2.2 Better support for same name resolves
|
||||||
2.3 Better support for same name resolves
|
2.3 Non-blocking curl_multi_remove_handle()
|
||||||
|
2.4 Split connect and authentication process
|
||||||
|
|
||||||
3. Documentation
|
3. Documentation
|
||||||
3.1 Update date and version in man pages
|
3.1 Update date and version in man pages
|
||||||
@@ -78,6 +84,7 @@
|
|||||||
11.1 File listing support
|
11.1 File listing support
|
||||||
11.2 Honor file timestamps
|
11.2 Honor file timestamps
|
||||||
11.3 Use NTLMv2
|
11.3 Use NTLMv2
|
||||||
|
11.4 Create remote directories
|
||||||
|
|
||||||
12. New protocols
|
12. New protocols
|
||||||
12.1 RSYNC
|
12.1 RSYNC
|
||||||
@@ -141,8 +148,6 @@
|
|||||||
21.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
|
21.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
|
||||||
21.7 remove progress meter from libcurl
|
21.7 remove progress meter from libcurl
|
||||||
21.8 remove 'curl_httppost' from public
|
21.8 remove 'curl_httppost' from public
|
||||||
21.9 have form functions use CURL handle argument
|
|
||||||
21.10 Add CURLOPT_MAIL_CLIENT option
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
@@ -236,6 +241,59 @@
|
|||||||
app/invoke/used protocols would be necessary to load. See
|
app/invoke/used protocols would be necessary to load. See
|
||||||
https://github.com/bagder/curl/issues/349
|
https://github.com/bagder/curl/issues/349
|
||||||
|
|
||||||
|
1.12 have form functions use CURL handle argument
|
||||||
|
|
||||||
|
curl_formadd() and curl_formget() both currently have no CURL handle
|
||||||
|
argument, but both can use a callback that is set in the easy handle, and
|
||||||
|
thus curl_formget() with callback cannot function without first having
|
||||||
|
curl_easy_perform() (or similar) called - which is hard to grasp and a design
|
||||||
|
mistake.
|
||||||
|
|
||||||
|
The curl_formadd() design can probably also be reconsidered to make it easier
|
||||||
|
to use and less error-prone. Probably easiest by splitting it into several
|
||||||
|
function calls.
|
||||||
|
|
||||||
|
1.13 Add CURLOPT_MAIL_CLIENT option
|
||||||
|
|
||||||
|
Rather than use the URL to specify the mail client string to present in the
|
||||||
|
HELO and EHLO commands, libcurl should support a new CURLOPT specifically for
|
||||||
|
specifying this data as the URL is non-standard and to be honest a bit of a
|
||||||
|
hack ;-)
|
||||||
|
|
||||||
|
Please see the following thread for more information:
|
||||||
|
http://curl.haxx.se/mail/lib-2012-05/0178.html
|
||||||
|
|
||||||
|
1.14 Typesafe curl_easy_setopt()
|
||||||
|
|
||||||
|
One of the most common problems in libcurl using applications is the lack of
|
||||||
|
type checks for curl_easy_setopt() which happens because it accepts varargs
|
||||||
|
and thus can take any type.
|
||||||
|
|
||||||
|
One possible solution to this is to introduce a few different versions of the
|
||||||
|
setopt version for the different kinds of data you can set.
|
||||||
|
|
||||||
|
curl_easy_set_num() - sets a long value
|
||||||
|
|
||||||
|
curl_easy_set_large() - sets a curl_off_t value
|
||||||
|
|
||||||
|
curl_easy_set_ptr() - sets a pointer
|
||||||
|
|
||||||
|
curl_easy_set_cb() - sets a callback PLUS its callback data
|
||||||
|
|
||||||
|
1.15 TCP Fast Open
|
||||||
|
|
||||||
|
RFC 7413 defines how to include data already in the TCP SYN handshake to
|
||||||
|
reduce latency.
|
||||||
|
|
||||||
|
1.16 Try to URL encode given URL
|
||||||
|
|
||||||
|
Given a URL that for example contains spaces, libcurl could have an option
|
||||||
|
that would try somewhat harder than it does now and convert spaces to %20 and
|
||||||
|
perhaps URL encoded byte values over 128 etc (basically do what the redirect
|
||||||
|
following code already does).
|
||||||
|
|
||||||
|
https://github.com/bagder/curl/issues/514
|
||||||
|
|
||||||
2. libcurl - multi interface
|
2. libcurl - multi interface
|
||||||
|
|
||||||
2.1 More non-blocking
|
2.1 More non-blocking
|
||||||
@@ -252,13 +310,7 @@
|
|||||||
- The "DONE" operation (post transfer protocol-specific actions) for the
|
- The "DONE" operation (post transfer protocol-specific actions) for the
|
||||||
protocols SFTP, SMTP, FTP. Fixing Curl_done() for this is a worthy task.
|
protocols SFTP, SMTP, FTP. Fixing Curl_done() for this is a worthy task.
|
||||||
|
|
||||||
2.2 Fix HTTP Pipelining for PUT
|
2.2 Better support for same name resolves
|
||||||
|
|
||||||
HTTP Pipelining can be a way to greatly enhance performance for multiple
|
|
||||||
serial requests and currently libcurl only supports that for HEAD and GET
|
|
||||||
requests but it should also be possible for PUT.
|
|
||||||
|
|
||||||
2.3 Better support for same name resolves
|
|
||||||
|
|
||||||
If a name resolve has been initiated for name NN and a second easy handle
|
If a name resolve has been initiated for name NN and a second easy handle
|
||||||
wants to resolve that name as well, make it wait for the first resolve to end
|
wants to resolve that name as well, make it wait for the first resolve to end
|
||||||
@@ -266,6 +318,20 @@
|
|||||||
especially needed when adding many simultaneous handles using the same host
|
especially needed when adding many simultaneous handles using the same host
|
||||||
name when the DNS resolver can get flooded.
|
name when the DNS resolver can get flooded.
|
||||||
|
|
||||||
|
2.3 Non-blocking curl_multi_remove_handle()
|
||||||
|
|
||||||
|
The multi interface has a few API calls that assume a blocking behavior, like
|
||||||
|
add_handle() and remove_handle() which limits what we can do internally. The
|
||||||
|
multi API need to be moved even more into a single function that "drives"
|
||||||
|
everything in a non-blocking manner and signals when something is done. A
|
||||||
|
remove or add would then only ask for the action to get started and then
|
||||||
|
multi_perform() etc still be called until the add/remove is completed.
|
||||||
|
|
||||||
|
2.4 Split connect and authentication process
|
||||||
|
|
||||||
|
The multi interface treats the authentication process as part of the connect
|
||||||
|
phase. As such any failures during authentication won't trigger the relevant
|
||||||
|
QUIT or LOGOFF for protocols such as IMAP, POP3 and SMTP.
|
||||||
|
|
||||||
3. Documentation
|
3. Documentation
|
||||||
|
|
||||||
@@ -460,6 +526,11 @@ The timestamp of the transferred file should reflect that of the original file.
|
|||||||
|
|
||||||
Currently the SMB authentication uses NTLMv1.
|
Currently the SMB authentication uses NTLMv1.
|
||||||
|
|
||||||
|
11.4 Create remote directories
|
||||||
|
|
||||||
|
Support for creating remote directories when uploading a file to a directory
|
||||||
|
that doesn't exist on the server, just like --ftp-create-dirs.
|
||||||
|
|
||||||
12. New protocols
|
12. New protocols
|
||||||
|
|
||||||
12.1 RSYNC
|
12.1 RSYNC
|
||||||
@@ -815,22 +886,3 @@ Currently the SMB authentication uses NTLMv1.
|
|||||||
|
|
||||||
Changing them to return a private handle will benefit the implementation and
|
Changing them to return a private handle will benefit the implementation and
|
||||||
allow us much greater freedoms while still maintaining a solid API and ABI.
|
allow us much greater freedoms while still maintaining a solid API and ABI.
|
||||||
|
|
||||||
21.9 have form functions use CURL handle argument
|
|
||||||
|
|
||||||
curl_formadd() and curl_formget() both currently have no CURL handle
|
|
||||||
argument, but both can use a callback that is set in the easy handle, and
|
|
||||||
thus curl_formget() with callback cannot function without first having
|
|
||||||
curl_easy_perform() (or similar) called - which is hard to grasp and a design
|
|
||||||
mistake.
|
|
||||||
|
|
||||||
21.10 Add CURLOPT_MAIL_CLIENT option
|
|
||||||
|
|
||||||
Rather than use the URL to specify the mail client string to present in the
|
|
||||||
HELO and EHLO commands, libcurl should support a new CURLOPT specifically for
|
|
||||||
specifying this data as the URL is non-standard and to be honest a bit of a
|
|
||||||
hack ;-)
|
|
||||||
|
|
||||||
Please see the following thread for more information:
|
|
||||||
http://curl.haxx.se/mail/lib-2012-05/0178.html
|
|
||||||
|
|
||||||
|
@@ -523,6 +523,13 @@ after having run curl.
|
|||||||
(SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket
|
(SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket
|
||||||
is used to seed the random engine for SSL connections. See also the
|
is used to seed the random engine for SSL connections. See also the
|
||||||
\fI--random-file\fP option.
|
\fI--random-file\fP option.
|
||||||
|
.IP "--expect100-timeout <seconds>"
|
||||||
|
(HTTP) Maximum time in seconds that you allow curl to wait for a 100-continue
|
||||||
|
response when curl emits an Expects: 100-continue header in its request. By
|
||||||
|
default curl will wait one second. This option accepts decimal values! When
|
||||||
|
curl stops waiting, it will continue as if the response has been received.
|
||||||
|
|
||||||
|
(Added in 7.47.0)
|
||||||
.IP "--cert-type <type>"
|
.IP "--cert-type <type>"
|
||||||
(SSL) Tells curl what certificate type the provided certificate is in. PEM,
|
(SSL) Tells curl what certificate type the provided certificate is in. PEM,
|
||||||
DER and ENG are recognized types. If not specified, PEM is assumed.
|
DER and ENG are recognized types. If not specified, PEM is assumed.
|
||||||
|
4
docs/examples/.gitignore
vendored
4
docs/examples/.gitignore
vendored
@@ -73,3 +73,7 @@ smtp-vrfy
|
|||||||
url2file
|
url2file
|
||||||
usercertinmem
|
usercertinmem
|
||||||
xmlstream
|
xmlstream
|
||||||
|
http2-download
|
||||||
|
http2-serverpush
|
||||||
|
http2-upload
|
||||||
|
imap-lsub
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 1998 - 2016, 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
|
||||||
@@ -32,7 +32,7 @@ check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \
|
|||||||
imap-list imap-lsub imap-fetch imap-store imap-append imap-examine \
|
imap-list imap-lsub imap-fetch imap-store imap-append imap-examine \
|
||||||
imap-search imap-create imap-delete imap-copy imap-noop imap-ssl \
|
imap-search imap-create imap-delete imap-copy imap-noop imap-ssl \
|
||||||
imap-tls imap-multi url2file sftpget ftpsget postinmemory http2-download \
|
imap-tls imap-multi url2file sftpget ftpsget postinmemory http2-download \
|
||||||
http2-upload http2-serverpush
|
http2-upload http2-serverpush getredirect
|
||||||
|
|
||||||
# These examples require external dependencies that may not be commonly
|
# These examples require external dependencies that may not be commonly
|
||||||
# available on POSIX systems, so don't bother attempting to compile them here.
|
# available on POSIX systems, so don't bother attempting to compile them here.
|
||||||
|
@@ -32,51 +32,7 @@ actually torture our web site with your tests! Thanks.
|
|||||||
|
|
||||||
EXAMPLES
|
EXAMPLES
|
||||||
|
|
||||||
anyauthput.c - HTTP PUT using "any" authentication method
|
Each example source code file is designed to be and work stand-alone and
|
||||||
cacertinmem.c - Use a built-in PEM certificate to retrieve a https page
|
rather self-explanatory. The examples may at times lack the level of error
|
||||||
cookie_interface.c - shows usage of simple cookie interface
|
checks you need in a real world, but that is then only for the sake of
|
||||||
curlgtk.c - download using a GTK progress bar
|
readability: to make the code smaller and easier to follow.
|
||||||
curlx.c - getting file info from the remote cert data
|
|
||||||
debug.c - showing how to use the debug callback
|
|
||||||
fileupload.c - uploading to a file:// URL
|
|
||||||
fopen.c - fopen() layer that supports opening URLs and files
|
|
||||||
ftpget.c - simple getting a file from FTP
|
|
||||||
ftpgetresp.c - get the response strings from the FTP server
|
|
||||||
ftpupload.c - upload a file to an FTP server
|
|
||||||
ftpuploadresume.c - resume an upload to an FTP server
|
|
||||||
getinfo.c - get the Content-Type from the recent transfer
|
|
||||||
getinmemory.c - download a file to memory only
|
|
||||||
ghiper.c - curl_multi_socket() using code with glib-2
|
|
||||||
hiperfifo.c - downloads all URLs written to the fifo, using
|
|
||||||
curl_multi_socket() and libevent
|
|
||||||
htmltidy.c - download a document and use libtidy to parse the HTML
|
|
||||||
htmltitle.cc - download a HTML file and extract the <title> tag from a HTML
|
|
||||||
page using libxml
|
|
||||||
http-post.c - HTTP POST
|
|
||||||
httpput.c - HTTP PUT a local file
|
|
||||||
https.c - simple HTTPS transfer
|
|
||||||
imap.c - simple IMAP transfer
|
|
||||||
multi-app.c - a multi-interface app
|
|
||||||
multi-debugcallback.c - a multi-interface app using the debug callback
|
|
||||||
multi-double.c - a multi-interface app doing two simultaneous transfers
|
|
||||||
multi-post.c - a multi-interface app doing a multipart formpost
|
|
||||||
multi-single.c - a multi-interface app getting a single file
|
|
||||||
multi-uv.c - a multi-interface app using libuv
|
|
||||||
multithread.c - an example using multi-treading transferring multiple files
|
|
||||||
opensslthreadlock.c - show how to do locking when using OpenSSL multi-threaded
|
|
||||||
persistant.c - request two URLs with a persistent connection
|
|
||||||
pop3s.c - POP3S transfer
|
|
||||||
pop3slist.c - POP3S LIST
|
|
||||||
post-callback.c - send a HTTP POST using a callback
|
|
||||||
postit2.c - send a HTTP multipart formpost
|
|
||||||
sampleconv.c - showing how a program on a non-ASCII platform would invoke
|
|
||||||
callbacks to do its own codeset conversions instead of using
|
|
||||||
the built-in iconv functions in libcurl
|
|
||||||
sepheaders.c - download headers to a separate file
|
|
||||||
simple.c - the most simple download a URL source
|
|
||||||
simplepost.c - HTTP POST
|
|
||||||
simplessl.c - HTTPS example with certificates many options set
|
|
||||||
synctime.c - Sync local time by extracting date from remote HTTP servers
|
|
||||||
url2file.c - download a document and store it in a file
|
|
||||||
xmlstream.c - Stream-parse a document using the streaming Expat parser
|
|
||||||
10-at-a-time.c - Download many files simultaneously, 10 at a time.
|
|
||||||
|
70
docs/examples/getredirect.c
Normal file
70
docs/examples/getredirect.c
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
|
* Show how to extract Location: header and URL to redirect to.
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
CURL *curl;
|
||||||
|
CURLcode res;
|
||||||
|
char *location;
|
||||||
|
long response_code;
|
||||||
|
|
||||||
|
curl = curl_easy_init();
|
||||||
|
if(curl) {
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||||
|
|
||||||
|
/* example.com is redirected, figure out the redirection! */
|
||||||
|
|
||||||
|
/* Perform the request, res will get the return code */
|
||||||
|
res = curl_easy_perform(curl);
|
||||||
|
/* Check for errors */
|
||||||
|
if(res != CURLE_OK)
|
||||||
|
fprintf(stderr, "curl_easy_perform() failed: %s\n",
|
||||||
|
curl_easy_strerror(res));
|
||||||
|
else {
|
||||||
|
res = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
|
||||||
|
if((res == CURLE_OK) &&
|
||||||
|
((code / 100) != 3)) {
|
||||||
|
/* a redirect implies a 3xx response code */
|
||||||
|
fprintf(stderr, "Not a redirect.\n");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
res = curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &location);
|
||||||
|
|
||||||
|
if((res == CURLE_OK) && location) {
|
||||||
|
/* This is the new absolute URL that you could redirect to, even if
|
||||||
|
* the Location: response header may have been a relative URL. */
|
||||||
|
printf("Redirected to: %s\n", location);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* always cleanup */
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
@@ -25,6 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
/* somewhat unix-specific */
|
/* somewhat unix-specific */
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
/* somewhat unix-specific */
|
/* somewhat unix-specific */
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
@@ -19,10 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/* <DESC>
|
/* <DESC>
|
||||||
* Simple IMAP APPEND use
|
* IMAP example showing how to send e-mails
|
||||||
* </DESC>
|
* </DESC>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* IMAP example showing how to copy an e-mail from one folder to another
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* IMAP example showing how to create a new folder
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* IMAP example showing how to delete a folder
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* IMAP example showing how to obtain information about a folder
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* IMAP example showing how to retreieve e-mails
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* IMAP example to list the folders within a mailbox
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* IMAP example to list the subscribed folders
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,7 +19,14 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* IMAP example using the multi interface
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
/* This is a simple example showing how to fetch mail using libcurl's IMAP
|
/* This is a simple example showing how to fetch mail using libcurl's IMAP
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* IMAP example showing how to perform a noop
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* IMAP example showing how to search for new e-mails
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* IMAP example using SSL
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* IMAP example showing how to modify the properties of an e-mail
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* IMAP example using TLS
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,7 +19,11 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
/* This is an example application source code using the multi interface. */
|
/* <DESC>
|
||||||
|
* A basic application source code using the multi interface doing two
|
||||||
|
* transfers in parallel.
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* POP3 example showing how to delete e-mails
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* POP3 example to list the contents of a mailbox
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,7 +19,14 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* POP3 example using the multi interface
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
/* This is a simple example showing how to retrieve mail using libcurl's POP3
|
/* This is a simple example showing how to retrieve mail using libcurl's POP3
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* POP3 example showing how to perform a noop
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* POP3 example showing how to retrieve e-mails
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* POP3 example using SSL
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* POP3 example showing how to obtain message statistics
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* POP3 example using TLS
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* POP3 example showing how to retreive only the headers of an e-mail
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* POP3 example to list the contents of a mailbox by unique ID
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,10 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
|
* Make a HTTP POST with data from memory and receive response in memory.
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,10 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
|
* HTTP Multipart formpost with file upload and two additional parts.
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
/* Example code that uploads a file name 'foo' to a remote script that accepts
|
/* Example code that uploads a file name 'foo' to a remote script that accepts
|
||||||
* "HTML form based" (as described in RFC1738) uploads using HTTP POST.
|
* "HTML form based" (as described in RFC1738) uploads using HTTP POST.
|
||||||
*
|
*
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,11 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
|
* Use the progress callbacks, old and/or new one depending on available
|
||||||
|
* libcurl version.
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,11 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
|
* Use CURLOPT_RESOLVE to feed custom IP addresses for given host name + port
|
||||||
|
* number combinations.
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -27,6 +27,10 @@
|
|||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
/* <DESC>
|
||||||
|
* A basic RTSP transfer
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,10 +19,13 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
|
* This is a simple example showing how a program on a non-ASCII platform
|
||||||
|
* would invoke callbacks to do its own codeset conversions instead of
|
||||||
|
* using the built-in iconv functions in libcurl.
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
This is a simple example showing how a program on a non-ASCII platform
|
|
||||||
would invoke callbacks to do its own codeset conversions instead of
|
|
||||||
using the built-in iconv functions in libcurl.
|
|
||||||
|
|
||||||
The IBM-1047 EBCDIC codeset is used for this example but the code
|
The IBM-1047 EBCDIC codeset is used for this example but the code
|
||||||
would be similar for other non-ASCII codesets.
|
would be similar for other non-ASCII codesets.
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,7 +19,10 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
/* An example of curl_easy_send() and curl_easy_recv() usage. */
|
/* <DESC>
|
||||||
|
* An example of curl_easy_send() and curl_easy_recv() usage.
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -66,6 +69,14 @@ int main(void)
|
|||||||
size_t iolen;
|
size_t iolen;
|
||||||
curl_off_t nread;
|
curl_off_t nread;
|
||||||
|
|
||||||
|
/* A general note of caution here: if you're using curl_easy_recv() or
|
||||||
|
curl_easy_send() to implement HTTP or _any_ other protocol libcurl
|
||||||
|
supports "natively", you're doing it wrong and you should stop.
|
||||||
|
|
||||||
|
This example uses HTTP only to show how to use this API, it does not
|
||||||
|
suggest that writing an application doing this is sensible.
|
||||||
|
*/
|
||||||
|
|
||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if(curl) {
|
if(curl) {
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,10 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
|
* Simple HTTP GET that stores the headers in a separate file
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,10 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
|
* Uses the CURLINFO_TLS_SESSION data.
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
/* Note that this example currently requires cURL to be linked against
|
/* Note that this example currently requires cURL to be linked against
|
||||||
GnuTLS (and this program must also be linked against -lgnutls). */
|
GnuTLS (and this program must also be linked against -lgnutls). */
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,10 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
|
* Gets a file using an SFTP URL.
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,10 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
|
* Very simple HTTP GET
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,10 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
|
* Very simple HTTP POST
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,10 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
|
* Shows HTTPS usage with client certs and optional ssl engine use.
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,9 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
/* This is a multi threaded application that uses a progress bar to show
|
/* <DESC>
|
||||||
|
* A multi threaded application that uses a progress bar to show
|
||||||
* status. It uses Gtk+ to make a smooth pulse.
|
* status. It uses Gtk+ to make a smooth pulse.
|
||||||
*
|
* </DESC>
|
||||||
|
*/
|
||||||
|
/*
|
||||||
* Written by Jud Bishop after studying the other examples provided with
|
* Written by Jud Bishop after studying the other examples provided with
|
||||||
* libcurl.
|
* libcurl.
|
||||||
*
|
*
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,11 +19,17 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* SMTP example showing how to expand an e-mail mailing list
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
/* This is a simple example showing how to expand an email mailing list.
|
/* This is a simple example showing how to expand an e-mail mailing list.
|
||||||
*
|
*
|
||||||
* Notes:
|
* Notes:
|
||||||
*
|
*
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* SMTP example showing how to send e-mails
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* SMTP example using the multi interface
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* SMTP example using SSL
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* SMTP example using TLS
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,11 +19,17 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* <DESC>
|
||||||
|
* SMTP example showing how to verify an e-mail address
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
/* This is a simple example showing how to verify an email address from an
|
/* This is a simple example showing how to verify an e-mail address from an
|
||||||
* SMTP server.
|
* SMTP server.
|
||||||
*
|
*
|
||||||
* Notes:
|
* Notes:
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,10 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
|
* Set your system time from a remote HTTP server's Date: header.
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
/* This example code only builds as-is on Windows.
|
/* This example code only builds as-is on Windows.
|
||||||
*
|
*
|
||||||
* While Unix/Linux user, you do not need this software.
|
* While Unix/Linux user, you do not need this software.
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,11 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
|
* Show the required mutex callback setups for GnuTLS and OpenSSL when using
|
||||||
|
* libcurl multi-threaded.
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
/* A multi-threaded example that uses pthreads and fetches 4 remote files at
|
/* A multi-threaded example that uses pthreads and fetches 4 remote files at
|
||||||
* once over HTTPS. The lock callbacks and stuff assume OpenSSL or GnuTLS
|
* once over HTTPS. The lock callbacks and stuff assume OpenSSL or GnuTLS
|
||||||
* (libgcrypt) so far.
|
* (libgcrypt) so far.
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,6 +19,10 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
|
* Download a given URL into a local file named page.out.
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 2013 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,9 +19,12 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
/* <DESC>
|
||||||
/* Example using an in memory PEM user certificate and RSA key to retrieve an
|
/* Example using an in memory PEM user certificate and RSA key to retrieve an
|
||||||
* https page.
|
* https page.
|
||||||
* Written by Ishan SinghLevett, based on Theo Borm's cacertinmem.c.
|
* </DESC>
|
||||||
|
*/
|
||||||
|
/* Written by Ishan SinghLevett, based on Theo Borm's cacertinmem.c.
|
||||||
* Note that to maintain simplicity this example does not use a CA certificate
|
* Note that to maintain simplicity this example does not use a CA certificate
|
||||||
* for peer verification. However, some form of peer verification
|
* for peer verification. However, some form of peer verification
|
||||||
* must be used in real circumstances when a secure connection is required.
|
* must be used in real circumstances when a secure connection is required.
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -19,8 +19,11 @@
|
|||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
/* Stream-parse a document using the streaming Expat parser.
|
/* <DESC>
|
||||||
* Written by David Strauss
|
* Stream-parse a document using the streaming Expat parser.
|
||||||
|
* </DESC>
|
||||||
|
*/
|
||||||
|
/* Written by David Strauss
|
||||||
*
|
*
|
||||||
* Expat => http://www.libexpat.org/
|
* Expat => http://www.libexpat.org/
|
||||||
*
|
*
|
||||||
|
@@ -99,13 +99,13 @@ libcurl-symbols.3: $(srcdir)/symbols-in-versions $(srcdir)/mksymbolsmanpage.pl
|
|||||||
perl $(srcdir)/mksymbolsmanpage.pl < $(srcdir)/symbols-in-versions > $@
|
perl $(srcdir)/mksymbolsmanpage.pl < $(srcdir)/symbols-in-versions > $@
|
||||||
|
|
||||||
html: $(HTMLPAGES)
|
html: $(HTMLPAGES)
|
||||||
cd opts; make html
|
cd opts && make html
|
||||||
|
|
||||||
.3.html:
|
.3.html:
|
||||||
$(MAN2HTML)
|
$(MAN2HTML)
|
||||||
|
|
||||||
pdf: $(PDFPAGES)
|
pdf: $(PDFPAGES)
|
||||||
cd opts; make pdf
|
cd opts && make pdf
|
||||||
|
|
||||||
.3.pdf:
|
.3.pdf:
|
||||||
@(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
|
@(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
|
||||||
|
@@ -50,6 +50,10 @@ This doesn't just mean no other thread that is using libcurl. Because
|
|||||||
similarly thread unsafe, it could conflict with any other thread that uses
|
similarly thread unsafe, it could conflict with any other thread that uses
|
||||||
these other libraries.
|
these other libraries.
|
||||||
|
|
||||||
|
If you are initializing libcurl from a Windows DLL you should not initialize it
|
||||||
|
from DllMain or a static initializer because Windows holds the loader lock
|
||||||
|
during that time and it could cause a deadlock.
|
||||||
|
|
||||||
See the description in \fBlibcurl(3)\fP of global environment requirements for
|
See the description in \fBlibcurl(3)\fP of global environment requirements for
|
||||||
details of how to use this function.
|
details of how to use this function.
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
.\" * | (__| |_| | _ <| |___
|
.\" * | (__| |_| | _ <| |___
|
||||||
.\" * \___|\___/|_| \_\_____|
|
.\" * \___|\___/|_| \_\_____|
|
||||||
.\" *
|
.\" *
|
||||||
.\" * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
.\" * Copyright (C) 1998 - 2016, 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
|
||||||
@@ -27,7 +27,8 @@ curl_multi_socket_action \- reads/writes available data given an action
|
|||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
CURLMcode curl_multi_socket_action(CURLM * multi_handle,
|
CURLMcode curl_multi_socket_action(CURLM * multi_handle,
|
||||||
curl_socket_t sockfd, int ev_bitmask,
|
curl_socket_t sockfd,
|
||||||
|
int ev_bitmask,
|
||||||
int *running_handles);
|
int *running_handles);
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
@@ -76,9 +76,9 @@ typedef struct {
|
|||||||
.fi
|
.fi
|
||||||
|
|
||||||
\fIage\fP describes what the age of this struct is. The number depends on how
|
\fIage\fP describes what the age of this struct is. The number depends on how
|
||||||
new the libcurl you're using is. You are however guaranteed to get a struct that you
|
new the libcurl you're using is. You are however guaranteed to get a struct
|
||||||
have a matching struct for in the header, as you tell libcurl your "age" with
|
that you have a matching struct for in the header, as you tell libcurl your
|
||||||
the input argument.
|
"age" with the input argument.
|
||||||
|
|
||||||
\fIversion\fP is just an ascii string for the libcurl version.
|
\fIversion\fP is just an ascii string for the libcurl version.
|
||||||
|
|
||||||
@@ -149,6 +149,10 @@ libcurl was built with support for HTTP2.
|
|||||||
.IP CURL_VERSION_UNIX_SOCKETS
|
.IP CURL_VERSION_UNIX_SOCKETS
|
||||||
libcurl was built with support for Unix domain sockets.
|
libcurl was built with support for Unix domain sockets.
|
||||||
(Added in 7.40.0)
|
(Added in 7.40.0)
|
||||||
|
.IP CURL_VERSION_PSL
|
||||||
|
libcurl was built with support for Mozilla's Public Suffix List. This makes
|
||||||
|
libcurl ignore cookies with a domain that's on the list.
|
||||||
|
(Added in 7.47.0)
|
||||||
.RE
|
.RE
|
||||||
\fIssl_version\fP is an ASCII string for the OpenSSL version used. If libcurl
|
\fIssl_version\fP is an ASCII string for the OpenSSL version used. If libcurl
|
||||||
has no SSL support, this is NULL.
|
has no SSL support, this is NULL.
|
||||||
|
@@ -194,6 +194,9 @@ object as the program starts up and the destructor as it terminates. As the
|
|||||||
author of this libcurl-using module, you can make the constructor call
|
author of this libcurl-using module, you can make the constructor call
|
||||||
\fIcurl_global_init(3)\fP and the destructor call \fIcurl_global_cleanup(3)\fP
|
\fIcurl_global_init(3)\fP and the destructor call \fIcurl_global_cleanup(3)\fP
|
||||||
and satisfy libcurl's requirements without your user having to think about it.
|
and satisfy libcurl's requirements without your user having to think about it.
|
||||||
|
(Caveat: If you are initializing libcurl from a Windows DLL you should not
|
||||||
|
initialize it from DllMain or a static initializer because Windows holds the
|
||||||
|
loader lock during that time and it could cause a deadlock.)
|
||||||
|
|
||||||
\fIcurl_global_init(3)\fP has an argument that tells what particular parts of
|
\fIcurl_global_init(3)\fP has an argument that tells what particular parts of
|
||||||
the global constant environment to set up. In order to successfully use any
|
the global constant environment to set up. In order to successfully use any
|
||||||
|
@@ -38,7 +38,19 @@ Support for SMTP responses added in 7.25.0.
|
|||||||
.SH PROTOCOLS
|
.SH PROTOCOLS
|
||||||
HTTP, FTP and SMTP
|
HTTP, FTP and SMTP
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
TODO
|
.nf
|
||||||
|
CURL *curl = curl_easy_init();
|
||||||
|
if(curl) {
|
||||||
|
CURLcode res;
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||||
|
res = curl_easy_perform(curl);
|
||||||
|
if(res == CURLE_OK) {
|
||||||
|
long response_code;
|
||||||
|
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
|
||||||
|
}
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
|
}
|
||||||
|
.fi
|
||||||
.SH AVAILABILITY
|
.SH AVAILABILITY
|
||||||
Added in 7.10.8. CURLINFO_HTTP_CODE was added in 7.4.1.
|
Added in 7.10.8. CURLINFO_HTTP_CODE was added in 7.4.1.
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
|
@@ -85,7 +85,7 @@ static size_t header_callback(char *buffer, size_t size,
|
|||||||
size_t nitems, void *userdata)
|
size_t nitems, void *userdata)
|
||||||
{
|
{
|
||||||
/* received header is nitems * size long in 'buffer' NOT ZERO TERMINATED */
|
/* received header is nitems * size long in 'buffer' NOT ZERO TERMINATED */
|
||||||
/* 'userdata' is set with CURLOPT_WRITEDATA */
|
/* 'userdata' is set with CURLOPT_HEADERDATA */
|
||||||
return nitems * size;
|
return nitems * size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -45,8 +45,15 @@ Enforce HTTP 1.0 requests.
|
|||||||
.IP CURL_HTTP_VERSION_1_1
|
.IP CURL_HTTP_VERSION_1_1
|
||||||
Enforce HTTP 1.1 requests.
|
Enforce HTTP 1.1 requests.
|
||||||
.IP CURL_HTTP_VERSION_2_0
|
.IP CURL_HTTP_VERSION_2_0
|
||||||
Attempt HTTP 2 requests. libcurl will fall back to HTTP 1.x if HTTP 2 can't be
|
Attempt HTTP 2 requests. libcurl will fall back to HTTP 1.1 if HTTP 2 can't be
|
||||||
negotiated with the server. (Added in 7.33.0)
|
negotiated with the server. (Added in 7.33.0)
|
||||||
|
|
||||||
|
The alias \fICURL_HTTP_VERSION_2\fI was added in 7.43.0 to better reflect the
|
||||||
|
actual protocol name.
|
||||||
|
.IP CURL_HTTP_VERSION_2TLS
|
||||||
|
Attempt HTTP 2 over TLS (HTTPS) only. libcurl will fall back to HTTP 1.1 if
|
||||||
|
HTTP 2 can't be negotiated with the HTTPS server. For clear text HTTP servers,
|
||||||
|
libcurl will use 1.1. (Added in 7.47.0)
|
||||||
.SH DEFAULT
|
.SH DEFAULT
|
||||||
CURL_HTTP_VERSION_NONE
|
CURL_HTTP_VERSION_NONE
|
||||||
.SH PROTOCOLS
|
.SH PROTOCOLS
|
||||||
|
@@ -91,8 +91,9 @@ footer:
|
|||||||
.fi
|
.fi
|
||||||
.SH AVAILABILITY
|
.SH AVAILABILITY
|
||||||
Added in 7.39.0 for OpenSSL, GnuTLS and GSKit. Added in 7.43.0 for
|
Added in 7.39.0 for OpenSSL, GnuTLS and GSKit. Added in 7.43.0 for
|
||||||
NSS and wolfSSL/CyaSSL. sha256 support added in 7.44.0 for OpenSSL,
|
NSS and wolfSSL/CyaSSL. Added for mbedtls in 7.47.0, sha256 support
|
||||||
GnuTLS, NSS and wolfSSL/CyaSSL. Other SSL backends not supported.
|
added in 7.44.0 for OpenSSL, GnuTLS, NSS and wolfSSL/CyaSSL. Other
|
||||||
|
SSL backends not supported.
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
Returns CURLE_OK if TLS enabled, CURLE_UNKNOWN_OPTION if not, or
|
Returns CURLE_OK if TLS enabled, 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.
|
||||||
|
@@ -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,9 +35,13 @@ out and X and Y are byte indexes.
|
|||||||
HTTP transfers also support several intervals, separated with commas as in
|
HTTP transfers also support several intervals, separated with commas as in
|
||||||
\fI"X-Y,N-M"\fP. Using this kind of multiple intervals will cause the HTTP
|
\fI"X-Y,N-M"\fP. Using this kind of multiple intervals will cause the HTTP
|
||||||
server to send the response document in pieces (using standard MIME separation
|
server to send the response document in pieces (using standard MIME separation
|
||||||
techniques). For RTSP, the formatting of a range should follow RFC2326 Section
|
techniques). Unfortunately, the HTTP standard (RFC 7233 section 3.1) allows
|
||||||
12.29. For RTSP, byte ranges are \fBnot\fP permitted. Instead, ranges should
|
servers to ignore range requests so even when you set \fICURLOPT_RANGE\fP for
|
||||||
be given in npt, utc, or smpte formats.
|
a request, you may end up getting the full response sent back.
|
||||||
|
|
||||||
|
For RTSP, the formatting of a range should follow RFC2326 Section 12.29. For
|
||||||
|
RTSP, byte ranges are \fBnot\fP permitted. Instead, ranges should be given in
|
||||||
|
npt, utc, or smpte formats.
|
||||||
|
|
||||||
Pass a NULL to this option to disable the use of ranges.
|
Pass a NULL to this option to disable the use of ranges.
|
||||||
.SH DEFAULT
|
.SH DEFAULT
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
.\" * | (__| |_| | _ <| |___
|
.\" * | (__| |_| | _ <| |___
|
||||||
.\" * \___|\___/|_| \_\_____|
|
.\" * \___|\___/|_| \_\_____|
|
||||||
.\" *
|
.\" *
|
||||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
.\" * Copyright (C) 1998 - 2016, 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
|
||||||
@@ -44,15 +44,14 @@ ADDRESS can of course be either IPv4 or IPv6 style addressing.
|
|||||||
|
|
||||||
This option effectively pre-populates the DNS cache with entries for the
|
This option effectively pre-populates the DNS cache with entries for the
|
||||||
host+port pair so redirects and everything that operations against the
|
host+port pair so redirects and everything that operations against the
|
||||||
HOST+PORT will instead use your provided ADDRESS. Addresses to set with
|
HOST+PORT will instead use your provided ADDRESS. Addresses set with
|
||||||
\fICURL_RESOLVE\fP will not time-out from the DNS cache like ordinary
|
\fICURL_RESOLVE\fP will not time-out from the DNS cache like ordinary entries.
|
||||||
entries.
|
|
||||||
|
|
||||||
You can remove names from the DNS cache again, to stop providing these fake
|
Remove names from the DNS cache again, to stop providing these fake resolves,
|
||||||
resolves, by including a string in the linked list that uses the format
|
by including a string in the linked list that uses the format
|
||||||
\&"-HOST:PORT". The host name must be prefixed with a dash, and the host name
|
\&"-HOST:PORT". The host name must be prefixed with a dash, and the host name
|
||||||
and port number must exactly match what was already added previously. (Added in
|
and port number must exactly match what was already added previously. (Added
|
||||||
7.42.0)
|
in 7.42.0)
|
||||||
.SH DEFAULT
|
.SH DEFAULT
|
||||||
NULL
|
NULL
|
||||||
.SH PROTOCOLS
|
.SH PROTOCOLS
|
||||||
|
@@ -35,11 +35,11 @@ libcurl defaults to \fB$HOME/.ssh/id_dsa.pub\fP if the HOME environment
|
|||||||
variable is set, and just "id_dsa.pub" in the current directory if HOME is not
|
variable is set, and just "id_dsa.pub" in the current directory if HOME is not
|
||||||
set.
|
set.
|
||||||
|
|
||||||
If an empty string is passed, libcurl will pass no public key to libssh2 which
|
If NULL (or an empty string) is passed, libcurl will pass no public key to
|
||||||
then tries to compute it from the private key, this is known to work when
|
libssh2, which then tries to compute it from the private key. This is known
|
||||||
libssh2 1.4.0+ is linked against OpenSSL.
|
to work with libssh2 1.4.0+ linked against OpenSSL.
|
||||||
.SH DEFAULT
|
.SH DEFAULT
|
||||||
As explained above
|
NULL
|
||||||
.SH PROTOCOLS
|
.SH PROTOCOLS
|
||||||
SFTP and SCP
|
SFTP and SCP
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
|
@@ -237,7 +237,6 @@ CURLINFO_PRIMARY_IP 7.19.0
|
|||||||
CURLINFO_PRIMARY_PORT 7.21.0
|
CURLINFO_PRIMARY_PORT 7.21.0
|
||||||
CURLINFO_PRIVATE 7.10.3
|
CURLINFO_PRIVATE 7.10.3
|
||||||
CURLINFO_PROXYAUTH_AVAIL 7.10.8
|
CURLINFO_PROXYAUTH_AVAIL 7.10.8
|
||||||
CURLINFO_PROXY_SSL_VERIFYRESULT 7.44.0
|
|
||||||
CURLINFO_REDIRECT_COUNT 7.9.7
|
CURLINFO_REDIRECT_COUNT 7.9.7
|
||||||
CURLINFO_REDIRECT_TIME 7.9.7
|
CURLINFO_REDIRECT_TIME 7.9.7
|
||||||
CURLINFO_REDIRECT_URL 7.18.2
|
CURLINFO_REDIRECT_URL 7.18.2
|
||||||
@@ -463,23 +462,7 @@ CURLOPT_PROXYPORT 7.1
|
|||||||
CURLOPT_PROXYTYPE 7.10
|
CURLOPT_PROXYTYPE 7.10
|
||||||
CURLOPT_PROXYUSERNAME 7.19.1
|
CURLOPT_PROXYUSERNAME 7.19.1
|
||||||
CURLOPT_PROXYUSERPWD 7.1
|
CURLOPT_PROXYUSERPWD 7.1
|
||||||
CURLOPT_PROXY_CAINFO 7.44.0
|
|
||||||
CURLOPT_PROXY_CAPATH 7.44.0
|
|
||||||
CURLOPT_PROXY_CRLFILE 7.44.0
|
|
||||||
CURLOPT_PROXY_KEYPASSWD 7.44.0
|
|
||||||
CURLOPT_PROXY_SERVICE_NAME 7.43.0
|
CURLOPT_PROXY_SERVICE_NAME 7.43.0
|
||||||
CURLOPT_PROXY_SSLCERT 7.44.0
|
|
||||||
CURLOPT_PROXY_SSLCERTTYPE 7.44.0
|
|
||||||
CURLOPT_PROXY_SSLKEY 7.44.0
|
|
||||||
CURLOPT_PROXY_SSLKEYTYPE 7.44.0
|
|
||||||
CURLOPT_PROXY_SSLVERSION 7.44.0
|
|
||||||
CURLOPT_PROXY_SSL_CIPHER_LIST 7.44.0
|
|
||||||
CURLOPT_PROXY_SSL_OPTIONS 7.44.0
|
|
||||||
CURLOPT_PROXY_SSL_VERIFYHOST 7.44.0
|
|
||||||
CURLOPT_PROXY_SSL_VERIFYPEER 7.44.0
|
|
||||||
CURLOPT_PROXY_TLSAUTH_PASSWORD 7.44.0
|
|
||||||
CURLOPT_PROXY_TLSAUTH_TYPE 7.44.0
|
|
||||||
CURLOPT_PROXY_TLSAUTH_USERNAME 7.44.0
|
|
||||||
CURLOPT_PROXY_TRANSFER_MODE 7.18.0
|
CURLOPT_PROXY_TRANSFER_MODE 7.18.0
|
||||||
CURLOPT_PUT 7.1
|
CURLOPT_PUT 7.1
|
||||||
CURLOPT_QUOTE 7.1
|
CURLOPT_QUOTE 7.1
|
||||||
@@ -509,8 +492,6 @@ CURLOPT_SOCKOPTDATA 7.16.0
|
|||||||
CURLOPT_SOCKOPTFUNCTION 7.16.0
|
CURLOPT_SOCKOPTFUNCTION 7.16.0
|
||||||
CURLOPT_SOCKS5_GSSAPI_NEC 7.19.4
|
CURLOPT_SOCKS5_GSSAPI_NEC 7.19.4
|
||||||
CURLOPT_SOCKS5_GSSAPI_SERVICE 7.19.4
|
CURLOPT_SOCKS5_GSSAPI_SERVICE 7.19.4
|
||||||
CURLOPT_SOCKS_PROXY 7.44.0
|
|
||||||
CURLOPT_SOCKS_PROXYTYPE 7.44.0
|
|
||||||
CURLOPT_SOURCE_HOST 7.12.1 - 7.15.5
|
CURLOPT_SOURCE_HOST 7.12.1 - 7.15.5
|
||||||
CURLOPT_SOURCE_PATH 7.12.1 - 7.15.5
|
CURLOPT_SOURCE_PATH 7.12.1 - 7.15.5
|
||||||
CURLOPT_SOURCE_PORT 7.12.1 - 7.15.5
|
CURLOPT_SOURCE_PORT 7.12.1 - 7.15.5
|
||||||
@@ -622,7 +603,6 @@ CURLPROTO_TELNET 7.19.4
|
|||||||
CURLPROTO_TFTP 7.19.4
|
CURLPROTO_TFTP 7.19.4
|
||||||
CURLPROXY_HTTP 7.10
|
CURLPROXY_HTTP 7.10
|
||||||
CURLPROXY_HTTP_1_0 7.19.4
|
CURLPROXY_HTTP_1_0 7.19.4
|
||||||
CURLPROXY_HTTPS 7.44.0
|
|
||||||
CURLPROXY_SOCKS4 7.10
|
CURLPROXY_SOCKS4 7.10
|
||||||
CURLPROXY_SOCKS4A 7.18.0
|
CURLPROXY_SOCKS4A 7.18.0
|
||||||
CURLPROXY_SOCKS5 7.10
|
CURLPROXY_SOCKS5 7.10
|
||||||
@@ -712,6 +692,7 @@ CURL_HTTP_VERSION_1_0 7.9.1
|
|||||||
CURL_HTTP_VERSION_1_1 7.9.1
|
CURL_HTTP_VERSION_1_1 7.9.1
|
||||||
CURL_HTTP_VERSION_2 7.43.0
|
CURL_HTTP_VERSION_2 7.43.0
|
||||||
CURL_HTTP_VERSION_2_0 7.33.0
|
CURL_HTTP_VERSION_2_0 7.33.0
|
||||||
|
CURL_HTTP_VERSION_2TLS 7.47.0
|
||||||
CURL_HTTP_VERSION_NONE 7.9.1
|
CURL_HTTP_VERSION_NONE 7.9.1
|
||||||
CURL_IPRESOLVE_V4 7.10.8
|
CURL_IPRESOLVE_V4 7.10.8
|
||||||
CURL_IPRESOLVE_V6 7.10.8
|
CURL_IPRESOLVE_V6 7.10.8
|
||||||
@@ -799,6 +780,7 @@ CURL_VERSION_LARGEFILE 7.11.1
|
|||||||
CURL_VERSION_LIBZ 7.10
|
CURL_VERSION_LIBZ 7.10
|
||||||
CURL_VERSION_NTLM 7.10.6
|
CURL_VERSION_NTLM 7.10.6
|
||||||
CURL_VERSION_NTLM_WB 7.22.0
|
CURL_VERSION_NTLM_WB 7.22.0
|
||||||
|
CURL_VERSION_PSL 7.47.0
|
||||||
CURL_VERSION_SPNEGO 7.10.8
|
CURL_VERSION_SPNEGO 7.10.8
|
||||||
CURL_VERSION_SSL 7.10
|
CURL_VERSION_SSL 7.10
|
||||||
CURL_VERSION_SSPI 7.13.2
|
CURL_VERSION_SSPI 7.13.2
|
||||||
|
@@ -56,7 +56,8 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)
|
#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)
|
||||||
#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || defined(__LWIP_OPT_H__))
|
#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \
|
||||||
|
defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H))
|
||||||
/* The check above prevents the winsock2 inclusion if winsock.h already was
|
/* The check above prevents the winsock2 inclusion if winsock.h already was
|
||||||
included, since they can't co-exist without problems */
|
included, since they can't co-exist without problems */
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
@@ -112,7 +113,7 @@ typedef void CURL;
|
|||||||
|
|
||||||
#ifndef curl_socket_typedef
|
#ifndef curl_socket_typedef
|
||||||
/* socket typedef */
|
/* socket typedef */
|
||||||
#if defined(WIN32) && !defined(__LWIP_OPT_H__)
|
#if defined(WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H)
|
||||||
typedef SOCKET curl_socket_t;
|
typedef SOCKET curl_socket_t;
|
||||||
#define CURL_SOCKET_BAD INVALID_SOCKET
|
#define CURL_SOCKET_BAD INVALID_SOCKET
|
||||||
#else
|
#else
|
||||||
@@ -622,7 +623,6 @@ typedef enum {
|
|||||||
CONNECT HTTP/1.1 */
|
CONNECT HTTP/1.1 */
|
||||||
CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT
|
CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT
|
||||||
HTTP/1.0 */
|
HTTP/1.0 */
|
||||||
CURLPROXY_HTTPS = 2, /* added in TBD */
|
|
||||||
CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already
|
CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already
|
||||||
in 7.10 */
|
in 7.10 */
|
||||||
CURLPROXY_SOCKS5 = 5, /* added in 7.10 */
|
CURLPROXY_SOCKS5 = 5, /* added in 7.10 */
|
||||||
@@ -1189,8 +1189,7 @@ typedef enum {
|
|||||||
CINIT(SHARE, OBJECTPOINT, 100),
|
CINIT(SHARE, OBJECTPOINT, 100),
|
||||||
|
|
||||||
/* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),
|
/* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),
|
||||||
CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and
|
CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */
|
||||||
CURLPROXY_SOCKS5. */
|
|
||||||
CINIT(PROXYTYPE, LONG, 101),
|
CINIT(PROXYTYPE, LONG, 101),
|
||||||
|
|
||||||
/* Set the Accept-Encoding string. Use this to tell a server you would like
|
/* Set the Accept-Encoding string. Use this to tell a server you would like
|
||||||
@@ -1674,70 +1673,6 @@ typedef enum {
|
|||||||
/* Set E-xclusive stream dependency on another CURL handle */
|
/* Set E-xclusive stream dependency on another CURL handle */
|
||||||
CINIT(STREAM_DEPENDS_E, OBJECTPOINT, 241),
|
CINIT(STREAM_DEPENDS_E, OBJECTPOINT, 241),
|
||||||
|
|
||||||
/* The CApath or CAfile used to validate the proxy certificate
|
|
||||||
this option is used only if PROXY_SSL_VERIFYPEER is true */
|
|
||||||
CINIT(PROXY_CAINFO, STRINGPOINT, 242),
|
|
||||||
|
|
||||||
/* The CApath directory used to validate the proxy certificate
|
|
||||||
this option is used only if PROXY_SSL_VERIFYPEER is true */
|
|
||||||
CINIT(PROXY_CAPATH, STRINGPOINT, 243),
|
|
||||||
|
|
||||||
/* Set if we should verify the proxy in ssl handshake,
|
|
||||||
set 1 to verify. */
|
|
||||||
CINIT(PROXY_SSL_VERIFYPEER, LONG, 244),
|
|
||||||
|
|
||||||
/* Set if we should verify the Common name from the proxy certificate in ssl
|
|
||||||
* handshake, set 1 to check existence, 2 to ensure that it matches
|
|
||||||
* the provided hostname. */
|
|
||||||
CINIT(PROXY_SSL_VERIFYHOST, LONG, 245),
|
|
||||||
|
|
||||||
/* What version to specifically try to use for proxy.
|
|
||||||
See CURL_SSLVERSION defines below. */
|
|
||||||
CINIT(PROXY_SSLVERSION, LONG, 246),
|
|
||||||
|
|
||||||
/* Set a username for authenticated TLS for proxy */
|
|
||||||
CINIT(PROXY_TLSAUTH_USERNAME, STRINGPOINT, 247),
|
|
||||||
|
|
||||||
/* Set a password for authenticated TLS for proxy */
|
|
||||||
CINIT(PROXY_TLSAUTH_PASSWORD, STRINGPOINT, 248),
|
|
||||||
|
|
||||||
/* Set authentication type for authenticated TLS for proxy */
|
|
||||||
CINIT(PROXY_TLSAUTH_TYPE, STRINGPOINT, 249),
|
|
||||||
|
|
||||||
/* name of the file keeping your private SSL-certificate for proxy */
|
|
||||||
CINIT(PROXY_SSLCERT, STRINGPOINT, 250),
|
|
||||||
|
|
||||||
/* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for
|
|
||||||
proxy */
|
|
||||||
CINIT(PROXY_SSLCERTTYPE, STRINGPOINT, 251),
|
|
||||||
|
|
||||||
/* name of the file keeping your private SSL-key for proxy */
|
|
||||||
CINIT(PROXY_SSLKEY, STRINGPOINT, 252),
|
|
||||||
|
|
||||||
/* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for
|
|
||||||
proxy */
|
|
||||||
CINIT(PROXY_SSLKEYTYPE, STRINGPOINT, 253),
|
|
||||||
|
|
||||||
/* password for the SSL private key for proxy */
|
|
||||||
CINIT(PROXY_KEYPASSWD, STRINGPOINT, 254),
|
|
||||||
|
|
||||||
/* Specify which SSL ciphers to use for proxy */
|
|
||||||
CINIT(PROXY_SSL_CIPHER_LIST, STRINGPOINT, 255),
|
|
||||||
|
|
||||||
/* CRL file for proxy */
|
|
||||||
CINIT(PROXY_CRLFILE, STRINGPOINT, 256),
|
|
||||||
|
|
||||||
/* Enable/disable specific SSL features with a bitmask for proxy, see
|
|
||||||
CURLSSLOPT_* */
|
|
||||||
CINIT(PROXY_SSL_OPTIONS, LONG, 257),
|
|
||||||
|
|
||||||
/* Name of socks proxy to use. */
|
|
||||||
CINIT(SOCKS_PROXY, STRINGPOINT, 258),
|
|
||||||
|
|
||||||
/* indicates type of proxy. accepted values are CURLPROXY_SOCKS4,
|
|
||||||
CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */
|
|
||||||
CINIT(SOCKS_PROXYTYPE, LONG, 259),
|
|
||||||
|
|
||||||
CURLOPT_LASTENTRY /* the last unused */
|
CURLOPT_LASTENTRY /* the last unused */
|
||||||
} CURLoption;
|
} CURLoption;
|
||||||
|
|
||||||
@@ -1787,7 +1722,8 @@ enum {
|
|||||||
for us! */
|
for us! */
|
||||||
CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */
|
CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */
|
||||||
CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */
|
CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */
|
||||||
CURL_HTTP_VERSION_2_0, /* please use HTTP 2.0 in the request */
|
CURL_HTTP_VERSION_2_0, /* please use HTTP 2 in the request */
|
||||||
|
CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */
|
||||||
|
|
||||||
CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
|
CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
|
||||||
};
|
};
|
||||||
@@ -2233,10 +2169,9 @@ typedef enum {
|
|||||||
CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42,
|
CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42,
|
||||||
CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43,
|
CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43,
|
||||||
CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44,
|
CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44,
|
||||||
CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 45,
|
|
||||||
/* Fill in new entries below here! */
|
/* Fill in new entries below here! */
|
||||||
|
|
||||||
CURLINFO_LASTONE = 45
|
CURLINFO_LASTONE = 44
|
||||||
} CURLINFO;
|
} CURLINFO;
|
||||||
|
|
||||||
/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
|
/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
|
||||||
@@ -2396,6 +2331,8 @@ typedef struct {
|
|||||||
#define CURL_VERSION_GSSAPI (1<<17) /* Built against a GSS-API library */
|
#define CURL_VERSION_GSSAPI (1<<17) /* Built against a GSS-API library */
|
||||||
#define CURL_VERSION_KERBEROS5 (1<<18) /* Kerberos V5 auth is supported */
|
#define CURL_VERSION_KERBEROS5 (1<<18) /* Kerberos V5 auth is supported */
|
||||||
#define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */
|
#define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */
|
||||||
|
#define CURL_VERSION_PSL (1<<20) /* Mozilla's Public Suffix List, used
|
||||||
|
for cookie domain verification */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NAME curl_version_info()
|
* NAME curl_version_info()
|
||||||
|
@@ -30,12 +30,12 @@
|
|||||||
|
|
||||||
/* This is the version number of the libcurl package from which this header
|
/* This is the version number of the libcurl package from which this header
|
||||||
file origins: */
|
file origins: */
|
||||||
#define LIBCURL_VERSION "7.46.0-DEV"
|
#define LIBCURL_VERSION "7.47.0-DEV"
|
||||||
|
|
||||||
/* The numeric version number is also available "in parts" by using these
|
/* The numeric version number is also available "in parts" by using these
|
||||||
defines: */
|
defines: */
|
||||||
#define LIBCURL_VERSION_MAJOR 7
|
#define LIBCURL_VERSION_MAJOR 7
|
||||||
#define LIBCURL_VERSION_MINOR 46
|
#define LIBCURL_VERSION_MINOR 47
|
||||||
#define LIBCURL_VERSION_PATCH 0
|
#define LIBCURL_VERSION_PATCH 0
|
||||||
|
|
||||||
/* This is the numeric version of the libcurl version number, meant for easier
|
/* This is the numeric version of the libcurl version number, meant for easier
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
CURL_VERSION_BITS() macro since curl's own configure script greps for it
|
CURL_VERSION_BITS() macro since curl's own configure script greps for it
|
||||||
and needs it to contain the full number.
|
and needs it to contain the full number.
|
||||||
*/
|
*/
|
||||||
#define LIBCURL_VERSION_NUM 0x072E00
|
#define LIBCURL_VERSION_NUM 0x072F00
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is the date and time when the full source package was created. The
|
* This is the date and time when the full source package was created. The
|
||||||
|
@@ -416,6 +416,7 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
|
|||||||
if(result)
|
if(result)
|
||||||
/* close the connection, since we can't return failure here without
|
/* close the connection, since we can't return failure here without
|
||||||
cleaning up this connection properly.
|
cleaning up this connection properly.
|
||||||
|
TODO: remove this action from here, it is not a name resolver decision.
|
||||||
*/
|
*/
|
||||||
connclose(conn, "c-ares resolve failed");
|
connclose(conn, "c-ares resolve failed");
|
||||||
|
|
||||||
|
@@ -627,7 +627,8 @@ Vista
|
|||||||
/* Define if struct sockaddr_in6 has the sin6_scope_id member. */
|
/* Define if struct sockaddr_in6 has the sin6_scope_id member. */
|
||||||
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
|
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
|
||||||
|
|
||||||
#if HAVE_WINSOCK2_H && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
|
#if defined(HAVE_WINSOCK2_H) && defined(_WIN32_WINNT) && \
|
||||||
|
(_WIN32_WINNT >= 0x0600)
|
||||||
#define HAVE_STRUCT_POLLFD 1
|
#define HAVE_STRUCT_POLLFD 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -133,9 +133,7 @@ void Curl_conncache_destroy(struct conncache *connc)
|
|||||||
static char *hashkey(struct connectdata *conn)
|
static char *hashkey(struct connectdata *conn)
|
||||||
{
|
{
|
||||||
return aprintf("%s:%d",
|
return aprintf("%s:%d",
|
||||||
conn->bits.socksproxy ? conn->socks_proxy.host.name :
|
conn->bits.proxy?conn->proxy.name:conn->host.name,
|
||||||
conn->bits.httpproxy ? conn->http_proxy.host.name :
|
|
||||||
conn->host.name,
|
|
||||||
conn->localport);
|
conn->localport);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -850,8 +850,7 @@ CURLcode Curl_is_connected(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
failf(data, "Failed to connect to %s port %ld: %s",
|
failf(data, "Failed to connect to %s port %ld: %s",
|
||||||
conn->bits.socksproxy ? conn->socks_proxy.host.name :
|
conn->bits.proxy?conn->proxy.name:conn->host.name,
|
||||||
conn->bits.httpproxy ? conn->http_proxy.host.name : conn->host.name,
|
|
||||||
conn->port, Curl_strerror(conn, error));
|
conn->port, Curl_strerror(conn, error));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -521,7 +521,11 @@ void
|
|||||||
curl_dofreeaddrinfo(struct addrinfo *freethis,
|
curl_dofreeaddrinfo(struct addrinfo *freethis,
|
||||||
int line, const char *source)
|
int line, const char *source)
|
||||||
{
|
{
|
||||||
|
#ifdef USE_LWIPSOCK
|
||||||
|
lwip_freeaddrinfo(freethis);
|
||||||
|
#else
|
||||||
(freeaddrinfo)(freethis);
|
(freeaddrinfo)(freethis);
|
||||||
|
#endif
|
||||||
curl_memlog("ADDR %s:%d freeaddrinfo(%p)\n",
|
curl_memlog("ADDR %s:%d freeaddrinfo(%p)\n",
|
||||||
source, line, (void *)freethis);
|
source, line, (void *)freethis);
|
||||||
}
|
}
|
||||||
@@ -544,7 +548,11 @@ curl_dogetaddrinfo(const char *hostname,
|
|||||||
struct addrinfo **result,
|
struct addrinfo **result,
|
||||||
int line, const char *source)
|
int line, const char *source)
|
||||||
{
|
{
|
||||||
|
#ifdef USE_LWIPSOCK
|
||||||
|
int res=lwip_getaddrinfo(hostname, service, hints, result);
|
||||||
|
#else
|
||||||
int res=(getaddrinfo)(hostname, service, hints, result);
|
int res=(getaddrinfo)(hostname, service, hints, result);
|
||||||
|
#endif
|
||||||
if(0 == res)
|
if(0 == res)
|
||||||
/* success */
|
/* success */
|
||||||
curl_memlog("ADDR %s:%d getaddrinfo() = %p\n",
|
curl_memlog("ADDR %s:%d getaddrinfo() = %p\n",
|
||||||
|
@@ -83,7 +83,8 @@ Curl_addrinfo *Curl_str2addr(char *dotted, int port);
|
|||||||
Curl_addrinfo *Curl_unix2addr(const char *path);
|
Curl_addrinfo *Curl_unix2addr(const char *path);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CURLDEBUG) && defined(HAVE_FREEADDRINFO)
|
#if defined(CURLDEBUG) && defined(HAVE_GETADDRINFO) && \
|
||||||
|
defined(HAVE_FREEADDRINFO)
|
||||||
void
|
void
|
||||||
curl_dofreeaddrinfo(struct addrinfo *freethis,
|
curl_dofreeaddrinfo(struct addrinfo *freethis,
|
||||||
int line, const char *source);
|
int line, const char *source);
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2013, 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 @@
|
|||||||
*
|
*
|
||||||
* File lib/strdup.c is an exception, given that it provides a strdup
|
* File lib/strdup.c is an exception, given that it provides a strdup
|
||||||
* clone implementation while using malloc. Extra care needed inside
|
* clone implementation while using malloc. Extra care needed inside
|
||||||
* this one.
|
* this one. TODO: revisit this paragraph and related code.
|
||||||
*
|
*
|
||||||
* The need for curl_memory.h inclusion is due to libcurl's feature
|
* The need for curl_memory.h inclusion is due to libcurl's feature
|
||||||
* of allowing library user to provide memory replacement functions,
|
* of allowing library user to provide memory replacement functions,
|
||||||
|
@@ -137,8 +137,8 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy)
|
|||||||
|
|
||||||
if(proxy) {
|
if(proxy) {
|
||||||
allocuserpwd = &conn->allocptr.proxyuserpwd;
|
allocuserpwd = &conn->allocptr.proxyuserpwd;
|
||||||
userp = conn->http_proxy.user;
|
userp = conn->proxyuser;
|
||||||
passwdp = conn->http_proxy.passwd;
|
passwdp = conn->proxypasswd;
|
||||||
ntlm = &conn->proxyntlm;
|
ntlm = &conn->proxyntlm;
|
||||||
authp = &conn->data->state.authproxy;
|
authp = &conn->data->state.authproxy;
|
||||||
}
|
}
|
||||||
|
@@ -350,7 +350,7 @@ CURLcode Curl_output_ntlm_wb(struct connectdata *conn,
|
|||||||
|
|
||||||
if(proxy) {
|
if(proxy) {
|
||||||
allocuserpwd = &conn->allocptr.proxyuserpwd;
|
allocuserpwd = &conn->allocptr.proxyuserpwd;
|
||||||
userp = conn->http_proxy.user;
|
userp = conn->proxyuser;
|
||||||
ntlm = &conn->proxyntlm;
|
ntlm = &conn->proxyntlm;
|
||||||
authp = &conn->data->state.authproxy;
|
authp = &conn->data->state.authproxy;
|
||||||
}
|
}
|
||||||
|
@@ -481,9 +481,10 @@
|
|||||||
/*
|
/*
|
||||||
* msvc 6.0 requires PSDK in order to have INET6_ADDRSTRLEN
|
* msvc 6.0 requires PSDK in order to have INET6_ADDRSTRLEN
|
||||||
* defined in ws2tcpip.h as well as to provide IPv6 support.
|
* defined in ws2tcpip.h as well as to provide IPv6 support.
|
||||||
|
* Does not apply if lwIP is used.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(__POCC__)
|
#if defined(_MSC_VER) && !defined(__POCC__) && !defined(USE_LWIPSOCK)
|
||||||
# if !defined(HAVE_WS2TCPIP_H) || \
|
# if !defined(HAVE_WS2TCPIP_H) || \
|
||||||
((_MSC_VER < 1300) && !defined(INET6_ADDRSTRLEN))
|
((_MSC_VER < 1300) && !defined(INET6_ADDRSTRLEN))
|
||||||
# undef HAVE_GETADDRINFO_THREADSAFE
|
# undef HAVE_GETADDRINFO_THREADSAFE
|
||||||
@@ -527,6 +528,7 @@
|
|||||||
# define CURLRES_ARES
|
# define CURLRES_ARES
|
||||||
/* now undef the stock libc functions just to avoid them being used */
|
/* now undef the stock libc functions just to avoid them being used */
|
||||||
# undef HAVE_GETADDRINFO
|
# undef HAVE_GETADDRINFO
|
||||||
|
# undef HAVE_FREEADDRINFO
|
||||||
# undef HAVE_GETHOSTBYNAME
|
# undef HAVE_GETHOSTBYNAME
|
||||||
#elif defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
|
#elif defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
|
||||||
# define CURLRES_ASYNCH
|
# define CURLRES_ASYNCH
|
||||||
@@ -674,7 +676,7 @@ int netware_init(void);
|
|||||||
* Ensure that Winsock and lwIP TCP/IP stacks are not mixed.
|
* Ensure that Winsock and lwIP TCP/IP stacks are not mixed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__LWIP_OPT_H__)
|
#if defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H)
|
||||||
# if defined(SOCKET) || \
|
# if defined(SOCKET) || \
|
||||||
defined(USE_WINSOCK) || \
|
defined(USE_WINSOCK) || \
|
||||||
defined(HAVE_WINSOCK_H) || \
|
defined(HAVE_WINSOCK_H) || \
|
||||||
|
@@ -646,7 +646,7 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev)
|
|||||||
return CURLE_RECV_ERROR;
|
return CURLE_RECV_ERROR;
|
||||||
|
|
||||||
if(mcode)
|
if(mcode)
|
||||||
return CURLE_URL_MALFORMAT;
|
return CURLE_URL_MALFORMAT; /* TODO: return a proper error! */
|
||||||
|
|
||||||
/* we don't really care about the "msgs_in_queue" value returned in the
|
/* we don't really care about the "msgs_in_queue" value returned in the
|
||||||
second argument */
|
second argument */
|
||||||
|
@@ -830,19 +830,26 @@ static CURLcode AddFormData(struct FormData **formp,
|
|||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
newform->next = NULL;
|
newform->next = NULL;
|
||||||
|
|
||||||
|
if(length < 0 || (size && *size < 0))
|
||||||
|
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||||
|
|
||||||
if(type <= FORM_CONTENT) {
|
if(type <= FORM_CONTENT) {
|
||||||
/* we make it easier for plain strings: */
|
/* we make it easier for plain strings: */
|
||||||
if(!length)
|
if(!length)
|
||||||
length = strlen((char *)line);
|
length = strlen((char *)line);
|
||||||
|
#if (SIZEOF_SIZE_T < CURL_SIZEOF_CURL_OFF_T)
|
||||||
|
else if(length >= (curl_off_t)(size_t)-1)
|
||||||
|
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||||
|
#endif
|
||||||
|
|
||||||
newform->line = malloc(length+1);
|
newform->line = malloc((size_t)length+1);
|
||||||
if(!newform->line) {
|
if(!newform->line) {
|
||||||
free(newform);
|
free(newform);
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
memcpy(newform->line, line, length);
|
memcpy(newform->line, line, (size_t)length);
|
||||||
newform->length = length;
|
newform->length = (size_t)length;
|
||||||
newform->line[length]=0; /* zero terminate for easier debugging */
|
newform->line[(size_t)length]=0; /* zero terminate for easier debugging */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* For callbacks and files we don't have any actual data so we just keep a
|
/* For callbacks and files we don't have any actual data so we just keep a
|
||||||
|
130
lib/ftp.c
130
lib/ftp.c
@@ -491,7 +491,7 @@ static CURLcode InitiateTransfer(struct connectdata *conn)
|
|||||||
struct FTP *ftp = data->req.protop;
|
struct FTP *ftp = data->req.protop;
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
|
|
||||||
if(conn->bits.ftp_use_data_ssl) {
|
if(conn->ssl[SECONDARYSOCKET].use) {
|
||||||
/* since we only have a plaintext TCP connection here, we must now
|
/* since we only have a plaintext TCP connection here, we must now
|
||||||
* do the TLS stuff */
|
* do the TLS stuff */
|
||||||
infof(data, "Doing the SSL/TLS handshake on the data stream\n");
|
infof(data, "Doing the SSL/TLS handshake on the data stream\n");
|
||||||
@@ -732,7 +732,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
|
|||||||
* wait for more data anyway.
|
* wait for more data anyway.
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
else if(!Curl_ssl_data_pending(conn, FIRSTSOCKET)) {
|
else {
|
||||||
switch (Curl_socket_ready(sockfd, CURL_SOCKET_BAD, interval_ms)) {
|
switch (Curl_socket_ready(sockfd, CURL_SOCKET_BAD, interval_ms)) {
|
||||||
case -1: /* select() error, stop reading */
|
case -1: /* select() error, stop reading */
|
||||||
failf(data, "FTP response aborted due to select/poll error: %d",
|
failf(data, "FTP response aborted due to select/poll error: %d",
|
||||||
@@ -1842,6 +1842,84 @@ static CURLcode ftp_epsv_disable(struct connectdata *conn)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Perform the necessary magic that needs to be done once the TCP connection
|
||||||
|
* to the proxy has completed.
|
||||||
|
*/
|
||||||
|
static CURLcode proxy_magic(struct connectdata *conn,
|
||||||
|
char *newhost, unsigned short newport,
|
||||||
|
bool *magicdone)
|
||||||
|
{
|
||||||
|
CURLcode result = CURLE_OK;
|
||||||
|
struct SessionHandle *data = conn->data;
|
||||||
|
|
||||||
|
#if defined(CURL_DISABLE_PROXY)
|
||||||
|
(void) newhost;
|
||||||
|
(void) newport;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
*magicdone = FALSE;
|
||||||
|
|
||||||
|
switch(conn->proxytype) {
|
||||||
|
case CURLPROXY_SOCKS5:
|
||||||
|
case CURLPROXY_SOCKS5_HOSTNAME:
|
||||||
|
result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd, newhost,
|
||||||
|
newport, SECONDARYSOCKET, conn);
|
||||||
|
*magicdone = TRUE;
|
||||||
|
break;
|
||||||
|
case CURLPROXY_SOCKS4:
|
||||||
|
result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
|
||||||
|
SECONDARYSOCKET, conn, FALSE);
|
||||||
|
*magicdone = TRUE;
|
||||||
|
break;
|
||||||
|
case CURLPROXY_SOCKS4A:
|
||||||
|
result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
|
||||||
|
SECONDARYSOCKET, conn, TRUE);
|
||||||
|
*magicdone = TRUE;
|
||||||
|
break;
|
||||||
|
case CURLPROXY_HTTP:
|
||||||
|
case CURLPROXY_HTTP_1_0:
|
||||||
|
/* do nothing here. handled later. */
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
failf(data, "unknown proxytype option given");
|
||||||
|
result = CURLE_COULDNT_CONNECT;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
|
||||||
|
/* BLOCKING */
|
||||||
|
/* We want "seamless" FTP operations through HTTP proxy tunnel */
|
||||||
|
|
||||||
|
/* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the
|
||||||
|
* member conn->proto.http; we want FTP through HTTP and we have to
|
||||||
|
* change the member temporarily for connecting to the HTTP proxy. After
|
||||||
|
* Curl_proxyCONNECT we have to set back the member to the original
|
||||||
|
* struct FTP pointer
|
||||||
|
*/
|
||||||
|
struct HTTP http_proxy;
|
||||||
|
struct FTP *ftp_save = data->req.protop;
|
||||||
|
memset(&http_proxy, 0, sizeof(http_proxy));
|
||||||
|
data->req.protop = &http_proxy;
|
||||||
|
|
||||||
|
result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, newhost, newport, TRUE);
|
||||||
|
|
||||||
|
data->req.protop = ftp_save;
|
||||||
|
|
||||||
|
if(result)
|
||||||
|
return result;
|
||||||
|
|
||||||
|
if(conn->tunnel_state[SECONDARYSOCKET] != TUNNEL_COMPLETE) {
|
||||||
|
/* the CONNECT procedure is not complete, the tunnel is not yet up */
|
||||||
|
state(conn, FTP_STOP); /* this phase is completed */
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
*magicdone = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
static char *control_address(struct connectdata *conn)
|
static char *control_address(struct connectdata *conn)
|
||||||
{
|
{
|
||||||
@@ -1849,7 +1927,11 @@ static char *control_address(struct connectdata *conn)
|
|||||||
If a proxy tunnel is used, returns the original host name instead, because
|
If a proxy tunnel is used, returns the original host name instead, because
|
||||||
the effective control connection address is the proxy address,
|
the effective control connection address is the proxy address,
|
||||||
not the ftp host. */
|
not the ftp host. */
|
||||||
if(conn->bits.tunnel_proxy || conn->bits.socksproxy)
|
if(conn->bits.tunnel_proxy ||
|
||||||
|
conn->proxytype == CURLPROXY_SOCKS5 ||
|
||||||
|
conn->proxytype == CURLPROXY_SOCKS5_HOSTNAME ||
|
||||||
|
conn->proxytype == CURLPROXY_SOCKS4 ||
|
||||||
|
conn->proxytype == CURLPROXY_SOCKS4A)
|
||||||
return conn->host.name;
|
return conn->host.name;
|
||||||
|
|
||||||
return conn->ip_addr_str;
|
return conn->ip_addr_str;
|
||||||
@@ -1973,9 +2055,7 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
|
|||||||
* here. We don't want to rely on a former host lookup that might've
|
* here. We don't want to rely on a former host lookup that might've
|
||||||
* expired now, instead we remake the lookup here and now!
|
* expired now, instead we remake the lookup here and now!
|
||||||
*/
|
*/
|
||||||
const char * const host_name = conn->bits.socksproxy ?
|
rc = Curl_resolv(conn, conn->proxy.name, (int)conn->port, &addr);
|
||||||
conn->socks_proxy.host.name : conn->http_proxy.host.name;
|
|
||||||
rc = Curl_resolv(conn, host_name, (int)conn->port, &addr);
|
|
||||||
if(rc == CURLRESOLV_PENDING)
|
if(rc == CURLRESOLV_PENDING)
|
||||||
/* BLOCKING, ignores the return code but 'addr' will be NULL in
|
/* BLOCKING, ignores the return code but 'addr' will be NULL in
|
||||||
case of failure */
|
case of failure */
|
||||||
@@ -1985,7 +2065,8 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
|
|||||||
(unsigned short)conn->port; /* we connect to the proxy's port */
|
(unsigned short)conn->port; /* we connect to the proxy's port */
|
||||||
|
|
||||||
if(!addr) {
|
if(!addr) {
|
||||||
failf(data, "Can't resolve proxy host %s:%hu", host_name, connectport);
|
failf(data, "Can't resolve proxy host %s:%hu",
|
||||||
|
conn->proxy.name, connectport);
|
||||||
return CURLE_FTP_CANT_GET_HOST;
|
return CURLE_FTP_CANT_GET_HOST;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2026,10 +2107,6 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
|
|||||||
/* this just dumps information about this second connection */
|
/* this just dumps information about this second connection */
|
||||||
ftp_pasv_verbose(conn, addr->addr, ftpc->newhost, connectport);
|
ftp_pasv_verbose(conn, addr->addr, ftpc->newhost, connectport);
|
||||||
|
|
||||||
Curl_safefree(conn->secondaryhostname);
|
|
||||||
conn->secondaryhostname = strdup(ftpc->newhost);
|
|
||||||
conn->secondary_port = ftpc->newport;
|
|
||||||
|
|
||||||
Curl_resolv_unlock(data, addr); /* we're done using this address */
|
Curl_resolv_unlock(data, addr); /* we're done using this address */
|
||||||
conn->bits.do_more = TRUE;
|
conn->bits.do_more = TRUE;
|
||||||
state(conn, FTP_STOP); /* this phase is completed */
|
state(conn, FTP_STOP); /* this phase is completed */
|
||||||
@@ -2678,10 +2755,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(data->set.use_ssl &&
|
if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
|
||||||
(!conn->ssl[FIRSTSOCKET].use ||
|
|
||||||
(conn->bits.proxy_ssl_connected[FIRSTSOCKET] &&
|
|
||||||
!conn->proxy_ssl[FIRSTSOCKET].use))) {
|
|
||||||
/* We don't have a SSL/TLS connection yet, but FTPS is
|
/* We don't have a SSL/TLS connection yet, but FTPS is
|
||||||
requested. Try a FTPS connection now */
|
requested. Try a FTPS connection now */
|
||||||
|
|
||||||
@@ -2726,7 +2800,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
|
|||||||
/* Curl_ssl_connect is BLOCKING */
|
/* Curl_ssl_connect is BLOCKING */
|
||||||
result = Curl_ssl_connect(conn, FIRSTSOCKET);
|
result = Curl_ssl_connect(conn, FIRSTSOCKET);
|
||||||
if(!result) {
|
if(!result) {
|
||||||
conn->bits.ftp_use_data_ssl = FALSE; /* clear-text data */
|
conn->ssl[SECONDARYSOCKET].use = FALSE; /* clear-text data */
|
||||||
result = ftp_state_user(conn);
|
result = ftp_state_user(conn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2768,7 +2842,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
|
|||||||
case FTP_PROT:
|
case FTP_PROT:
|
||||||
if(ftpcode/100 == 2)
|
if(ftpcode/100 == 2)
|
||||||
/* We have enabled SSL for the data connection! */
|
/* We have enabled SSL for the data connection! */
|
||||||
conn->bits.ftp_use_data_ssl =
|
conn->ssl[SECONDARYSOCKET].use =
|
||||||
(data->set.use_ssl != CURLUSESSL_CONTROL) ? TRUE : FALSE;
|
(data->set.use_ssl != CURLUSESSL_CONTROL) ? TRUE : FALSE;
|
||||||
/* FTP servers typically responds with 500 if they decide to reject
|
/* FTP servers typically responds with 500 if they decide to reject
|
||||||
our 'P' request */
|
our 'P' request */
|
||||||
@@ -3585,7 +3659,7 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep)
|
|||||||
if(!conn->bits.tcpconnect[SECONDARYSOCKET]) {
|
if(!conn->bits.tcpconnect[SECONDARYSOCKET]) {
|
||||||
if(conn->tunnel_state[SECONDARYSOCKET] == TUNNEL_CONNECT) {
|
if(conn->tunnel_state[SECONDARYSOCKET] == TUNNEL_CONNECT) {
|
||||||
/* As we're in TUNNEL_CONNECT state now, we know the proxy name and port
|
/* As we're in TUNNEL_CONNECT state now, we know the proxy name and port
|
||||||
aren't used so we blank their arguments. */
|
aren't used so we blank their arguments. TODO: make this nicer */
|
||||||
result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0, FALSE);
|
result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0, FALSE);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -3596,6 +3670,10 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep)
|
|||||||
/* Ready to do more? */
|
/* Ready to do more? */
|
||||||
if(connected) {
|
if(connected) {
|
||||||
DEBUGF(infof(data, "DO-MORE connected phase starts\n"));
|
DEBUGF(infof(data, "DO-MORE connected phase starts\n"));
|
||||||
|
if(conn->bits.proxy) {
|
||||||
|
infof(data, "Connection to proxy confirmed\n");
|
||||||
|
result = proxy_magic(conn, ftpc->newhost, ftpc->newport, &connected);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(result && (ftpc->count1 == 0)) {
|
if(result && (ftpc->count1 == 0)) {
|
||||||
@@ -3607,18 +3685,6 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result = Curl_proxy_connect(conn, SECONDARYSOCKET);
|
|
||||||
if(result)
|
|
||||||
return result;
|
|
||||||
|
|
||||||
if(CONNECT_SECONDARYSOCKET_PROXY_SSL())
|
|
||||||
return result;
|
|
||||||
|
|
||||||
if(conn->bits.tunnel_proxy && conn->bits.httpproxy &&
|
|
||||||
conn->tunnel_state[SECONDARYSOCKET] != TUNNEL_COMPLETE)
|
|
||||||
return result;
|
|
||||||
|
|
||||||
|
|
||||||
if(ftpc->state) {
|
if(ftpc->state) {
|
||||||
/* already in a state so skip the intial commands.
|
/* already in a state so skip the intial commands.
|
||||||
They are only done to kickstart the do_more state */
|
They are only done to kickstart the do_more state */
|
||||||
@@ -4186,8 +4252,8 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
|
|||||||
const char *cur_pos;
|
const char *cur_pos;
|
||||||
const char *filename = NULL;
|
const char *filename = NULL;
|
||||||
|
|
||||||
cur_pos = path_to_use; /* current position in path. point at the begin of
|
cur_pos = path_to_use; /* current position in path. point at the begin
|
||||||
next path component */
|
of next path component */
|
||||||
|
|
||||||
ftpc->ctl_valid = FALSE;
|
ftpc->ctl_valid = FALSE;
|
||||||
ftpc->cwdfail = FALSE;
|
ftpc->cwdfail = FALSE;
|
||||||
|
@@ -728,7 +728,6 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
|
|||||||
case PL_UNIX_FILENAME_NAME:
|
case PL_UNIX_FILENAME_NAME:
|
||||||
parser->item_length++;
|
parser->item_length++;
|
||||||
if(c == '\r') {
|
if(c == '\r') {
|
||||||
parser->item_length--;
|
|
||||||
parser->state.UNIX.sub.filename = PL_UNIX_FILENAME_WINDOWSEOL;
|
parser->state.UNIX.sub.filename = PL_UNIX_FILENAME_WINDOWSEOL;
|
||||||
}
|
}
|
||||||
else if(c == '\n') {
|
else if(c == '\n') {
|
||||||
@@ -744,7 +743,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
|
|||||||
break;
|
break;
|
||||||
case PL_UNIX_FILENAME_WINDOWSEOL:
|
case PL_UNIX_FILENAME_WINDOWSEOL:
|
||||||
if(c == '\n') {
|
if(c == '\n') {
|
||||||
finfo->b_data[parser->item_offset + parser->item_length] = 0;
|
finfo->b_data[parser->item_offset + parser->item_length - 1] = 0;
|
||||||
parser->offsets.filename = parser->item_offset;
|
parser->offsets.filename = parser->item_offset;
|
||||||
parser->state.UNIX.main = PL_UNIX_FILETYPE;
|
parser->state.UNIX.main = PL_UNIX_FILETYPE;
|
||||||
result = ftp_pl_insert_finfo(conn, finfo);
|
result = ftp_pl_insert_finfo(conn, finfo);
|
||||||
@@ -835,9 +834,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PL_UNIX_SYMLINK_TARGET:
|
case PL_UNIX_SYMLINK_TARGET:
|
||||||
parser->item_length ++;
|
parser->item_length++;
|
||||||
if(c == '\r') {
|
if(c == '\r') {
|
||||||
parser->item_length --;
|
|
||||||
parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_WINDOWSEOL;
|
parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_WINDOWSEOL;
|
||||||
}
|
}
|
||||||
else if(c == '\n') {
|
else if(c == '\n') {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user