aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-04-25curl: set a 100K buffer size by defaultDaniel Stenberg
Test command 'time curl http://localhost/80GB -so /dev/null' on a Debian Linux. Before (middle performing run out 9): real 0m28.078s user 0m11.240s sys 0m12.876s After (middle performing run out 9) real 0m26.356s (93.9%) user 0m5.324s (47.4%) sys 0m8.368s (65.0%) Also, doing SFTP over a 200 millsecond latency link is now about 6 times faster. Closes #1446
2017-04-25transfer: remove 'uploadbuf' pointer and cleanup readwrite_upload()Daniel Stenberg
The data->req.uploadbuf struct member served no good purpose, instead we use ->state.uploadbuffer directly. It makes it clearer in the code which buffer that's being used. Removed the 'SingleRequest *' argument from the readwrite_upload() proto as it can be derived from the Curl_easy struct. Also made the code in the readwrite_upload() function use the 'k->' shortcut to all references to struct fields in 'data->req', which previously was made with a mix of both.
2017-04-25configure: stop prepending to LDFLAGS, CPPFLAGSJay Satiro
- Change prepends to appends because user's LDFLAGS and CPPFLAGS should always come first so they're searched before ours. Bug: https://github.com/curl/curl/issues/1420 Reported-by: Helmut K. C. Tessarek
2017-04-25if2ip: fix -Wcast-align warningMarcel Raad
Follow-up to 119037325de02579f5c58256ca2ed2a0aa592c86, which fixed the warning in the HAVE_GETIFADDRS block, but not in the HAVE_IOCTL_SIOCGIFADDR block.
2017-04-24Makefile: avoid use of GNU-specific form of $<Dan Fandrich
$< is only allowed in implicit rules in some non-GNU makes (e.g. BSD, AIX) so avoid use elsewhere by referencing the dependent curl.1 file directly instead. This is somewhat tricky because the file is supplied in the packaged tar ball (but not in git) but must still be able to be rebuilt when its dependencies change. The right thing must happen in both tar ball and git source trees, as well as in both in-tree and out-of-tree builds.
2017-04-24nss: adapt to the new Curl_llist APIKamil Dudka
This commit fixes compilation failure caused by cbae73e1dd95946597ea74ccb580c30f78e3fa73.
2017-04-24curl-compilers.m4: accept -Og and -Ofast GCC flagsMarcel Raad
-Og, introduced in GCC 4.8, optimizes for debugging experience. -Ofast, introduced in GCC 4.7, builds on -O3 and enables further optimizations breaking strict standards compliance. When specified in CFLAGS, these were always overridden by -O0 or -O2. Fix this by adding them to flags_opt_all. Ref: https://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html Ref: https://github.com/curl/curl/pull/1404#issuecomment-296401570 Closes https://github.com/curl/curl/pull/1440
2017-04-24RELEASE-NOTES: synced with c68fed875Daniel Stenberg
2017-04-24configure: fix the -ldl check for openssl, add -lpthread checkDaniel Stenberg
The check for if -ldl is needed to build with (a statically built) openssl was broken. This repairs the check, and adds a check for -lpthread as well since OpenSSL 1.1.0+ does in fact require -lpthread so only adding -ldl for a static openssl build is no longer enough. Reported-by: Jay Satiro Ref: #1426 Closes #1427
2017-04-24llist: fix a comment after cbae73e1dd9Daniel Stenberg
Pointed-it-by: Kevin Ji URL: https://github.com/curl/curl/commit/cbae73e1dd95946597ea74ccb580c30f78e3fa73#commitcomment-21872622
2017-04-22schannel: Don't treat encrypted partial record as pending dataJay Satiro
- Track when the cached encrypted data contains only a partial record that can't be decrypted without more data (SEC_E_INCOMPLETE_MESSAGE). - Change Curl_schannel_data_pending to return false in such a case. Other SSL libraries have pending data functions that behave similarly. Ref: https://github.com/curl/curl/pull/1387 Closes https://github.com/curl/curl/pull/1392
2017-04-22multi: clarify condition in curl_multi_waitAlan Jenkins
`if(nfds || extra_nfds) {` is followed by `malloc(nfds * ...)`. If `extra_fs` could be non-zero when `nfds` was zero, then we have `malloc(0)` which is allowed to return `NULL`. But, malloc returning NULL can be confusing. In this code, the next line would treat the NULL as an allocation failure. It turns out, if `nfds` is zero then `extra_nfds` must also be zero. The final value of `nfds` includes `extra_nfds`. So the test for `extra_nfds` is redundant. It can only confuse the reader. Closes #1439
2017-04-22lib: fix maybe-uninitialized warningsMarcel Raad
With -Og, GCC complains: easy.c:628:7: error: ‘mcode’ may be used uninitialized in this function [-Werror=maybe-uninitialized] ../lib/strcase.h:35:29: error: ‘tok_buf’ may be used uninitialized in this function [-Werror=maybe-uninitialized] vauth/digest.c:208:9: note: ‘tok_buf’ was declared here ../lib/strcase.h:35:29: error: ‘tok_buf’ may be used uninitialized in this function [-Werror=maybe-uninitialized] vauth/digest.c:566:15: note: ‘tok_buf’ was declared here Fix this by initializing the variables.
2017-04-22gnutls: removed some code when --disable-verbose is configuredDan Fandrich
This reduces the binary size and fixes a compile warning.
2017-04-22llist: no longer uses mallocDaniel Stenberg
The 'list element' struct now has to be within the data that is being added to the list. Removes 16.6% (tiny) mallocs from a simple HTTP transfer. (96 => 80) Also removed return codes since the llist functions can't fail now. Test 1300 updated accordingly. Closes #1435
2017-04-21typecheck-gcc: handle function pointers properlyMarcel Raad
All the callbacks passed to curl_easy_setopt are defined as function pointers. The possibility to pass both functions and function pointers was handled for the callbacks that typecheck-gcc.h defined as compatible, but not for the public callback types themselves. This makes all compatible callback types defined in typecheck-gcc.h function pointers too and checks all functions uniformly with _curl_callback_compatible, which handles both functions and function pointers. A symptom of the problem was a warning in tool_operate.c with --disable-libcurl-option and without --enable-debug as that file passes the callback functions to curl_easy_setopt directly. Fixes https://github.com/curl/curl/issues/1403 Closes https://github.com/curl/curl/pull/1404
2017-04-21mbedtls: enable NTLM (& SMB) even if MD4 support is unavailableDan Fandrich
In that case, use libcurl's internal MD4 routine. This fixes tests 1013 and 1014 which were failing due to configure assuming NTLM and SMB were always available whenever mbed TLS was in use (which is now true).
2017-04-21tests: remove the html and PDF versions from the tarballDaniel Stenberg
2017-04-20openssl: fix memory leak in servercertDaniel Stenberg
... when failing to get the server certificate.
2017-04-20Revert "src/Makefile.am: avoid explicit $<"Daniel Stenberg
This reverts commit 5b4cbcf11d5100ff793a8e9edbaa6fe1fc7495f5. Since it broke out-of-tree builds from tarballs. See discussion in #1432
2017-04-19bump: start working on next releaseDaniel Stenberg
2017-04-19src/Makefile.am: avoid explicit $<Daniel Stenberg
... since apparently "BSD make" doesn't support it. Reported-by: Thomas Klausner Fixes #1432
2017-04-19THANKS: add contributors from 7.54.0 release notesDaniel Stenberg
2017-04-19RELEASE-NOTES: curl 7.54.0Daniel Stenberg
2017-04-18nss: fix MinGW compiler warningsMarcel Raad
This fixes 3 warnings issued by MinGW: 1. PR_ImportTCPSocket actually has a paramter of type PROsfd instead of PRInt32, which is 64 bits on Windows. Fixed this by including the corresponding header file instead of redeclaring the function, which is supported even though it is in the private include folder. [1] 2. In 64-bit mode, size_t is 64 bits while CK_ULONG is 32 bits, so an explicit narrowing cast is needed. 3. Curl_timeleft returns time_t instead of long since commit 21aa32d30dbf319f2d336e0cb68d3a3235869fbb. [1] https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_ImportTCPSocket Closes https://github.com/curl/curl/pull/1393
2017-04-18TLS: Fix switching off SSL session id when client cert is usedJay Satiro
Move the sessionid flag to ssl_primary_config so that ssl and proxy_ssl will each have their own sessionid flag. Regression since HTTPS-Proxy support was added in cb4e2be. Prior to that this issue had been fixed in 247d890, CVE-2016-5419. Bug: https://github.com/curl/curl/issues/1341 Reported-by: lijian996@users.noreply.github.com The new incarnation of this bug is called CVE-2017-7468 and is documented here: https://curl.haxx.se/docs/adv_20170419.html
2017-04-17openssl: don't try to print nonexistant peer private keysDavid Benjamin
X.509 certificates carry public keys, not private keys. Fields corresponding to the private half of the key will always be NULL. Closes #1425
2017-04-17openssl: fix thread-safety bugs in error-handlingDavid Benjamin
ERR_error_string with NULL parameter is not thread-safe. The library writes the string into some static buffer. Two threads doing this at once may clobber each other and run into problems. Switch to ERR_error_string_n which avoids this problem and is explicitly bounds-checked. Also clean up some remnants of OpenSSL 0.9.5 around here. A number of comments (fixed buffer size, explaining that ERR_error_string_n was added in a particular version) date to when ossl_strerror tried to support pre-ERR_error_string_n OpenSSLs. Closes #1424
2017-04-17openssl: make SSL_ERROR_to_str more future-proofDavid Benjamin
Rather than making assumptions about the values, use a switch-case. Closes #1424
2017-04-17code: fix typos and style in commentsDaniel Gustafsson
A few random typos, and minor whitespace cleanups, found in comments while reading code. Closes #1423
2017-04-17extern-scan.pl: strip trailing CRMarcel Raad
This makes test 1135 pass with CRLF checkouts. Ref: https://github.com/curl/curl/pull/1344#issuecomment-289243166 Closes https://github.com/curl/curl/pull/1422
2017-04-17configure.ac: ignore CR after version numbersMarcel Raad
Ignore everything after the version numbers in LIBCURL_VERSION and LIBCURL_VERSION_NUM to ged rid of the extra CR character. This makes tests 1022 and 1023 pass on Linux with a CRLF checkout. Ref: https://github.com/curl/curl/pull/1344#issuecomment-289243166 Closes https://github.com/curl/curl/pull/1422
2017-04-17.gitattributes: force shell scripts to LFMarcel Raad
Bash on Linux errors out on CR characters. This makes tests 1221 and 1222 pass on Linux with a CRLF checkout. Ref: https://github.com/curl/curl/pull/1344#issuecomment-289243166 Closes https://github.com/curl/curl/pull/1422
2017-04-16unit1303: fix compiler warningMarcel Raad
MinGW-w64 complains: warning: conversion to 'long int' from 'time_t {aka long long int}' may alter its value [-Wconversion] Fix this by using the correct type.
2017-04-16RELEASE-NOTES: synced with 1451271e0Daniel Stenberg
2017-04-15http2: fix handle leak in error pathLarry Stefani
Add missing newhandle free call in push_promise(). Closes #1416
2017-04-15mbedtls: fix memory leak in error pathLarry Stefani
Add missing our_ssl_sessionid free call in mbed_connect_step3(). Closes #1417
2017-04-15curl-compilers.m4: turn implicit function declarations into errorsMarcel Raad
This adds -Werror-implicit-function-declaration for GCC 2.95+ so that these errors are visible at the point where they occur instead of only at link time. Implicit function declarations are illegal in C99 and C++ anyway, and the same warning has been turned into an error for ICC in commit 3072c5b8a127057aa922b7c51051bbb4a630b091. Ref: https://gcc.gnu.org/onlinedocs/gcc-2.95.2/gcc_2.html#SEC8 Ref: https://curl.haxx.se/mail/lib-2017-04/0001.html Closes https://github.com/curl/curl/pull/1419
2017-04-12test1541: also test for CURL_PULL_WS2TCPIP_HMarcel Raad
Ref: https://github.com/curl/curl/issues/1408 Closes https://github.com/curl/curl/pull/1412
2017-04-12tests/server/util: prefer <poll.h> over <sys/poll.h>Marcel Raad
Follow-up to aa573c3c55cda72ec5ef677d87f6f46a53385f0c Ref: https://github.com/curl/curl/pull/1406
2017-04-11Curl_expire_latest: ignore already expired timersDaniel Stenberg
If the existing timer is still in there but has expired, the new timer should be added. Reported-by: Rainer Canavan Bug: https://curl.haxx.se/mail/lib-2017-04/0030.html Closes #1407
2017-04-11system.h: fix mingw sectionDaniel Stenberg
Reported-by: Marcel Raad Fixes #1408 Closes #1409
2017-04-11polarssl: unbreak build with versions < 1.3.8Marcel Raad
ssl_session_init was only introduced in version 1.3.8, the penultimate version. The function only contains a memset, so replace it with that. Suggested-by: Jay Satiro Fixes https://github.com/curl/curl/issues/1401
2017-04-11poll: prefer <poll.h> over <sys/poll.h>Marcel Raad
The POSIX standard location is <poll.h>. Using <sys/poll.h> results in warning spam when using the musl standard library. Closes https://github.com/curl/curl/pull/1406
2017-04-10openssl: fix this statement may fall through [-Wimplicit-fallthrough=]Alexis La Goutte
Closes #1402
2017-04-10nss: load CA certificates even with --insecureKamil Dudka
... because they may include an intermediate certificate for a client certificate and the intermediate certificate needs to be presented to the server, no matter if we verify the peer or not. Reported-by: thraidh Closes #851
2017-04-10RELEASE-NOTES: synced with f9d1e9a27f7e1Daniel Stenberg
2017-04-10libcurl-thread.3: fixed a bad macro that caused test 1140 to failDan Fandrich
2017-04-09libcurl-thread.3: also mention threaded-resolverDaniel Stenberg
Reported-by: Alex Bligh Bug: https://curl.haxx.se/mail/lib-2017-04/0044.html
2017-04-09.github/stale.yml: enable the stale botDaniel Stenberg
Issues and PRs with no activity for 180 days will get marked as stale, and if no further activity happens within 14 more days, the issue gets closed. This follows our established policy of not letting stalled bugs "get in the way": https://curl.haxx.se/docs/bugs.html#Closing_off_stalled_bugs Closes #1398