1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-05 00:55:04 -05:00
Commit Graph

21646 Commits

Author SHA1 Message Date
Daniel Stenberg
452203341d pause: handle mixed types of data when paused
When receiving chunked encoded data with trailers, and the write
callback returns PAUSE, there might be both body and header to store to
resend on unpause. Previously libcurl returned error for that case.

Added test case 1540 to verify.

Reported-by: Stephen Toub
Fixes #1354
Closes #1357
2017-03-28 13:27:49 +02:00
Isaac Boukris
7975d10cf8 http: Fix proxy connection reuse with basic-auth
When using basic-auth, connections and proxy connections
can be re-used with different Authorization headers since
it does not authenticate the connection (like NTLM does).

For instance, the below command should re-use the proxy
connection, but it currently doesn't:
curl -v -U alice:a -x http://localhost:8181 http://localhost/
  --next -U bob:b -x http://localhost:8181 http://localhost/

This is a regression since refactoring of ConnectionExists()
as part of: cb4e2be7c6

Fix the above by removing the username and password compare
when re-using proxy connection at proxy_info_matches().

However, this fix brings back another bug would make curl
to re-print the old proxy-authorization header of previous
proxy basic-auth connection because it wasn't cleared.

For instance, in the below command the second request should
fail if the proxy requires authentication, but would succeed
after the above fix (and before aforementioned commit):
curl -v -U alice:a -x http://localhost:8181 http://localhost/
  --next -x http://localhost:8181 http://localhost/

Fix this by clearing conn->allocptr.proxyuserpwd after use
unconditionally, same as we do for conn->allocptr.userpwd.

Also fix test 540 to not expect digest auth header to be
resent when connection is reused.

Signed-off-by: Isaac Boukris <iboukris@gmail.com>

Closes https://github.com/curl/curl/pull/1350
2017-03-28 03:54:43 -04:00
Jay Satiro
b04e4ebdd8 openssl: exclude DSA code when OPENSSL_NO_DSA is defined
- Fix compile errors that occur in openssl.c when OpenSSL lib was
  built without DSA support.

Bug: https://github.com/curl/curl/issues/1361
Reported-by: neheb@users.noreply.github.com
2017-03-28 03:54:31 -04:00
Jay Satiro
041ded0459 examples/fopen: checksrc compliance 2017-03-28 02:55:14 -04:00
Marcel Raad
23d48c35cb
schannel: fix variable shadowing warning
No need to redeclare the variable.
2017-03-28 01:16:12 +02:00
Marcel Raad
068cd1ad4c
multi: fix MinGW-w64 compiler warnings
error: conversion to 'long int' from 'time_t {aka long long int}' may alter
its value [-Werror=conversion]
2017-03-27 22:50:59 +02:00
Marcel Raad
2c3af5b4c0
.gitattributes: turn off CRLF for *.am
If Makefile.am uses CRLF, buildconf in a Windows checkout fails with:
".ibtoolize: error: AC_CONFIG_MACRO_DIRS([m4]) conflicts with
ACLOCAL_AMFLAGS=-I m4"
2017-03-27 19:56:10 +02:00
klemens
f7df67cff0 spelling fixes
Closes #1356
2017-03-26 23:56:23 +02:00
Daniel Stenberg
8e65877870 curl: check for end of input in writeout backslash handling
Reported-by: Brian Carpenter

Added test 1442 to verify
2017-03-25 23:48:57 +01:00
Marcel Raad
d14563454a
tests/README: make "Run" section foolproof
curl must be built before building the tests.

Closes https://github.com/curl/curl/pull/1352
2017-03-24 08:20:43 +01:00
Daniel Stenberg
68aac9a831 openssl: fix comparison between signed and unsigned integer expressions 2017-03-23 23:04:38 +01:00
Edward Kimmel
99d708a016
asiohiper: make sure socket is open in event_cb
Send curl_socket_t to event_cb and make sure it hasn't been closed yet.

Closes https://github.com/curl/curl/pull/1318
2017-03-23 22:58:29 +01:00
Dan Fandrich
f99fcb0fee openssl: made the error table static const 2017-03-23 22:50:58 +01:00
Jay Satiro
b999d35c71 openssl: fall back on SSL_ERROR_* string when no error detail
- If SSL_get_error is called but no extended error detail is available
  then show that SSL_ERROR_* as a string.

Prior to this change there was some inconsistency in that case: the
SSL_ERROR_* code may or may not have been shown, or may have been shown
as unknown even if it was known.

Ref: https://github.com/curl/curl/issues/1300

Closes https://github.com/curl/curl/pull/1348
2017-03-23 16:48:29 -04:00
Dan Fandrich
ae22034d0d mkhelp: disable compression if the perl gzip module is unavailable
This is nowadays included with the base perl distribution, but wasn't
prior to about perl 5.14
2017-03-23 21:11:41 +01:00
Anders Roxell
f355a92cd5 tests/README: mention nroff for --manual tests
Signed-off-by: Anders Roxell <anders.roxell@gmail.com>

Closes #1342
2017-03-23 10:52:10 +01:00
Daniel Stenberg
e369303cdc CURLINFO_PRIMARY_IP.3: add example 2017-03-22 11:28:33 +01:00
Daniel Stenberg
5091e18e89 travis: run tests-nonflaky instead of tests-full 2017-03-22 10:55:10 +01:00
Daniel Stenberg
207f588987 make: introduce 'test-nonflaky' target
Running this in the root build dir will invoke the test suite to only
run tests not marked as 'flaky'.
2017-03-22 10:48:20 +01:00
Daniel Stenberg
96d6942b2d test2033: flaky 2017-03-22 08:55:11 +01:00
Ales Mlakar
a360906de6 mbedtls: add support for CURLOPT_SSL_CTX_FUNCTION
Ref: https://curl.haxx.se/mail/lib-2017-02/0097.html

Closes https://github.com/curl/curl/pull/1272
2017-03-21 23:51:44 -04:00
Peter Wu
898b012a9b cmake: add support for building HTML and PDF docs
Note that for some reason there is this warning (that also exists with
autotools, added since curl-7_15_1-94-ga718cb05f):

    docs/libcurl/curl_multi_socket_all.3:1: can't open `man3/curl_multi_socket.3': No such file or directory

Additionally, adjust the roffit --mandir option to support creating
links when doing out-of-tree builds.

Ref: https://github.com/curl/curl/pull/1288
2017-03-21 14:49:53 +01:00
Peter Wu
84a226a30b cmake: build manual pages (including curl.1)
Also make Perl mandatory to allow building the docs.

While CMakeLists.txt could probably read the list of manual pages from
Makefile.am, actually putting those in CMakeLists.txt is cleaner so that
is what is done here.

Fixes #1230
Ref: https://github.com/curl/curl/pull/1288
2017-03-21 14:49:53 +01:00
Peter Wu
6f6e9193df docs: split file lists into Makefile.inc
For easier sharing with CMake. The contents were reformatted to use
two-space indent and expanded tabs (matching lib/Makefile.common).

Ref: https://github.com/curl/curl/pull/1288
2017-03-21 14:49:53 +01:00
Daniel Stenberg
26baf39f3d examples: comment typos in http2 examples 2017-03-21 12:55:46 +01:00
Daniel Stenberg
131e432bd5 RELEASE-NOTES: typo 2017-03-21 12:39:18 +01:00
Daniel Stenberg
b3b9c627b4 RELEASE-NOTES: synced with 6e0f26c8a8 2017-03-21 12:37:11 +01:00
Daniel Stenberg
6e0f26c8a8 multi: fix streamclose() crash in debug mode
The code would refer to the wrong data pointer. Only debug builds do
this - for verbosity.

Reported-by: zelinchen@users.noreply.github.com
Fixes #1329
2017-03-21 10:09:11 +01:00
Daniel Stenberg
0005d00766 CONTRIBUTE: mention referring to github issues in commit msgs 2017-03-21 00:41:56 +01:00
Dan Fandrich
de2b31aa5a runtests.pl: fixed display of the Gopher IPv6 port number 2017-03-20 23:37:57 +01:00
Dan Fandrich
1bca868f60 tests: fixed the documented test server port numbers 2017-03-20 23:37:41 +01:00
Dan Fandrich
718709c674 test714/5: added HTTP as a required feature
These tests use an HTTP proxy so require that curl be built with HTTP
support.
2017-03-20 22:24:32 +01:00
Dan Fandrich
25d43d19d5 tests: strip more options from non-HTTP --libcurl tests
The CURLOPT_USERAGENT and CURLOPT_MAXREDIRS options are only set if HTTP
support is available, so ignore them in tests where HTTP is not
guaranteed.
2017-03-20 21:41:17 +01:00
Palo Markovic
9873431c6f darwinssl: fix typo in variable name
Broken a week ago in 6448f98.

Closes https://github.com/curl/curl/pull/1337
2017-03-18 12:52:37 -04:00
Jay Satiro
98afec033e tool_operate: Fix showing HTTPS-Proxy options on CURLE_SSL_CACERT
- Show the HTTPS-proxy options on CURLE_SSL_CACERT if libcurl was built
  with HTTPS-proxy support.

Prior to this change those options were shown only if an HTTPS-proxy was
specified by --proxy, but that did not take into account environment
variables such as http_proxy, https_proxy, etc. Follow-up to e1187c4.

Bug: https://github.com/curl/curl/issues/1331
Reported-by: Nehal J Wani
2017-03-16 18:23:31 -04:00
Jay Satiro
f7b3914c55 CURLINFO_LOCAL_PORT.3: fix typo 2017-03-16 18:18:49 -04:00
Daniel Stenberg
49f7b13536 CURLINFO_LOCAL_PORT.3: added example 2017-03-16 23:05:22 +01:00
Daniel Stenberg
c5357b7b99 SSLCERTS.md: mention HTTPS proxies and their separate options 2017-03-16 23:00:24 +01:00
Daniel Stenberg
280e8c6e37 BINDINGS: a Delphi binding 2017-03-15 13:47:53 +01:00
Daniel Stenberg
a2eb08607c KNOWN_BUGS: remove libidn related issue
... as we no longer use libidn
2017-03-14 21:13:10 +01:00
Dan Fandrich
3627769d14 build: removed redundant DEPENDENCIES from makefiles 2017-03-14 12:13:03 +01:00
Sylvestre Ledru
66de563482 Improve code readbility
... by removing the else branch after a return, break or continue.

Closes #1310
2017-03-13 23:11:45 +01:00
Anatol Belski
db87bcfcf2 winbuild: add basic support for OpenSSL 1.1.x
- Auto-detect OpenSSL 1.1 libs

Closes https://github.com/curl/curl/pull/1322
2017-03-13 16:05:33 -04:00
Daniel Stenberg
bfb2a0ad77 RELEASE-NOTES: synced with c25e0761d0 2017-03-13 15:55:53 +01:00
Daniel Stenberg
c25e0761d0 make: regenerate docs/curl.1 by runinng make in docs
... previously, docs/ was only a dist subdir, now also a build subdir.

Reported-by: Dan Fandrich
Bug: https://curl.haxx.se/mail/lib-2017-03/0017.html
2017-03-13 08:01:27 +01:00
Dan Fandrich
db900ab732 test1440/1: depend on well-defined file: behaviour
Depend on the known behaviour of URLs for nonexistent files rather than
the undefined behaviour of URLs for directories (which fails on Windows).
The test isn't about file: URLs at all, so the URL used doesn't really
matter.
2017-03-12 23:27:00 +01:00
Dan Fandrich
3863de57f2 tests: clear the SSL_CERT_FILE variable on --libcurl tests
Otherwise, the contents will end up in the output and fail the
verification.
2017-03-12 22:33:56 +01:00
Dan Fandrich
75398731e4 test1287: added verbose logs keyword 2017-03-12 20:32:46 +01:00
Dan Fandrich
1890d59905 tool_writeout: fixed a buffer read overrun on --write-out
If a % ended the statement, the string's trailing NUL would be skipped
and memory past the end of the buffer would be accessed and potentially
displayed as part of the --write-out output. Added tests 1440 and 1441
to check for this kind of condition.

Reported-by: Brian Carpenter
2017-03-12 08:28:31 +01:00
Desmond O. Chang
d2bcf1e3e2 url: add option CURLOPT_SUPPRESS_CONNECT_HEADERS
- Add new option CURLOPT_SUPPRESS_CONNECT_HEADERS to allow suppressing
  proxy CONNECT response headers from the user callback functions
  CURLOPT_HEADERFUNCTION and CURLOPT_WRITEFUNCTION.

- Add new tool option --suppress-connect-headers to expose
  CURLOPT_SUPPRESS_CONNECT_HEADERS and allow suppressing proxy CONNECT
  response headers from --dump-header and --include.

Assisted-by: Jay Satiro
Assisted-by: CarloCannas@users.noreply.github.com
Closes https://github.com/curl/curl/pull/783
2017-03-12 01:32:33 -05:00