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
|
||||
tags
|
||||
test-driver
|
||||
scripts/_curl
|
||||
|
2
COPYING
2
COPYING
@@ -1,6 +1,6 @@
|
||||
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.
|
||||
|
||||
|
@@ -140,7 +140,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \
|
||||
|
||||
bin_SCRIPTS = curl-config
|
||||
|
||||
SUBDIRS = lib src include
|
||||
SUBDIRS = lib src include scripts
|
||||
DIST_SUBDIRS = $(SUBDIRS) tests packages docs
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
@@ -160,10 +160,10 @@ dist-hook:
|
||||
done)
|
||||
|
||||
html:
|
||||
cd docs; make html
|
||||
cd docs && make html
|
||||
|
||||
pdf:
|
||||
cd docs; make pdf
|
||||
cd docs && make pdf
|
||||
|
||||
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
|
||||
Command line options: 177
|
||||
Public curl releases: 151
|
||||
Command line options: 179
|
||||
curl_easy_setopt() options: 221
|
||||
Public functions in libcurl: 61
|
||||
Contributors: 1322
|
||||
Contributors: 1340
|
||||
|
||||
This release includes the following changes:
|
||||
|
||||
o configure: build silently by default
|
||||
o cookies: Add support for Publix Suffix List with libpsl
|
||||
o vtls: added support for mbedTLS [7]
|
||||
o Added CURLOPT_STREAM_DEPENDS [8]
|
||||
o Added CURLOPT_STREAM_DEPENDS_E [9]
|
||||
o Added CURLOPT_STREAM_WEIGHT [10]
|
||||
o Added CURLFORM_CONTENTLEN [14]
|
||||
o oauth2: Added support for OAUTHBEARER SASL mechanism to IMAP, POP3 and SNMP
|
||||
o version: Add flag CURL_VERSION_PSL for libpsl
|
||||
o http: added CURL_HTTP_VERSION_2TLS to do HTTP/2 for HTTPS only [8]
|
||||
o curl: use 2TLS by default
|
||||
o curl --expect100-timeout: added [10]
|
||||
o Add .dir-locals and set c-basic-offset to 2 (for emacs) [16]
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
o des: Fix header conditional for Curl_des_set_odd_parity
|
||||
o ntlm: get rid of unconditional use of long long [1]
|
||||
o CURLOPT_CERTINFO.3: fix reference to CURLINFO_CERTINFO
|
||||
o docs: CURLINFO_LASTSOCKET => CURLINFO_ACTIVESOCKET [2]
|
||||
o http2: Fix http2_recv to return -1 if recv returned -1
|
||||
o curl_global_init_mem: set function pointers before doing init
|
||||
o ntlm: error out without 64bit support as the code needs it [1]
|
||||
o openssl: Fix set up of pkcs12 certificate verification chain
|
||||
o acinclude: remove PKGCONFIG override [3]
|
||||
o test1531: case the size to fix the test on non-largefile builds
|
||||
o fread_func: move callback pointer from set to state struct [4]
|
||||
o test1601: fix compilation with --enable-debug and --disable-crypto-auth
|
||||
o http2: Don't pass unitialized name+len pairs to nghttp2_submit_request [5]
|
||||
o curlbuild.h: Fix non-configure compiling to mips and sh4 targets
|
||||
o tool: Generate easysrc with last cache linked-list [6]
|
||||
o cmake: Fix for add_subdirectory(curl) use-case
|
||||
o vtls: fix compiler warning for TLS backends without sha256
|
||||
o build: fix for MSDOS/djgpp
|
||||
o checksrc: add crude // detection
|
||||
o http2: on_frame_recv: trust the conn/data input
|
||||
o ftp: allow CURLOPT_IGNORE_CONTENT_LENGTH to ignore size [11]
|
||||
o polarssl/mbedtls: fix name space pollution
|
||||
o build: Fix mingw ssl gdi32 order [12]
|
||||
o build: Fix support for PKG_CONFIG
|
||||
o MacOSX-Framework: sdk regex fix for sdk 10.10 and later
|
||||
o socks: Fix incorrect port numbers in failed connect messages
|
||||
o curl.1: -E: s/private certificate/client certificate
|
||||
o curl.h: s/HTTPPOST_/CURL_HTTPOST_ [13]
|
||||
o curl_formadd: support >2GB files on windows [14]
|
||||
o http redirects: %-encode bytes outside of ascii range [15]
|
||||
o rawstr: Speed up Curl_raw_toupper by 40%
|
||||
o curl_ntlm_core: fix 2 curl_off_t constant overflows.
|
||||
o getinfo: CURLINFO_ACTIVESOCKET: fix bad socket value
|
||||
o tftp tests: verify sent options too
|
||||
o imap: Don't call imap_atom() when no mailbox specified in LIST command
|
||||
o imap: Fixed double quote in LIST command when mailbox contains spaces
|
||||
o imap: Don't check for continuation when executing a CUSTOMREQUEST [16]
|
||||
o acinclude: Remove check for 16-bit curl_off_t
|
||||
o BoringSSL: Work with stricter BIO_get_mem_data() [17]
|
||||
o cmake: Add missing feature macros in config header [18]
|
||||
o sasl_sspi: fixed unicode build for digest authentication [19]
|
||||
o sasl_sspi: fix identity memory leak in digest authentication
|
||||
o unit1602: Fixed failure in torture test
|
||||
o unit1603: Added unit tests for hash functions
|
||||
o vtls/openssl: remove unused traces of yassl ifdefs
|
||||
o openssl: remove #ifdefs for < 0.9.7 support
|
||||
o typecheck-gcc.h: add some missing options
|
||||
o curl: mark two more options strings for --libcurl output
|
||||
o openssl: Free modules on cleanup [20]
|
||||
o curl: avoid local drive traversal when saving file on Windows [33]
|
||||
o NTLM: do not resuse proxy connections without diff proxy credentials [34]
|
||||
o tests: Disable the OAUTHBEARER tests when using a non-default port number [1]
|
||||
o curl: remove keepalive #ifdef checks done on libcurl's behalf
|
||||
o formdata: Check if length is too large for memory [2]
|
||||
o lwip: Fix compatibility issues with later versions [3]
|
||||
o openssl: BoringSSL doesn't have CONF_modules_free
|
||||
o config-win32: Fix warning HAVE_WINSOCK2_H undefined
|
||||
o build: fix compilation error with CURL_DISABLE_VERBOSE_STRINGS [4]
|
||||
o http2: Fix hanging paused stream [5]
|
||||
o scripts/Makefile: fix GNUism and survive no perl [6]
|
||||
o openssl: adapt to 1.1.0+ name changes
|
||||
o openssl: adapt to openssl >= 1.1.0 X509 opaque structs [7]
|
||||
o HTTP2.md: spell fix and remove TODO now implemented
|
||||
o setstropt: const-correctness [9]
|
||||
o cyassl: fix compiler warning on type conversion
|
||||
o gskit: Fix host subject altname verification [11]
|
||||
o http2: Support trailer fields [12]
|
||||
o wolfssl: handle builds without SSLv3 support
|
||||
o cyassl: deal with lack of *get_peer_certificate [13]
|
||||
o sockfilt: do not wait on unreliable file or pipe handle
|
||||
o make: build zsh script even in an out-of-tree build
|
||||
o test 1326: fix getting stuck on Windows
|
||||
o test 87: fix file check on Windows
|
||||
o configure: allow static builds on mingw [14]
|
||||
o configure: detect IPv6 support on Windows [15]
|
||||
o ConnectionExists: with *PIPEWAIT, wait for connections [17]
|
||||
o Makefile.inc: s/curl_SOURCES/CURL_FILES [18]
|
||||
o test 16: fixed for Windows
|
||||
o test 252-255: use datacheck mode text for ASCII-mode LISTings
|
||||
o tftpd server: add Windows support by writing files in binary mode
|
||||
o ftplistparser: fix handling of file LISTings using Windows EOL
|
||||
o tests first.c: fix calculation of sleep timeout on Windows
|
||||
o tests (several): use datacheck mode text for ASCII-mode LISTings
|
||||
o CURLOPT_RANGE.3: for HTTP servers, range support is optional
|
||||
o test 1515: add MSYS support by passing a relative path
|
||||
o curl_global_init.3: Add Windows-specific info for init via DLL [19]
|
||||
o http2: Fix client write for trailers on stream close [20]
|
||||
o mbedtls: Fix ALPN support
|
||||
o connection reuse: IDN host names fixed [21]
|
||||
o http2: Fix PUSH_PROMISE headers being treated as trailers [22]
|
||||
o http2: handle the received SETTINGS frame [23]
|
||||
o http2: Ensure that http2_handle_stream_close is called [24]
|
||||
o mbedtls: implement CURLOPT_PINNEDPUBLICKEY
|
||||
o runtests: Add mbedTLS to the SSL backends
|
||||
o IDN host names: Remove the port number before converting to ACE [25]
|
||||
o zsh.pl: fail if no curl is found
|
||||
o scripts: fix zsh completion generation
|
||||
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:
|
||||
|
||||
@@ -76,35 +81,48 @@ This release includes the following known bugs:
|
||||
This release would not have looked like this without help, code, reports and
|
||||
advice from friends like these:
|
||||
|
||||
Anders Bakken, Dan Fandrich, Daniel Hwang, Daniel Stenberg, Dmitry S. Baikov,
|
||||
Douglas Creager, Erik Johansson, Gisle Vanem, Javier G. Sogo, John Levon,
|
||||
Jonas Minnberg, Justin Ehlert, Kamil Dudka, Kang Lin, Kurt Fankhauser,
|
||||
Lauri Kasanen, Marcel Raad, Patrick Monnerat, Rainer Jung, Ray Satiro,
|
||||
Richard Hosking, Sebastian Pohlschmidt, Stefan Bühler, Steve Holme,
|
||||
Svyatoslav Mishyn, Tatsuhiro Tsujikawa, Tim Rühsen, xiangbin li,
|
||||
(28 contributors)
|
||||
Alessandro Ghedini, Anders Bakken, Christian Stewart, Dan Fandrich,
|
||||
Daniel Schauenberg, Daniel Stenberg, Francisco Moraes, Gisle Vanem,
|
||||
Isaac Boukris, Johannes Schindelin, John Kohl, Kamil Dudka, Marc Hoersken,
|
||||
Michael Kaufmann, Mohammad AlSaleh, Patrick Monnerat, Ray Satiro, Steve Holme,
|
||||
Tatsuhiro Tsujikawa, Thomas Glanzmann, Thomas Klausner,
|
||||
(21 contributors)
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
||||
|
||||
References to bug reports and discussions on issues:
|
||||
|
||||
[1] = http://curl.haxx.se/bug/?i=478
|
||||
[2] = http://curl.haxx.se/bug/?i=479
|
||||
[3] = http://curl.haxx.se/mail/lib-2015-10/0035.html
|
||||
[4] = http://curl.haxx.se/bug/?i=346
|
||||
[5] = http://curl.haxx.se/bug/?i=493
|
||||
[6] = http://curl.haxx.se/bug/?i=452
|
||||
[7] = http://curl.haxx.se/bug/?i=496
|
||||
[8] = http://curl.haxx.se/libcurl/c/CURLOPT_STREAM_DEPENDS.html
|
||||
[9] = http://curl.haxx.se/libcurl/c/CURLOPT_STREAM_DEPENDS_E.html
|
||||
[10] = http://curl.haxx.se/libcurl/c/CURLOPT_STREAM_WEIGHT.html
|
||||
[11] = http://curl.haxx.se/bug/?i=480
|
||||
[12] = https://github.com/bagder/curl/pull/501
|
||||
[13] = http://curl.haxx.se/bug/?i=506
|
||||
[14] = http://curl.haxx.se/bug/?i=425
|
||||
[15] = http://curl.haxx.se/bug/?i=473
|
||||
[16] = http://curl.haxx.se/bug/?i=486
|
||||
[17] = http://curl.haxx.se/bug/?i=524
|
||||
[18] = http://curl.haxx.se/bug/?i=523
|
||||
[19] = http://curl.haxx.se/bug/?i=525
|
||||
[20] = http://curl.haxx.se/bug/?i=526
|
||||
[1] = http://curl.haxx.se/mail/lib-2015-12/0003.html
|
||||
[2] = https://github.com/bagder/curl/issues/425#issuecomment-154518679
|
||||
[3] = http://curl.haxx.se/mail/lib-2015-12/0023.html
|
||||
[4] = http://curl.haxx.se/bug/?i=558
|
||||
[5] = http://curl.haxx.se/mail/lib-2015-11/0103.html
|
||||
[6] = http://curl.haxx.se/bug/?i=555
|
||||
[7] = http://curl.haxx.se/bug/?i=491
|
||||
[8] = http://curl.haxx.se/libcurl/c/CURLOPT_HTTP_VERSION.html
|
||||
[9] = http://curl.haxx.se/bug/?i=565
|
||||
[10] = http://curl.haxx.se/docs/manpage.html#--expect100-timeout
|
||||
[11] = http://curl.haxx.se/mail/lib-2015-12/0062.html
|
||||
[12] = http://curl.haxx.se/bug/?i=564
|
||||
[13] = http://curl.haxx.se/bug/?i=565
|
||||
[14] = https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-curl
|
||||
[15] = https://github.com/Alexpux/MINGW-packages/commit/9253d0bf58a1486e91f7efb5316e7fdb48fa4007
|
||||
[16] = http://curl.haxx.se/bug/?i=574
|
||||
[17] = http://curl.haxx.se/bug/?i=575
|
||||
[18] = http://curl.haxx.se/bug/?i=577
|
||||
[19] = http://curl.haxx.se/bug/?i=586
|
||||
[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
|
||||
# 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? */
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#include <stdlib.h> /* for exit() */
|
||||
main()
|
||||
{
|
||||
@@ -1097,8 +1101,8 @@ main()
|
||||
ipv6=yes,
|
||||
AC_MSG_RESULT(no)
|
||||
ipv6=no,
|
||||
AC_MSG_RESULT(no)
|
||||
ipv6=no
|
||||
AC_MSG_RESULT(yes)
|
||||
ipv6=yes
|
||||
))
|
||||
|
||||
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_TRY_COMPILE([
|
||||
#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)
|
||||
if test "$have_sin6_scope_id" = yes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
@@ -2166,11 +2175,11 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
|
||||
]])
|
||||
],[
|
||||
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])
|
||||
CYASSL_ENABLED=1
|
||||
USE_CYASSL="yes"
|
||||
curl_ssl_msg="enabled (CyaSSL)"
|
||||
curl_ssl_msg="enabled (WolfSSL)"
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
@@ -2182,7 +2191,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
|
||||
fi
|
||||
|
||||
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!
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
@@ -2195,6 +2204,16 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
|
||||
|
||||
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
|
||||
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
|
||||
@@ -3030,6 +3049,31 @@ if test X"$want_h2" != Xno; then
|
||||
|
||||
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 Back to "normal" configuring
|
||||
dnl **********************************************************************
|
||||
@@ -3797,6 +3841,7 @@ AC_CONFIG_FILES([Makefile \
|
||||
include/curl/Makefile \
|
||||
src/Makefile \
|
||||
lib/Makefile \
|
||||
scripts/Makefile \
|
||||
lib/libcurl.vers \
|
||||
tests/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
|
||||
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
|
||||
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.
|
||||
|
||||
@@ -251,9 +253,10 @@ FAQ
|
||||
|
||||
We still get help from companies. Haxx provides web site, bandwidth, mailing
|
||||
lists etc, sourceforge.net hosts project services we take advantage from,
|
||||
like the bug tracker and github hosts the primary git repository. Also
|
||||
again, some companies have sponsored certain parts of the development in the
|
||||
past and I hope some will continue to do so in the future.
|
||||
like the bug tracker, and GitHub hosts the primary git repository at
|
||||
https://github.com/bagder/curl. Also again, some companies have sponsored
|
||||
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
|
||||
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)
|
||||
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
|
||||
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
|
||||
obtain them (resp.) are here
|
||||
Comprehensible explanations of the meaning of such numbers and how to obtain
|
||||
them (resp.) are here
|
||||
|
||||
http://www.bis.doc.gov/licensing/exportingbasics.htm
|
||||
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
|
||||
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
|
||||
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
|
||||
|
@@ -100,8 +100,5 @@ automatically. [Spec](https://tools.ietf.org/html/draft-ietf-httpbis-alt-svc-05)
|
||||
TODO
|
||||
----
|
||||
|
||||
- Provide API to set priorities / dependencies of individual streams
|
||||
|
||||
- Implement "prior-knowledge" HTTP/2 connecitons over clear text so that
|
||||
- Implement "prior-knowledge" HTTP/2 connections over clear text so that
|
||||
curl can connect with HTTP/2 at once without 1.1+Upgrade.
|
||||
|
||||
|
@@ -45,10 +45,10 @@ MAN2HTML= roffit < $< >$@
|
||||
SUFFIXES = .1 .html .pdf
|
||||
|
||||
html: $(HTMLPAGES)
|
||||
cd libcurl; make html
|
||||
cd libcurl && make html
|
||||
|
||||
pdf: $(PDFPAGES)
|
||||
cd libcurl; make pdf
|
||||
cd libcurl && make pdf
|
||||
|
||||
.1.html:
|
||||
$(MAN2HTML)
|
||||
|
@@ -23,13 +23,6 @@ HTTP/2
|
||||
As it would avoid the roundtrip-heavy Upgrade: procedures when you _know_
|
||||
it speaks HTTP/2.
|
||||
|
||||
- provide option to allow curl to default to HTTP/2 only when using HTTPS
|
||||
|
||||
We could switch on HTTP/2 by-default for HTTPS quite easily and it
|
||||
shouldn't hurt anyone, while HTTP/2 for HTTP by default could introduce
|
||||
lots of Upgrade: roundtrips that users won't like. So a separated option
|
||||
alternative makes sense.
|
||||
|
||||
SRV records
|
||||
-----------
|
||||
|
||||
|
26
docs/THANKS
26
docs/THANKS
@@ -207,6 +207,7 @@ Christian Krause
|
||||
Christian Kurz
|
||||
Christian Robottom Reis
|
||||
Christian Schmitz
|
||||
Christian Stewart
|
||||
Christian Vogt
|
||||
Christian Weisgerber
|
||||
Christophe Demory
|
||||
@@ -261,7 +262,9 @@ Daniel Kahn Gillmor
|
||||
Daniel Lee Hwang
|
||||
Daniel Melani
|
||||
Daniel Mentz
|
||||
Daniel Schauenberg
|
||||
Daniel Seither
|
||||
Daniel Shahaf
|
||||
Daniel Steinberg
|
||||
Daniel Stenberg
|
||||
Daniel Theron
|
||||
@@ -275,6 +278,7 @@ Dave May
|
||||
Dave Reisner
|
||||
Dave Thompson
|
||||
Dave Vasilevsky
|
||||
Davey Shafik
|
||||
David Bau
|
||||
David Binderman
|
||||
David Blaikie
|
||||
@@ -328,12 +332,14 @@ Dmitry Falko
|
||||
Dmitry Kurochkin
|
||||
Dmitry Popov
|
||||
Dmitry Rechkin
|
||||
Dmitry S. Baikov
|
||||
Dolbneff A.V
|
||||
Domenico Andreoli
|
||||
Dominick Meglio
|
||||
Dominique Leuenberger
|
||||
Doug Kaufman
|
||||
Doug Porter
|
||||
Douglas Creager
|
||||
Douglas E. Wegscheid
|
||||
Douglas Kilpatrick
|
||||
Douglas R. Horner
|
||||
@@ -398,9 +404,11 @@ Feist Josselin
|
||||
Felix Yan
|
||||
Felix von Leitner
|
||||
Feng Tu
|
||||
Flavio Medeiros
|
||||
Florian Schoppmann
|
||||
Florian Weimer
|
||||
Forrest Cahoon
|
||||
Francisco Moraes
|
||||
Frank Gevaerts
|
||||
Frank Hempel
|
||||
Frank Keeney
|
||||
@@ -549,6 +557,7 @@ Jason Liu
|
||||
Jason McDonald
|
||||
Jason S. Priebe
|
||||
Javier Barroso
|
||||
Javier G. Sogo
|
||||
Jay Austin
|
||||
Jayesh A Shah
|
||||
Jaz Fresh
|
||||
@@ -604,6 +613,7 @@ Johan Nilsson
|
||||
Johan van Selst
|
||||
Johannes Bauer
|
||||
Johannes Ernst
|
||||
Johannes Schindelin
|
||||
John Bradshaw
|
||||
John Coffey
|
||||
John Crow
|
||||
@@ -614,7 +624,9 @@ John Gardiner Myers
|
||||
John Janssen
|
||||
John Joseph Bachir
|
||||
John Kelly
|
||||
John Kohl
|
||||
John Lask
|
||||
John Levon
|
||||
John Lightsey
|
||||
John Marino
|
||||
John Marshall
|
||||
@@ -633,6 +645,7 @@ Jon Torrey
|
||||
Jon Travis
|
||||
Jon Turner
|
||||
Jonas Forsman
|
||||
Jonas Minnberg
|
||||
Jonas Schnelli
|
||||
Jonatan Lander
|
||||
Jonatan Vela
|
||||
@@ -661,6 +674,7 @@ Julien Nabet
|
||||
Julien Royer
|
||||
Jun-ichiro itojun Hagino
|
||||
Jurij Smakov
|
||||
Justin Ehlert
|
||||
Justin Fletcher
|
||||
Justin Karneges
|
||||
Justin Maggard
|
||||
@@ -672,6 +686,7 @@ Kai Sommerfeld
|
||||
Kai-Uwe Rommel
|
||||
Kalle Vahlman
|
||||
Kamil Dudka
|
||||
Kang Lin
|
||||
Kang-Jin Lee
|
||||
Karl Moerder
|
||||
Karol Pietrzak
|
||||
@@ -703,6 +718,7 @@ Krishnendu Majumdar
|
||||
Krister Johansen
|
||||
Kristian Gunstone
|
||||
Kristian Köhntopp
|
||||
Kurt Fankhauser
|
||||
Kyle J. McKay
|
||||
Kyle L. Huff
|
||||
Kyle Sallee
|
||||
@@ -719,6 +735,7 @@ Lars Nilsson
|
||||
Lars Torben Wilson
|
||||
Lau Hang Kin
|
||||
Laurent Rabret
|
||||
Lauri Kasanen
|
||||
Legoff Vincent
|
||||
Lehel Bernadt
|
||||
Leif W
|
||||
@@ -747,6 +764,7 @@ Lucas Adamski
|
||||
Lucas Pardue
|
||||
Ludek Finstrle
|
||||
Ludovico Cavedon
|
||||
Lukas Ruzicka
|
||||
Lukasz Czekierda
|
||||
Luke Amery
|
||||
Luke Call
|
||||
@@ -855,6 +873,7 @@ Michal Marek
|
||||
Michał Fita
|
||||
Michał Górny
|
||||
Michał Kowalczyk
|
||||
Michał Piechowski
|
||||
Michel Promonet
|
||||
Michele Bini
|
||||
Miguel Angel
|
||||
@@ -913,6 +932,7 @@ Nis Jorgensen
|
||||
Nobuhiro Ban
|
||||
Nodak Sodak
|
||||
Norbert Frese
|
||||
Norbert Kett
|
||||
Norbert Novotny
|
||||
Ofer
|
||||
Ola Mork
|
||||
@@ -1049,6 +1069,7 @@ Richard Bramante
|
||||
Richard Clayton
|
||||
Richard Cooper
|
||||
Richard Gorton
|
||||
Richard Hosking
|
||||
Richard Michael
|
||||
Richard Moore
|
||||
Richard Prescott
|
||||
@@ -1122,6 +1143,7 @@ Scott Cantor
|
||||
Scott Davis
|
||||
Scott McCreary
|
||||
Sean Boudreau
|
||||
Sebastian Pohlschmidt
|
||||
Sebastian Rasmussen
|
||||
Senthil Raja Velu
|
||||
Sergei Nikulov
|
||||
@@ -1195,6 +1217,7 @@ Tatsuhiro Tsujikawa
|
||||
Temprimus
|
||||
Terri Oda
|
||||
Thomas Braun
|
||||
Thomas Glanzmann
|
||||
Thomas J. Moore
|
||||
Thomas Klausner
|
||||
Thomas L. Shinnick
|
||||
@@ -1213,7 +1236,7 @@ Tim Costello
|
||||
Tim Harder
|
||||
Tim Heckman
|
||||
Tim Newsome
|
||||
Tim Ruehsen
|
||||
Tim Rühsen
|
||||
Tim Sneddon
|
||||
Tim Stack
|
||||
Tim Starling
|
||||
@@ -1302,6 +1325,7 @@ Wojciech Zwiefka
|
||||
Wouter Van Rooy
|
||||
Wu Yongzheng
|
||||
Xavier Bouchoux
|
||||
Xiangbin Li
|
||||
Yaakov Selkowitz
|
||||
Yamada Yasuharu
|
||||
Yang Tse
|
||||
|
@@ -51,3 +51,4 @@ s/Viktor Szakats/Viktor Szakáts/
|
||||
s/Jonathan Cardoso/Jonathan Cardoso Machado/
|
||||
s/Linus Nielsen/Linus Nielsen Feltzing/
|
||||
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.10 Support IDNA2008
|
||||
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.1 More non-blocking
|
||||
2.2 Fix HTTP Pipelining for PUT
|
||||
2.3 Better support for same name resolves
|
||||
2.2 Better support for same name resolves
|
||||
2.3 Non-blocking curl_multi_remove_handle()
|
||||
2.4 Split connect and authentication process
|
||||
|
||||
3. Documentation
|
||||
3.1 Update date and version in man pages
|
||||
@@ -78,6 +84,7 @@
|
||||
11.1 File listing support
|
||||
11.2 Honor file timestamps
|
||||
11.3 Use NTLMv2
|
||||
11.4 Create remote directories
|
||||
|
||||
12. New protocols
|
||||
12.1 RSYNC
|
||||
@@ -141,8 +148,6 @@
|
||||
21.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
|
||||
21.7 remove progress meter from libcurl
|
||||
21.8 remove 'curl_httppost' from public
|
||||
21.9 have form functions use CURL handle argument
|
||||
21.10 Add CURLOPT_MAIL_CLIENT option
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -236,6 +241,59 @@
|
||||
app/invoke/used protocols would be necessary to load. See
|
||||
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.1 More non-blocking
|
||||
@@ -252,13 +310,7 @@
|
||||
- The "DONE" operation (post transfer protocol-specific actions) for the
|
||||
protocols SFTP, SMTP, FTP. Fixing Curl_done() for this is a worthy task.
|
||||
|
||||
2.2 Fix HTTP Pipelining for PUT
|
||||
|
||||
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
|
||||
2.2 Better support for same name resolves
|
||||
|
||||
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
|
||||
@@ -266,6 +318,20 @@
|
||||
especially needed when adding many simultaneous handles using the same host
|
||||
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
|
||||
|
||||
@@ -460,6 +526,11 @@ The timestamp of the transferred file should reflect that of the original file.
|
||||
|
||||
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.1 RSYNC
|
||||
@@ -815,22 +886,3 @@ Currently the SMB authentication uses NTLMv1.
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
is used to seed the random engine for SSL connections. See also the
|
||||
\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>"
|
||||
(SSL) Tells curl what certificate type the provided certificate is in. PEM,
|
||||
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
|
||||
usercertinmem
|
||||
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
|
||||
# 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-search imap-create imap-delete imap-copy imap-noop imap-ssl \
|
||||
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
|
||||
# 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
|
||||
|
||||
anyauthput.c - HTTP PUT using "any" authentication method
|
||||
cacertinmem.c - Use a built-in PEM certificate to retrieve a https page
|
||||
cookie_interface.c - shows usage of simple cookie interface
|
||||
curlgtk.c - download using a GTK progress bar
|
||||
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.
|
||||
Each example source code file is designed to be and work stand-alone and
|
||||
rather self-explanatory. The examples may at times lack the level of error
|
||||
checks you need in a real world, but that is then only for the sake of
|
||||
readability: to make the code smaller and easier to follow.
|
||||
|
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 <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* somewhat unix-specific */
|
||||
#include <sys/time.h>
|
||||
|
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* somewhat unix-specific */
|
||||
#include <sys/time.h>
|
||||
|
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
@@ -19,10 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* Simple IMAP APPEND use
|
||||
* IMAP example showing how to send e-mails
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* 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 <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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* IMAP example showing how to create a new folder
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* IMAP example showing how to delete a folder
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* IMAP example showing how to obtain information about a folder
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* IMAP example showing how to retreieve e-mails
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* IMAP example to list the folders within a mailbox
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* IMAP example to list the subscribed folders
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,7 +19,14 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* IMAP example using the multi interface
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
/* 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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* IMAP example showing how to perform a noop
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* IMAP example showing how to search for new e-mails
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* IMAP example using SSL
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* IMAP example showing how to modify the properties of an e-mail
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* IMAP example using TLS
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,7 +19,11 @@
|
||||
* 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 <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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* POP3 example showing how to delete e-mails
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* POP3 example to list the contents of a mailbox
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,7 +19,14 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* POP3 example using the multi interface
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
/* 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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* POP3 example showing how to perform a noop
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* POP3 example showing how to retrieve e-mails
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* POP3 example using SSL
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* POP3 example showing how to obtain message statistics
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* POP3 example using TLS
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* POP3 example showing how to retreive only the headers of an e-mail
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* POP3 example to list the contents of a mailbox by unique ID
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* Make a HTTP POST with data from memory and receive response in memory.
|
||||
* </DESC>
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,10 @@
|
||||
* 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
|
||||
* "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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,11 @@
|
||||
* 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 <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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,11 @@
|
||||
* 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 <curl/curl.h>
|
||||
|
||||
|
@@ -27,6 +27,10 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/* <DESC>
|
||||
* A basic RTSP transfer
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,10 +19,13 @@
|
||||
* 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
|
||||
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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,7 +19,10 @@
|
||||
* 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 <string.h>
|
||||
@@ -66,6 +69,14 @@ int main(void)
|
||||
size_t iolen;
|
||||
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();
|
||||
if(curl) {
|
||||
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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* Simple HTTP GET that stores the headers in a separate file
|
||||
* </DESC>
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* Uses the CURLINFO_TLS_SESSION data.
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
/* Note that this example currently requires cURL to be linked against
|
||||
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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* Gets a file using an SFTP URL.
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* Very simple HTTP GET
|
||||
* </DESC>
|
||||
*/
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* Very simple HTTP POST
|
||||
* </DESC>
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* Shows HTTPS usage with client certs and optional ssl engine use.
|
||||
* </DESC>
|
||||
*/
|
||||
#include <stdio.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,9 +19,12 @@
|
||||
* 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.
|
||||
*
|
||||
* </DESC>
|
||||
*/
|
||||
/*
|
||||
* Written by Jud Bishop after studying the other examples provided with
|
||||
* 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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,11 +19,17 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* SMTP example showing how to expand an e-mail mailing list
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.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:
|
||||
*
|
||||
|
@@ -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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* SMTP example showing how to send e-mails
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* SMTP example using the multi interface
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <string.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* SMTP example using SSL
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* SMTP example using TLS
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,11 +19,17 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* SMTP example showing how to verify an e-mail address
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.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.
|
||||
*
|
||||
* 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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,10 @@
|
||||
* 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.
|
||||
*
|
||||
* 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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,11 @@
|
||||
* 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
|
||||
* once over HTTPS. The lock callbacks and stuff assume OpenSSL or GnuTLS
|
||||
* (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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* Download a given URL into a local file named page.out.
|
||||
* </DESC>
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,10 +19,13 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
/* Example using an in memory PEM user certificate and RSA key to retrieve an
|
||||
* https page.
|
||||
* Written by Ishan SinghLevett, based on Theo Borm's cacertinmem.c.
|
||||
* Note that to maintain simplicity this example does not use a CA certificate
|
||||
* </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
|
||||
* for peer verification. However, some form of peer verification
|
||||
* 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
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -19,8 +19,11 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* Stream-parse a document using the streaming Expat parser.
|
||||
* Written by David Strauss
|
||||
/* <DESC>
|
||||
* Stream-parse a document using the streaming Expat parser.
|
||||
* </DESC>
|
||||
*/
|
||||
/* Written by David Strauss
|
||||
*
|
||||
* 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 > $@
|
||||
|
||||
html: $(HTMLPAGES)
|
||||
cd opts; make html
|
||||
cd opts && make html
|
||||
|
||||
.3.html:
|
||||
$(MAN2HTML)
|
||||
|
||||
pdf: $(PDFPAGES)
|
||||
cd opts; make pdf
|
||||
cd opts && make pdf
|
||||
|
||||
.3.pdf:
|
||||
@(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
|
||||
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
|
||||
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
|
||||
.\" * 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>
|
||||
|
||||
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);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
|
@@ -76,9 +76,9 @@ typedef struct {
|
||||
.fi
|
||||
|
||||
\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
|
||||
have a matching struct for in the header, as you tell libcurl your "age" with
|
||||
the input argument.
|
||||
new the libcurl you're using is. You are however guaranteed to get a struct
|
||||
that you have a matching struct for in the header, as you tell libcurl your
|
||||
"age" with the input argument.
|
||||
|
||||
\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
|
||||
libcurl was built with support for Unix domain sockets.
|
||||
(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
|
||||
\fIssl_version\fP is an ASCII string for the OpenSSL version used. If libcurl
|
||||
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
|
||||
\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.
|
||||
(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
|
||||
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
|
||||
HTTP, FTP and SMTP
|
||||
.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
|
||||
Added in 7.10.8. CURLINFO_HTTP_CODE was added in 7.4.1.
|
||||
.SH RETURN VALUE
|
||||
|
@@ -85,7 +85,7 @@ static size_t header_callback(char *buffer, size_t size,
|
||||
size_t nitems, void *userdata)
|
||||
{
|
||||
/* 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;
|
||||
}
|
||||
|
||||
|
@@ -45,8 +45,15 @@ Enforce HTTP 1.0 requests.
|
||||
.IP CURL_HTTP_VERSION_1_1
|
||||
Enforce HTTP 1.1 requests.
|
||||
.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)
|
||||
|
||||
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
|
||||
CURL_HTTP_VERSION_NONE
|
||||
.SH PROTOCOLS
|
||||
|
@@ -91,8 +91,9 @@ footer:
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.39.0 for OpenSSL, GnuTLS and GSKit. Added in 7.43.0 for
|
||||
NSS and wolfSSL/CyaSSL. sha256 support added in 7.44.0 for OpenSSL,
|
||||
GnuTLS, NSS and wolfSSL/CyaSSL. Other SSL backends not supported.
|
||||
NSS and wolfSSL/CyaSSL. Added for mbedtls in 7.47.0, sha256 support
|
||||
added in 7.44.0 for OpenSSL, GnuTLS, NSS and wolfSSL/CyaSSL. Other
|
||||
SSL backends not supported.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if TLS enabled, CURLE_UNKNOWN_OPTION if not, or
|
||||
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
|
||||
.\" * 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
|
||||
\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
|
||||
techniques). 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.
|
||||
techniques). Unfortunately, the HTTP standard (RFC 7233 section 3.1) allows
|
||||
servers to ignore range requests so even when you set \fICURLOPT_RANGE\fP for
|
||||
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.
|
||||
.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
|
||||
.\" * 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
|
||||
host+port pair so redirects and everything that operations against the
|
||||
HOST+PORT will instead use your provided ADDRESS. Addresses to set with
|
||||
\fICURL_RESOLVE\fP will not time-out from the DNS cache like ordinary
|
||||
entries.
|
||||
HOST+PORT will instead use your provided ADDRESS. Addresses set with
|
||||
\fICURL_RESOLVE\fP will not time-out from the DNS cache like ordinary entries.
|
||||
|
||||
You can remove names from the DNS cache again, to stop providing these fake
|
||||
resolves, by including a string in the linked list that uses the format
|
||||
Remove names from the DNS cache again, to stop providing these fake resolves,
|
||||
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
|
||||
and port number must exactly match what was already added previously. (Added in
|
||||
7.42.0)
|
||||
and port number must exactly match what was already added previously. (Added
|
||||
in 7.42.0)
|
||||
.SH DEFAULT
|
||||
NULL
|
||||
.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
|
||||
set.
|
||||
|
||||
If an empty string is passed, libcurl will pass no public key to libssh2 which
|
||||
then tries to compute it from the private key, this is known to work when
|
||||
libssh2 1.4.0+ is linked against OpenSSL.
|
||||
If NULL (or an empty string) is passed, libcurl will pass no public key to
|
||||
libssh2, which then tries to compute it from the private key. This is known
|
||||
to work with libssh2 1.4.0+ linked against OpenSSL.
|
||||
.SH DEFAULT
|
||||
As explained above
|
||||
NULL
|
||||
.SH PROTOCOLS
|
||||
SFTP and SCP
|
||||
.SH EXAMPLE
|
||||
|
@@ -237,7 +237,6 @@ CURLINFO_PRIMARY_IP 7.19.0
|
||||
CURLINFO_PRIMARY_PORT 7.21.0
|
||||
CURLINFO_PRIVATE 7.10.3
|
||||
CURLINFO_PROXYAUTH_AVAIL 7.10.8
|
||||
CURLINFO_PROXY_SSL_VERIFYRESULT 7.44.0
|
||||
CURLINFO_REDIRECT_COUNT 7.9.7
|
||||
CURLINFO_REDIRECT_TIME 7.9.7
|
||||
CURLINFO_REDIRECT_URL 7.18.2
|
||||
@@ -463,23 +462,7 @@ CURLOPT_PROXYPORT 7.1
|
||||
CURLOPT_PROXYTYPE 7.10
|
||||
CURLOPT_PROXYUSERNAME 7.19.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_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_PUT 7.1
|
||||
CURLOPT_QUOTE 7.1
|
||||
@@ -509,8 +492,6 @@ CURLOPT_SOCKOPTDATA 7.16.0
|
||||
CURLOPT_SOCKOPTFUNCTION 7.16.0
|
||||
CURLOPT_SOCKS5_GSSAPI_NEC 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_PATH 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
|
||||
CURLPROXY_HTTP 7.10
|
||||
CURLPROXY_HTTP_1_0 7.19.4
|
||||
CURLPROXY_HTTPS 7.44.0
|
||||
CURLPROXY_SOCKS4 7.10
|
||||
CURLPROXY_SOCKS4A 7.18.0
|
||||
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_2 7.43.0
|
||||
CURL_HTTP_VERSION_2_0 7.33.0
|
||||
CURL_HTTP_VERSION_2TLS 7.47.0
|
||||
CURL_HTTP_VERSION_NONE 7.9.1
|
||||
CURL_IPRESOLVE_V4 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_NTLM 7.10.6
|
||||
CURL_VERSION_NTLM_WB 7.22.0
|
||||
CURL_VERSION_PSL 7.47.0
|
||||
CURL_VERSION_SPNEGO 7.10.8
|
||||
CURL_VERSION_SSL 7.10
|
||||
CURL_VERSION_SSPI 7.13.2
|
||||
|
@@ -56,7 +56,8 @@
|
||||
#include <time.h>
|
||||
|
||||
#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
|
||||
included, since they can't co-exist without problems */
|
||||
#include <winsock2.h>
|
||||
@@ -112,7 +113,7 @@ typedef void CURL;
|
||||
|
||||
#ifndef curl_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;
|
||||
#define CURL_SOCKET_BAD INVALID_SOCKET
|
||||
#else
|
||||
@@ -622,7 +623,6 @@ typedef enum {
|
||||
CONNECT HTTP/1.1 */
|
||||
CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT
|
||||
HTTP/1.0 */
|
||||
CURLPROXY_HTTPS = 2, /* added in TBD */
|
||||
CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already
|
||||
in 7.10 */
|
||||
CURLPROXY_SOCKS5 = 5, /* added in 7.10 */
|
||||
@@ -1189,8 +1189,7 @@ typedef enum {
|
||||
CINIT(SHARE, OBJECTPOINT, 100),
|
||||
|
||||
/* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),
|
||||
CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and
|
||||
CURLPROXY_SOCKS5. */
|
||||
CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */
|
||||
CINIT(PROXYTYPE, LONG, 101),
|
||||
|
||||
/* 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 */
|
||||
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 */
|
||||
} CURLoption;
|
||||
|
||||
@@ -1787,7 +1722,8 @@ enum {
|
||||
for us! */
|
||||
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_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 */
|
||||
};
|
||||
@@ -2233,10 +2169,9 @@ typedef enum {
|
||||
CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42,
|
||||
CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43,
|
||||
CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44,
|
||||
CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 45,
|
||||
/* Fill in new entries below here! */
|
||||
|
||||
CURLINFO_LASTONE = 45
|
||||
CURLINFO_LASTONE = 44
|
||||
} CURLINFO;
|
||||
|
||||
/* 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_KERBEROS5 (1<<18) /* Kerberos V5 auth is supported */
|
||||
#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()
|
||||
|
@@ -30,12 +30,12 @@
|
||||
|
||||
/* This is the version number of the libcurl package from which this header
|
||||
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
|
||||
defines: */
|
||||
#define LIBCURL_VERSION_MAJOR 7
|
||||
#define LIBCURL_VERSION_MINOR 46
|
||||
#define LIBCURL_VERSION_MINOR 47
|
||||
#define LIBCURL_VERSION_PATCH 0
|
||||
|
||||
/* 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
|
||||
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
|
||||
|
@@ -416,6 +416,7 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
|
||||
if(result)
|
||||
/* close the connection, since we can't return failure here without
|
||||
cleaning up this connection properly.
|
||||
TODO: remove this action from here, it is not a name resolver decision.
|
||||
*/
|
||||
connclose(conn, "c-ares resolve failed");
|
||||
|
||||
|
@@ -627,7 +627,8 @@ Vista
|
||||
/* Define if struct sockaddr_in6 has the sin6_scope_id member. */
|
||||
#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
|
||||
#endif
|
||||
|
||||
|
@@ -133,9 +133,7 @@ void Curl_conncache_destroy(struct conncache *connc)
|
||||
static char *hashkey(struct connectdata *conn)
|
||||
{
|
||||
return aprintf("%s:%d",
|
||||
conn->bits.socksproxy ? conn->socks_proxy.host.name :
|
||||
conn->bits.httpproxy ? conn->http_proxy.host.name :
|
||||
conn->host.name,
|
||||
conn->bits.proxy?conn->proxy.name:conn->host.name,
|
||||
conn->localport);
|
||||
}
|
||||
|
||||
|
@@ -850,8 +850,7 @@ CURLcode Curl_is_connected(struct connectdata *conn,
|
||||
}
|
||||
|
||||
failf(data, "Failed to connect to %s port %ld: %s",
|
||||
conn->bits.socksproxy ? conn->socks_proxy.host.name :
|
||||
conn->bits.httpproxy ? conn->http_proxy.host.name : conn->host.name,
|
||||
conn->bits.proxy?conn->proxy.name:conn->host.name,
|
||||
conn->port, Curl_strerror(conn, error));
|
||||
}
|
||||
|
||||
|
@@ -521,7 +521,11 @@ void
|
||||
curl_dofreeaddrinfo(struct addrinfo *freethis,
|
||||
int line, const char *source)
|
||||
{
|
||||
#ifdef USE_LWIPSOCK
|
||||
lwip_freeaddrinfo(freethis);
|
||||
#else
|
||||
(freeaddrinfo)(freethis);
|
||||
#endif
|
||||
curl_memlog("ADDR %s:%d freeaddrinfo(%p)\n",
|
||||
source, line, (void *)freethis);
|
||||
}
|
||||
@@ -544,7 +548,11 @@ curl_dogetaddrinfo(const char *hostname,
|
||||
struct addrinfo **result,
|
||||
int line, const char *source)
|
||||
{
|
||||
#ifdef USE_LWIPSOCK
|
||||
int res=lwip_getaddrinfo(hostname, service, hints, result);
|
||||
#else
|
||||
int res=(getaddrinfo)(hostname, service, hints, result);
|
||||
#endif
|
||||
if(0 == res)
|
||||
/* success */
|
||||
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);
|
||||
#endif
|
||||
|
||||
#if defined(CURLDEBUG) && defined(HAVE_FREEADDRINFO)
|
||||
#if defined(CURLDEBUG) && defined(HAVE_GETADDRINFO) && \
|
||||
defined(HAVE_FREEADDRINFO)
|
||||
void
|
||||
curl_dofreeaddrinfo(struct addrinfo *freethis,
|
||||
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
|
||||
* 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
|
||||
* 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
|
||||
* of allowing library user to provide memory replacement functions,
|
||||
|
@@ -137,8 +137,8 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy)
|
||||
|
||||
if(proxy) {
|
||||
allocuserpwd = &conn->allocptr.proxyuserpwd;
|
||||
userp = conn->http_proxy.user;
|
||||
passwdp = conn->http_proxy.passwd;
|
||||
userp = conn->proxyuser;
|
||||
passwdp = conn->proxypasswd;
|
||||
ntlm = &conn->proxyntlm;
|
||||
authp = &conn->data->state.authproxy;
|
||||
}
|
||||
|
@@ -350,7 +350,7 @@ CURLcode Curl_output_ntlm_wb(struct connectdata *conn,
|
||||
|
||||
if(proxy) {
|
||||
allocuserpwd = &conn->allocptr.proxyuserpwd;
|
||||
userp = conn->http_proxy.user;
|
||||
userp = conn->proxyuser;
|
||||
ntlm = &conn->proxyntlm;
|
||||
authp = &conn->data->state.authproxy;
|
||||
}
|
||||
|
@@ -481,9 +481,10 @@
|
||||
/*
|
||||
* msvc 6.0 requires PSDK in order to have INET6_ADDRSTRLEN
|
||||
* 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) || \
|
||||
((_MSC_VER < 1300) && !defined(INET6_ADDRSTRLEN))
|
||||
# undef HAVE_GETADDRINFO_THREADSAFE
|
||||
@@ -527,6 +528,7 @@
|
||||
# define CURLRES_ARES
|
||||
/* now undef the stock libc functions just to avoid them being used */
|
||||
# undef HAVE_GETADDRINFO
|
||||
# undef HAVE_FREEADDRINFO
|
||||
# undef HAVE_GETHOSTBYNAME
|
||||
#elif defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
|
||||
# define CURLRES_ASYNCH
|
||||
@@ -674,7 +676,7 @@ int netware_init(void);
|
||||
* 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) || \
|
||||
defined(USE_WINSOCK) || \
|
||||
defined(HAVE_WINSOCK_H) || \
|
||||
|
@@ -646,7 +646,7 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev)
|
||||
return CURLE_RECV_ERROR;
|
||||
|
||||
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
|
||||
second argument */
|
||||
|
@@ -830,19 +830,26 @@ static CURLcode AddFormData(struct FormData **formp,
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
newform->next = NULL;
|
||||
|
||||
if(length < 0 || (size && *size < 0))
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
|
||||
if(type <= FORM_CONTENT) {
|
||||
/* we make it easier for plain strings: */
|
||||
if(!length)
|
||||
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) {
|
||||
free(newform);
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
memcpy(newform->line, line, length);
|
||||
newform->length = length;
|
||||
newform->line[length]=0; /* zero terminate for easier debugging */
|
||||
memcpy(newform->line, line, (size_t)length);
|
||||
newform->length = (size_t)length;
|
||||
newform->line[(size_t)length]=0; /* zero terminate for easier debugging */
|
||||
}
|
||||
else
|
||||
/* 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;
|
||||
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
|
||||
* do the TLS stuff */
|
||||
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.
|
||||
*/
|
||||
}
|
||||
else if(!Curl_ssl_data_pending(conn, FIRSTSOCKET)) {
|
||||
else {
|
||||
switch (Curl_socket_ready(sockfd, CURL_SOCKET_BAD, interval_ms)) {
|
||||
case -1: /* select() error, stop reading */
|
||||
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;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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)
|
||||
{
|
||||
@@ -1849,7 +1927,11 @@ static char *control_address(struct connectdata *conn)
|
||||
If a proxy tunnel is used, returns the original host name instead, because
|
||||
the effective control connection address is the proxy address,
|
||||
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->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
|
||||
* expired now, instead we remake the lookup here and now!
|
||||
*/
|
||||
const char * const host_name = conn->bits.socksproxy ?
|
||||
conn->socks_proxy.host.name : conn->http_proxy.host.name;
|
||||
rc = Curl_resolv(conn, host_name, (int)conn->port, &addr);
|
||||
rc = Curl_resolv(conn, conn->proxy.name, (int)conn->port, &addr);
|
||||
if(rc == CURLRESOLV_PENDING)
|
||||
/* BLOCKING, ignores the return code but 'addr' will be NULL in
|
||||
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 */
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -2026,10 +2107,6 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
|
||||
/* this just dumps information about this second connection */
|
||||
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 */
|
||||
conn->bits.do_more = TRUE;
|
||||
state(conn, FTP_STOP); /* this phase is completed */
|
||||
@@ -2678,10 +2755,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
|
||||
}
|
||||
#endif
|
||||
|
||||
if(data->set.use_ssl &&
|
||||
(!conn->ssl[FIRSTSOCKET].use ||
|
||||
(conn->bits.proxy_ssl_connected[FIRSTSOCKET] &&
|
||||
!conn->proxy_ssl[FIRSTSOCKET].use))) {
|
||||
if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
|
||||
/* We don't have a SSL/TLS connection yet, but FTPS is
|
||||
requested. Try a FTPS connection now */
|
||||
|
||||
@@ -2726,7 +2800,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
|
||||
/* Curl_ssl_connect is BLOCKING */
|
||||
result = Curl_ssl_connect(conn, FIRSTSOCKET);
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -2768,7 +2842,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
|
||||
case FTP_PROT:
|
||||
if(ftpcode/100 == 2)
|
||||
/* 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;
|
||||
/* FTP servers typically responds with 500 if they decide to reject
|
||||
our 'P' request */
|
||||
@@ -3585,7 +3659,7 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep)
|
||||
if(!conn->bits.tcpconnect[SECONDARYSOCKET]) {
|
||||
if(conn->tunnel_state[SECONDARYSOCKET] == TUNNEL_CONNECT) {
|
||||
/* 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);
|
||||
|
||||
return result;
|
||||
@@ -3596,6 +3670,10 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep)
|
||||
/* Ready to do more? */
|
||||
if(connected) {
|
||||
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 {
|
||||
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) {
|
||||
/* already in a state so skip the intial commands.
|
||||
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 *filename = NULL;
|
||||
|
||||
cur_pos = path_to_use; /* current position in path. point at the begin of
|
||||
next path component */
|
||||
cur_pos = path_to_use; /* current position in path. point at the begin
|
||||
of next path component */
|
||||
|
||||
ftpc->ctl_valid = 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:
|
||||
parser->item_length++;
|
||||
if(c == '\r') {
|
||||
parser->item_length--;
|
||||
parser->state.UNIX.sub.filename = PL_UNIX_FILENAME_WINDOWSEOL;
|
||||
}
|
||||
else if(c == '\n') {
|
||||
@@ -744,7 +743,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
|
||||
break;
|
||||
case PL_UNIX_FILENAME_WINDOWSEOL:
|
||||
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->state.UNIX.main = PL_UNIX_FILETYPE;
|
||||
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;
|
||||
case PL_UNIX_SYMLINK_TARGET:
|
||||
parser->item_length ++;
|
||||
parser->item_length++;
|
||||
if(c == '\r') {
|
||||
parser->item_length --;
|
||||
parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_WINDOWSEOL;
|
||||
}
|
||||
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