Compare commits

..

149 Commits

Author SHA1 Message Date
Daniel Stenberg
06bf874bbc examples/Makefile.inc: specify programs without .c! 2016-01-27 08:30:04 +01:00
Daniel Stenberg
87a5d3d13e THANKS: 6 new contributors from 7.47.0 release notes 2016-01-26 23:45:02 +01:00
Isaac Boukris
d41dcba4e9 NTLM: Fix ConnectionExists to compare Proxy credentials
Proxy NTLM authentication should compare credentials when
re-using a connection similar to host authentication, as it
authenticate the connection.

Example:
curl -v -x http://proxy:port http://host/ -U good_user:good_pwd
  --proxy-ntlm --next -x http://proxy:port http://host/
    [-U fake_user:fake_pwd --proxy-ntlm]

CVE-2016-0755

Bug: http://curl.haxx.se/docs/adv_20160127A.html
2016-01-26 23:42:55 +01:00
Ray Satiro
3017d8a8d8 curl: avoid local drive traversal when saving file (Windows)
curl does not sanitize colons in a remote file name that is used as the
local file name. This may lead to a vulnerability on systems where the
colon is a special path character. Currently Windows/DOS is the only OS
where this vulnerability applies.

CVE-2016-0754

Bug: http://curl.haxx.se/docs/adv_20160127B.html
2016-01-26 23:42:55 +01:00
Daniel Stenberg
cea1fd7a94 RELEASE-NOTES: 7.47.0 2016-01-26 23:42:55 +01:00
Daniel Stenberg
14f92f2d2c FAQ: language fix in 4.19 2016-01-25 11:11:29 +01:00
paulehoffman
53d1e42c41 FAQ: Update to point to GitHub
Current FAQ didn't make it clear where the main repo is.

Closes #612
2016-01-24 23:29:01 +01:00
Daniel Stenberg
b9da2cfed1 maketgz: generate date stamp with LC_TIME=C
bug: http://curl.haxx.se/mail/lib-2016-01/0123.html
2016-01-24 20:31:30 +01:00
Daniel Stenberg
5a28126b22 curl_multi_socket_action.3: line wrap 2016-01-24 20:31:30 +01:00
Daniel Stenberg
1783070801 RELEASE-NOTES: synced with d58ba66eec 2016-01-24 20:31:30 +01:00
Steve Holme
b03f01742d TODO: "Create remote directories" for SMB 2016-01-21 21:05:55 +00:00
Jay Satiro
d58ba66eec mbedtls: Fix pinned key return value on fail
- Switch from verifying a pinned public key in a callback during the
certificate verification to inline after the certificate verification.

The callback method had three problems:

1. If a pinned public key didn't match, CURLE_SSL_PINNEDPUBKEYNOTMATCH
was not returned.

2. If peer certificate verification was disabled the pinned key
verification did not take place as it should.

3. (related to #2) If there was no certificate of depth 0 the callback
would not have checked the pinned public key.

Though all those problems could have been fixed it would have made the
code more complex. Instead we now verify inline after the certificate
verification in mbedtls_connect_step2.

Ref: http://curl.haxx.se/mail/lib-2016-01/0047.html
Ref: https://github.com/bagder/curl/pull/601
2016-01-18 03:48:10 -05:00
Jay Satiro
d566371130 tests: Add a test for pinnedpubkey fail even when insecure
Because disabling the peer verification (--insecure) must not disable
the public key pinning check (--pinnedpubkey).
2016-01-18 03:10:10 -05:00
Daniel Schauenberg
1074cca8cd CURLINFO_RESPONSE_CODE.3: add example 2016-01-16 23:05:07 -05:00
Kamil Dudka
be538e0766 ssh: make CURLOPT_SSH_PUBLIC_KEYFILE treat "" as NULL
The CURLOPT_SSH_PUBLIC_KEYFILE option has been documented to handle
empty strings specially since curl-7_25_0-31-g05a443a but the behavior
was unintentionally removed in curl-7_38_0-47-gfa7d04f.

This commit restores the original behavior and clarifies it in the
documentation that NULL and "" have both the same meaning when passed
to CURLOPT_SSH_PUBLIC_KEYFILE.

Bug: http://curl.haxx.se/mail/lib-2016-01/0072.html
2016-01-15 10:34:34 +01:00
Daniel Stenberg
be79d83b00 RELEASE-NOTES: synced with 35083ca60e 2016-01-14 22:09:09 +01:00
Daniel Stenberg
35083ca60e openssl: improved error detection/reporting
... by extracting the LIB + REASON from the OpenSSL error code. OpenSSL
1.1.0+ returned a new func number of another cerfificate fail so this
required a fix and this is the better way to catch this error anyway.
2016-01-14 21:25:30 +01:00
Daniel Stenberg
fdcc4d6daa openssl: for 1.1.0+ they now provide a SSLeay() macro of their own 2016-01-14 16:38:14 +01:00
Daniel Stenberg
133cd19244 CURLOPT_RESOLVE.3: minor language polish 2016-01-13 09:11:12 +01:00
Daniel Stenberg
4bed87f8fa configure: assume IPv6 works when cross-compiled
The configure test uses AC_TRY_RUN to figure out if an ipv6 socket
works, and testing like that doesn't work for cross-compiles. These days
IPv6 support is widespread so a blind guess is probably more likely to
be 'yes' than 'no' now.

Further: anyone who cross-compiles can use configure's --disable-ipv6 to
explicitly disable IPv6 and that also works for cross-compiles.

Made happen after discussions in issue #594
2016-01-12 10:30:54 +01:00
Daniel Stenberg
3ea77f6add TODO: "Try to URL encode given URL"
Closes #514
2016-01-12 00:03:05 +01:00
Daniel Stenberg
13b6d3b7dd ConnectionExists: only do pipelining/multiplexing when asked
When an HTTP/2 upgrade request fails (no protocol switch), it would
previously detect that as still possible to pipeline on (which is
acorrect) and do that when PIPEWAIT was enabled even if pipelining was
not explictily enabled.

It should only pipelined if explicitly asked to.

Closes #584
2016-01-11 23:55:13 +01:00
Mohammad AlSaleh
3d209b5fb0 lib: Prefix URLs with lower-case protocol names/schemes
Before this patch, if a URL does not start with the protocol
name/scheme, effective URLs would be prefixed with upper-case protocol
names/schemes. This behavior might not be expected by library users or
end users.

For example, if `CURLOPT_DEFAULT_PROTOCOL` is set to "https". And the
URL is "hostname/path". The effective URL would be
"HTTPS://hostname/path" instead of "https://hostname/path".

After this patch, effective URLs would be prefixed with a lower-case
protocol name/scheme.

Closes #597

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2016-01-11 23:38:42 +01:00
Alessandro Ghedini
ebfe00c050 scripts: don't generate and install zsh completion when cross-compiling 2016-01-11 23:32:30 +01:00
Alessandro Ghedini
fb7cbf75a5 scripts: fix zsh completion generation
The script should use the just-built curl, not the system one. This fixes
zsh completion generation when no system curl is installed.
2016-01-11 23:32:30 +01:00
Alessandro Ghedini
92a20413ac zsh.pl: fail if no curl is found
Instead of generation a broken completion file.
2016-01-11 23:32:30 +01:00
Michael Kaufmann
5d7c9379ef IDN host names: Remove the port number before converting to ACE
Closes #596
2016-01-11 00:11:28 +01:00
Jay Satiro
036c465e88 runtests: Add mbedTLS to the SSL backends
.. and enable SSLpinning tests for mbedTLS, BoringSSL and LibreSSL.
2016-01-10 02:56:26 -05:00
Thomas Glanzmann
bf93a1217c mbedtls: implement CURLOPT_PINNEDPUBLICKEY 2016-01-10 00:17:26 +01:00
Tatsuhiro Tsujikawa
5da7461a55 url: Fix compile error with --enable-werror 2016-01-09 02:26:23 -05:00
Tatsuhiro Tsujikawa
b019af41e7 http2: Ensure that http2_handle_stream_close is called
Previously, when HTTP/2 is enabled and used, and stream has content
length known, Curl_read was not called when there was no bytes left to
read. Because of this, we could not make sure that
http2_handle_stream_close was called for every stream. Since we use
http2_handle_stream_close to emit trailer fields, they were
effectively ignored. This commit changes the code so that Curl_read is
called even if no bytes left to read, to ensure that
http2_handle_stream_close is called for every stream.

Discussed in https://github.com/bagder/curl/pull/564
2016-01-08 17:16:47 -05:00
Daniel Stenberg
325686ef9e http2: handle the received SETTINGS frame
This regression landed in 5778e6f5 and made libcurl not act on received
settings and instead stayed with its internal defaults.

Bug: http://curl.haxx.se/mail/lib-2016-01/0031.html
Reported-by: Bankde
2016-01-08 23:06:59 +01:00
Daniel Stenberg
c338d8cf9c Revert "multiplex: allow only once HTTP/2 is actually used"
This reverts commit 46cb70e9fa.

Bug: http://curl.haxx.se/mail/lib-2016-01/0031.html
2016-01-08 14:39:54 +01:00
Tatsuhiro Tsujikawa
984d1e9e23 http2: Fix PUSH_PROMISE headers being treated as trailers
Discussed in https://github.com/bagder/curl/pull/564
2016-01-08 03:06:25 -05:00
Michael Kaufmann
d9b4d1ce20 connection reuse: IDN host names fixed
Use the ACE form of IDN hostnames as key in the connection cache.  Add
new tests.

Closes #592
2016-01-08 00:19:46 +01:00
Daniel Stenberg
336e8feec4 tests: mark IPv6 FTP and FTPS tests with the FTP keyword 2016-01-07 14:30:55 +01:00
Jay Satiro
89a1eb7b1c mbedtls: Fix ALPN support
- Fix ALPN reply detection.

- Wrap nghttp2 code in ifdef USE_NGHTTP2.


Prior to this change ALPN and HTTP/2 did not work properly in mbedTLS.
2016-01-07 01:49:31 -05:00
Jay Satiro
973ee6bdd3 http2: Fix client write for trailers on stream close
Check that the trailer buffer exists before attempting a client write
for trailers on stream close.

Refer to comments in https://github.com/bagder/curl/pull/564
2016-01-06 22:10:49 -05:00
Daniel Stenberg
3de2d48d4c COPYING: update general copyright year range 2016-01-07 00:11:16 +01:00
Daniel Stenberg
a2cae9aafd ConnectionExists: add missing newline in infof() call
Mistake from commit a464f33843
2016-01-06 00:54:49 +01:00
Daniel Stenberg
46cb70e9fa multiplex: allow only once HTTP/2 is actually used
To make sure curl doesn't allow multiplexing before a connection is
upgraded to HTTP/2 (like when Upgrade: h2c fails), we must make sure the
connection uses HTTP/2 as well and not only check what's wanted.

Closes #584

Patch-by: c0ff
2016-01-06 00:54:49 +01:00
Jay Satiro
19ca40100b curl_global_init.3: Add Windows-specific info for init via DLL
- Add to both curl_global_init.3 and libcurl.3 the caveat for Windows
that initializing libcurl via a DLL's DllMain or static initializer
could cause a deadlock.

Bug: https://github.com/bagder/curl/issues/586
Reported-by: marc-groundctl@users.noreply.github.com
2016-01-04 17:44:39 -05:00
Daniel Stenberg
b82359643d FAQ: clarify who to mail about ECCN clarifications 2016-01-04 18:59:29 +01:00
Daniel Stenberg
1d15a509dd progressfunc.c: spellfix description 2016-01-04 18:49:10 +01:00
Daniel Stenberg
a3b8a9e036 docs/examples/multi-app.c: fix bad desc formatting 2016-01-04 15:35:16 +01:00
Daniel Stenberg
2e503441ed examples: added descriptions 2016-01-04 15:34:05 +01:00
Daniel Stenberg
e45059214c example/simple.c: add description 2016-01-04 15:12:37 +01:00
Daniel Stenberg
1c9298ff1b getredirect.c: a new example 2016-01-04 15:12:37 +01:00
Marc Hoersken
ddfa0d850b RELEASE-NOTES: add 5e0e81a9c4 2015-12-27 18:18:45 +01:00
Daniel Stenberg
752171f016 RELEASE-NOTES: synced with 2aec4359db 2015-12-26 23:13:32 +01:00
Marc Hoersken
2aec4359db test 1515: add data check 2015-12-26 17:25:59 +01:00
Marc Hoersken
38b055446a test 1515: add MSYS support by passing a relative path
MSYS would otherwise turn a /-style path into a C:\-style path.
2015-12-26 17:25:42 +01:00
Marc Hoersken
4ca246c3a8 test 539: use datacheck mode text for ASCII-mode LISTings
While still using datacheck mode binary for the inline reply data.
2015-12-26 11:01:47 +01:00
Marc Hoersken
a9ebd1bddc runtests.pl: check up to 5 data parts with different text modes
Move the text-mode conversion for reply/replycheck from the verify
section into the load section and add support for 4 more check parts.
2015-12-26 11:01:47 +01:00
Daniel Stenberg
90c2d215d7 CURLOPT_RANGE: for HTTP servers, range support is optional 2015-12-24 23:35:54 +01:00
Marc Hoersken
8fb8e16ea4 tests 1048 and 1050: use datacheck mode text for ASCII-mode LISTings 2015-12-24 14:56:47 +01:00
Marc Hoersken
2eb933e8aa tests 706 and 707: use datacheck mode text for ASCII-mode LISTings 2015-12-24 14:48:36 +01:00
Marc Hoersken
08554dff65 tests 400,403,406: use datacheck mode text for ASCII-mode LISTings 2015-12-24 14:22:26 +01:00
Marc Hoersken
7bf5f6e054 sockfilt.c: fix calculation of sleep timeout on Windows
Not converting to double caused small timeouts to be skipped.
2015-12-23 15:04:02 +01:00
Marc Hoersken
520bd9e49f tests first.c: fix calculation of sleep timeout on Windows
Not converting to double caused small timeouts to be skipped.
2015-12-23 15:03:40 +01:00
Marc Hoersken
24cf20ec68 test 573: add more debug output 2015-12-23 15:02:43 +01:00
Marc Hoersken
7cbe4d8d79 ftplistparser.c: fix handling of file LISTings using Windows EOL
Previously file.txt[CR][LF] would have been returned as file.tx
(without the last t) if filetype is symlink. Now the t is
included and the internal item_length includes the zero byte.

Spotted using test 576 on Windows.
2015-12-23 14:19:36 +01:00
Marc Hoersken
fcabed6cd8 test 16: fix on Linux (and Windows) by using plain ASCII characters
Follow up on b064ff0c35, thanks Daniel.
2015-12-23 13:35:36 +01:00
Marc Hoersken
18c95d4bc0 tftpd server: add Windows support by writing files in binary mode 2015-12-23 13:04:00 +01:00
Marc Hoersken
328771981a tests 252-255: use datacheck mode text for ASCII-mode LISTings 2015-12-23 12:49:40 +01:00
Marc Hoersken
b064ff0c35 test 16: fix on Windows by converting data file from ANSI to UTF-8 2015-12-23 12:41:52 +01:00
Daniel Stenberg
bfe6f1f788 Makefile.inc: s/curl_SOURCES/CURL_FILES
This allows the root Makefile.am to include the Makefile.inc without
causing automake to warn on it (variables named *_SOURCES are
magic). curl_SOURCES is then instead assigned properly in
src/Makefile.am only.

Closes #577
2015-12-23 12:07:50 +01:00
Anders Bakken
a464f33843 ConnectionExists: with *PIPEWAIT, wait for connections
Try harder to prevent libcurl from opening up an additional socket when
CURLOPT_PIPEWAIT is set. Accomplished by letting ongoing TCP and TLS
handshakes complete first before the decision is made.

Closes #575
2015-12-23 10:20:37 +01:00
Anders Bakken
04cb90948e Add .dir-locals and set c-basic-offset to 2.
This makes it easier for emacs users to automatically get the right
2-space indentation when they edit curl source files.

c++-mode is in there as well because Emacs can't easily know if
something is a C or C++ header.

Closes #574
2015-12-23 10:16:14 +01:00
Johannes Schindelin
c208c783f5 configure: detect IPv6 support on Windows
This patch was "nicked" from the MINGW-packages project by Daniel.

9253d0bf58
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-12-20 23:48:25 +01:00
Daniel Stenberg
bd431eef04 configure: allow static builds on mingw
This patch is adopted from the MINGW-packages project. It makes it
possible to build curl both shared and static again.

URL: https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-curl
2015-12-20 23:43:46 +01:00
Marc Hoersken
5e0e81a9c4 test 1326: fix file check since curl is outputting binary data 2015-12-17 16:04:33 +01:00
Marc Hoersken
9e093f0e74 test 1326: fix getting stuck on Windows due to incomplete request
The request needs to be read and send in binary mode in order to use
CRLF instead of LF. Adding --upload-file - causes curl to read stdin
in binary mode.
2015-12-17 15:14:36 +01:00
Daniel Stenberg
58ac23dd16 RELEASE-NOTES: command line option recount 2015-12-17 13:22:14 +01:00
Dan Fandrich
28533d3277 scripts/Makefile: build zsh script even in an out-of-tree build 2015-12-16 22:13:02 +01:00
Marc Hoersken
c3eeb526ae sockfilt.c: added some debug output to select_ws 2015-12-16 15:33:36 +01:00
Marc Hoersken
234abd9013 sockfilt.c: keep lines shorter than 80 chars 2015-12-16 15:33:13 +01:00
Marc Hoersken
f4646b9069 sockfilt.c: do not wait on unreliable file or pipe handle
The previous implementation caused issues on modern MSYS2 runtimes.
2015-12-16 15:32:31 +01:00
Daniel Stenberg
151da51404 cyassl: deal with lack of *get_peer_certificate
The function is only present in wolfssl/cyassl if it was built with
--enable-opensslextra. With these checks added, pinning support is disabled
unless the TLS lib has that function available.

Also fix the mistake in configure that checks for the wrong lib name.

Closes #566
2015-12-16 10:27:18 +01:00
Daniel Stenberg
1ff3a07be9 wolfssl: handle builds without SSLv3 support 2015-12-16 10:06:09 +01:00
Tatsuhiro Tsujikawa
15cb03ad84 http2: Support trailer fields
This commit adds trailer support in HTTP/2.  In HTTP/1.1, chunked
encoding must be used to send trialer fields.  HTTP/2 deprecated any
trandfer-encoding, including chunked.  But trailer fields are now
always available.

Since trailer fields are relatively rare these days (gRPC uses them
extensively though), allocating buffer for trailer fields is done when
we detect that HEADERS frame containing trailer fields is started.  We
use Curl_add_buffer_* functions to buffer all trailers, just like we
do for regular header fields.  And then deliver them when stream is
closed.  We have to be careful here so that all data are delivered to
upper layer before sending trailers to the application.

We can deliver trailer field one by one using NGHTTP2_ERR_PAUSE
mechanism, but current method is far more simple.

Another possibility is use chunked encoding internally for HTTP/2
traffic.  I have not tested it, but it could add another overhead.

Closes #564
2015-12-15 23:47:46 +01:00
Daniel Stenberg
871ad2a0f2 RELEASE-NOTES: synced with 6c2c019654 2015-12-15 23:12:32 +01:00
Jay Satiro
6c2c019654 x509asn1: Fix host altname verification
- In Curl_verifyhost check all altnames in the certificate.

Prior to this change only the first altname was checked. Only the GSKit
SSL backend was affected by this bug.

Bug: http://curl.haxx.se/mail/lib-2015-12/0062.html
Reported-by: John Kohl
2015-12-15 14:07:28 -05:00
Daniel Stenberg
b4a39491ca curl --expect100-timeout: added
This is the new command line option to set the value for the existing
libcurl option CURLOPT_EXPECT_100_TIMEOUT_MS
2015-12-15 13:59:56 +01:00
Daniel Stenberg
afcab2c2b6 cyassl: fix compiler warning on type conversion 2015-12-15 00:36:08 +01:00
Daniel Stenberg
18ecdd0430 curlver: the pending release will become 7.47.0 2015-12-15 00:02:20 +01:00
Anders Bakken
8fbaf6749a setstropt: const-correctness
Closes #565
2015-12-14 23:14:39 +01:00
Daniel Stenberg
63a5a756a8 ROADMAP: implemented HTTP2 for HTTPS-only 2015-12-14 10:13:21 +01:00
Daniel Stenberg
15cf5a98b7 HTTP2.md: spell fix and remove TODO now implemented 2015-12-14 10:10:35 +01:00
Daniel Stenberg
727f775e59 libressl: the latest openssl x509 funcs are not in libressl 2015-12-14 09:49:54 +01:00
Daniel Stenberg
536f5f442e curl: use 2TLS by default
Make this the default for the curl tool (if built with HTTP/2 powers
enabled) unless a specific HTTP version is requested on the command
line.

This should allow more users to get HTTP/2 powers without having to
change anything.
2015-12-13 09:26:43 +01:00
Daniel Stenberg
4bcc532de5 http: add libcurl option to allow HTTP/2 for HTTPS only
... and stick to 1.1 for HTTP. This is in line with what browsers do and
should have very little risk.
2015-12-13 09:24:51 +01:00
Daniel Stenberg
7f683b0ea8 openssl: adapt to openssl >= 1.1.0 X509 opaque structs
Closes #491
2015-12-10 22:45:38 +01:00
Daniel Stenberg
dd1b44c612 openssl: avoid BIO_reset() warnings since it returns a value 2015-12-10 17:31:37 +01:00
Daniel Stenberg
fa9332d3ca openssl: adapt to 1.1.0+ name changes 2015-12-10 17:31:37 +01:00
Daniel Stenberg
3b51652328 scripts/makefile: add standard header 2015-12-09 00:34:39 +01:00
Daniel Stenberg
f08fea7169 scripts/Makefile: fix GNUism and survive no perl
Closes #555

Reported-by: Thomas Klausner
2015-12-09 00:34:12 +01:00
Daniel Stenberg
034317d2af fix b6d5cb40d7 2015-12-09 00:27:04 +01:00
Tatsuhiro Tsujikawa
12f6bf5e58 http2: Fix hanging paused stream
When NGHTTP2_ERR_PAUSE is returned from data_source_read_callback, we
might not process DATA frame fully.  Calling nghttp2_session_mem_recv()
again will continue to process DATA frame, but if there is no incoming
frames, then we have to call it again with 0-length data.  Without this,
on_stream_close callback will not be called, and stream could be hanged.

Bug: http://curl.haxx.se/mail/lib-2015-11/0103.html
Reported-by: Francisco Moraes
2015-12-08 18:40:32 +01:00
Christian Stewart
b6d5cb40d7 build: fix compilation error with CURL_DISABLE_VERBOSE_STRINGS
With curl disable verbose strings in http.c the compilation fails due to
the data variable being undefined later on in the function.

Closes #558
2015-12-08 18:12:16 +01:00
Gisle Vanem
6c2a10e963 config-win32: Fix warning HAVE_WINSOCK2_H undefined 2015-12-07 19:07:51 -05:00
Gisle Vanem
df40b20e44 openssl: BoringSSL doesn't have CONF_modules_free 2015-12-07 18:47:26 -05:00
Gisle Vanem
e1b6b2219d lwip: Fix compatibility issues with later versions
The name of the header guard in lwIP's <lwip/opt.h> has changed from
'__LWIP_OPT_H__' to 'LWIP_HDR_OPT_H' (bug #35874 in May 2015).

Other fixes:

- In curl_setup.h, the problem with an old PSDK doesn't apply if lwIP is
used.

- In memdebug.h, the 'socket' should be undefined first due to lwIP's
lwip_socket() macro.

- In curl_addrinfo.c lwIP's getaddrinfo() + freeaddrinfo() macros need
special handling because they were undef'ed in memdebug.h.

- In select.c we can't use preprocessor conditionals inside select if
MSVC and select is a macro, as it is with lwIP.

http://curl.haxx.se/mail/lib-2015-12/0023.html
http://curl.haxx.se/mail/lib-2015-12/0024.html
2015-12-07 14:27:55 -05:00
Patrick Monnerat
ec26399bf9 os400: define CURL_VERSION_PSL in ILE/RPG binding 2015-12-07 10:09:33 +01:00
Gisle Vanem
b1f9424fa7 version: Add flag CURL_VERSION_PSL for libpsl 2015-12-07 02:59:54 -05:00
Jay Satiro
738b0ba09e formdata: Check if length is too large for memory
- If the size of the length type (curl_off_t) is greater than the size
of the size_t type then check before allocating memory to make sure the
value of length will fit in a size_t without overflow. If it doesn't
then return CURLE_BAD_FUNCTION_ARGUMENT.

Bug: https://github.com/bagder/curl/issues/425#issuecomment-154518679
Reported-by: Steve Holme
2015-12-07 02:43:24 -05:00
Steve Holme
a62000ecc9 tests: Corrected copy and pasted comments from commit e643c5c908 2015-12-03 23:31:24 +00:00
Daniel Stenberg
f606435419 curl: remove keepalive #ifdef checks done on libcurl's behalf
They didn't match the ifdef logic used within libcurl anyway so they
could indeed warn for the wrong case - plus the tool cannot know how the
lib actually performs at that level.
2015-12-03 09:55:00 +01:00
Steve Holme
5eba895b4c test947: Corrected typo in test name 2015-12-02 23:45:29 +00:00
Steve Holme
e643c5c908 tests: Disable the OAUTHBEARER tests when using a non-default port number
Tests 842, 843, 844, 845, 887, 888, 889, 890, 946, 947, 948 and 949 fail
if a custom port number is specified via the -b option of runtests.pl.

Suggested by: Kamil Dudka
Bug: http://curl.haxx.se/mail/lib-2015-12/0003.html
2015-12-02 23:10:02 +00:00
Daniel Stenberg
e7d8d8e257 bump: towards next release
for all we know now, it might be called 7.46.1
2015-12-02 23:24:47 +01:00
Daniel Stenberg
e2ae32ff5f RELEASE-NOTES: updated contributor count for 7.46.0 2015-12-01 23:10:16 +01:00
Daniel Stenberg
6623a485d3 THANKS: new contributors from the 7.46.0 release 2015-12-01 22:53:24 +01:00
Daniel Stenberg
940c2f51aa THANKS-filter: single Tim Rühsen spelling 2015-12-01 22:51:50 +01:00
Daniel Stenberg
a47137c4a5 docs/examples: gitignore some more built examples 2015-12-01 09:09:04 +01:00
Daniel Stenberg
5648f0a32c RELEASE-NOTES; this bug was never released 2015-11-30 08:22:32 +01:00
Daniel Stenberg
2fddc4e3e1 RELEASE-NOTES: synced with e55f15454e 2015-11-30 08:03:28 +01:00
Flavio Medeiros
e55f15454e Curl_read_plain: clean up ifdefs that break statements
Closes #546
2015-11-30 00:28:28 +01:00
Daniel Stenberg
fe7c39d353 http2: convert some verbose output into debug-only output 2015-11-30 00:12:46 +01:00
Daniel Stenberg
8f281fb76d http2 push: add missing inits of new stream
- set the correct stream_id for pushed streams
- init maxdownload and size properly
2015-11-30 00:11:42 +01:00
Daniel Stenberg
8cbd80686e http2 push: set weight for new stream
give the new stream the old one's stream_weight internally to avoid
sending a PRIORITY frame unless asked for it
2015-11-30 00:10:35 +01:00
Daniel Stenberg
a14fa8f8ff curl_setup.h: undef freeaddrinfo in c-ares block to fix build
Fixes warnings 78c25c854a added.
2015-11-28 17:26:38 +01:00
Daniel Stenberg
81ae6d01fa nonblock: fix setting non-blocking mode for Amiga
IoctlSocket() apparently wants a pointer to a long, passed as a char *
in its third parameter. This bug was introduced already back in commit
c5fdeef41d from October 1 2001!

Bug: http://curl.haxx.se/mail/lib-2015-11/0088.html
Reported-by: Norbert Kett
2015-11-27 23:29:30 +01:00
Daniel Stenberg
19a8afb3c0 zsh install: fix DESTDIR support
Reported-by: Mohammad AlSaleh
2015-11-27 23:24:07 +01:00
Dan Fandrich
78c25c854a lib: Only define curl_dofreeaddrinfo if struct addrinfo is available 2015-11-27 10:51:22 +01:00
Steve Holme
db05d7a731 tool_paramhlp: Fixed display of URL index in password prompt for --next
Commit f3bae6ed73 added the URL index to the password prompt when using
--next. Unfortunately, because the size_t specifier (%zu) is not
supported by all sprintf() implementations we use the curl_off_t format
specifier instead. The display of an incorrect value arises on platforms
where size_t and curl_off_t are of a different size.
2015-11-27 06:59:02 +00:00
Daniel Stenberg
cd2b73b3ed timecond: do not add if-modified-since without timecondition
The RTSP code path didn't skip adding the if-modified-since for certain
RTSP code paths, even if CURLOPT_TIMECONDITION was set to
CURL_TIMECOND_NONE.

Also, an unknown non-zero CURLOPT_TIMECONDITION value no longer equals
CURL_TIMECOND_IFMODSINCE.

Bug: http://stackoverflow.com/questions/33903982/curl-timecond-none-doesnt-work-how-to-remove-if-modified-since-header
2015-11-25 11:38:10 +01:00
Daniel Stenberg
5b96b5e79e RELEASE-NOTES: synced with 99d17a5e2b 2015-11-25 11:29:00 +01:00
Daniel Stenberg
99d17a5e2b examples/README: cut out the incomplete list
... and add a generic explanation for them instead. Each example file
should contain its own description these days.
2015-11-25 10:49:22 +01:00
Daniel Stenberg
facf2925c7 test1513: make sure the callback is only called once 2015-11-24 23:33:37 +01:00
Daniel Shahaf
be0d4141af build: Install zsh completion
Fixes #534
Closes #537
2015-11-24 22:22:01 +01:00
Daniel Stenberg
40c349ada9 done: make sure the final progress update is made
It would previously be skipped if an existing error was returned, but
would lead to a previous value being left there and later used.
CURLINFO_TOTAL_TIME for example.

Still it avoids that final progress update if we reached DONE as the
result of a callback abort to avoid another callback to be called after
an abort-by-callback.

Reported-by: Lukas Ruzicka

Closes #538
2015-11-24 20:49:04 +01:00
Daniel Stenberg
bb9ec5ebb2 curl: expanded the -XHEAD warning text
... to also mention the specific options used.
2015-11-24 10:11:06 +01:00
Daniel Stenberg
c341311a0e Revert "cleanup: general removal of TODO (and similar) comments"
This reverts commit 64e959ffe3.

Feedback-by: Dan Fandrich
URL: http://curl.haxx.se/mail/lib-2015-11/0062.html
2015-11-24 09:36:45 +01:00
Daniel Stenberg
fc5d783589 CURLOPT_HEADERFUNCTION.3: fix typo
Refer to _HEADERDATA not _WRITEDATA.

Reported-by: Michał Piechowski
2015-11-23 16:11:57 +01:00
Daniel Stenberg
98acebb526 TODO: TCP Fast Open 2015-11-23 10:58:12 +01:00
Steve Holme
06b288a72d examples: Added website parse-able descriptions to the e-mail examples 2015-11-22 11:55:10 +00:00
Steve Holme
d55f9071fb TODO: Added another 'multi-interface' idea 2015-11-21 17:59:14 +00:00
Steve Holme
b7f3f1b68f smb.c: Fixed compilation warnings
smb.c:134:3: warning: conversion to 'short unsigned int' from 'int' may
             alter its value
smb.c:146:42: warning: conversion to 'unsigned int' from 'long long
              unsigned int' may alter its value
smb.c:146:65: warning: conversion to 'unsigned int' from 'long long
              unsigned int' may alter its value
2015-11-21 11:41:20 +00:00
Steve Holme
c2f1730e17 schannel: Corrected copy/paste error in commit 8d17117683 2015-11-21 02:54:44 +00:00
Steve Holme
8d17117683 schannel: Use GetVersionEx() when VerifyVersionInfo() isn't available
Regression from commit 7a8e861a5 as highlighted in the msys autobuilds.
2015-11-21 02:43:17 +00:00
Steve Holme
c90e348579 examples: Fixed compilation warnings
pop3-multi.c:96:5: warning: implicit declaration of function 'memset'
imap-multi.c:96:5: warning: implicit declaration of function 'memset'
http2-download.c:226:5: warning: implicit declaration of function 'memset'
http2-upload.c:290:5: warning: implicit declaration of function 'memset'
http2-upload.c:290:5: warning: implicit declaration of function 'memset'
2015-11-21 01:47:02 +00:00
Steve Holme
f024ece8c7 Makefile.inc: Fixed test run error
test845 not present in tests/data/Makefile.inc
2015-11-21 00:04:57 +00:00
Daniel Stenberg
ad6f6e17d3 TODO: remove duplicated title 2015-11-20 09:37:11 +01:00
Daniel Stenberg
0ddc59be0a TODO: added two more libcurl ideas
Moved some ideas from "next major" to just ordinary ideas since we can
always add new things while keeping the old without doing a "next
major".
2015-11-20 08:39:59 +01:00
Steve Holme
bbb34b6f15 tests: Re-enabled tests 889 and 890 following POP3 fix 2015-11-20 07:04:19 +00:00
Steve Holme
41efdadf09 pop3: Differentiate between success and continuation responses 2015-11-20 07:01:01 +00:00
Steve Holme
6af80afe49 pop3: Added clarity on some server response codes 2015-11-20 06:41:53 +00:00
Daniel Shahaf
80562083da build: Fix theoretical infinite loops
Add error-checking to 'cd' in a few cases where omitting the checks
might result in an infinite loop.

Closes #535
2015-11-20 00:25:42 +01:00
235 changed files with 3130 additions and 2867 deletions

10
.dir-locals.el Normal file
View 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
View File

@@ -49,3 +49,4 @@ missing
mkinstalldirs
tags
test-driver
scripts/_curl

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

@@ -73,3 +73,7 @@ smtp-vrfy
url2file
usercertinmem
xmlstream
http2-download
http2-serverpush
http2-upload
imap-lsub

View File

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

View File

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

View 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;
}

View File

@@ -25,6 +25,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* somewhat unix-specific */
#include <sys/time.h>

View File

@@ -25,6 +25,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* somewhat unix-specific */
#include <sys/time.h>

View File

@@ -25,6 +25,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>

View File

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

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

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

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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");

View File

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

View File

@@ -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). */

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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:
*

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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>

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* 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:

View File

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

View File

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

View File

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

View File

@@ -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.
*/

View File

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

View File

@@ -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'`; \

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * 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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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");

View File

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

View File

@@ -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);
}

View File

@@ -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));
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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