summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* darwinssl: fix compiler warningsbagder/darwinssl-warningsDaniel Stenberg2017-07-272-14/+16
|
* darwinssl: fix variable type mistake (regression)Daniel Stenberg2017-07-271-1/+2
| | | | | | | | ... which made --tlsv1.2 not work because it would blank the max tls version variable. Reported-by: Nick Miyake Bug: #1703
* multi: mention integer overflow risk if using > 500 million socketsDaniel Stenberg2017-07-271-0/+4
| | | | | | | Reported-by: ovidiu-benea@users.noreply.github.com Closes #1675 Closes #1683
* checksrc: escape open brace in regexDaniel Stenberg2017-07-271-2/+2
| | | | ... to silence warning.
* nss: fix a possible use-after-free in SelectClientCert()Kamil Dudka2017-07-201-0/+8
| | | | | | | | | | ... causing a SIGSEGV in showit() in case the handle used to initiate the connection has already been freed. This commit fixes a bug introduced in curl-7_19_5-204-g5f0cae803. Reported-by: Rob Sanders Bug: https://bugzilla.redhat.com/1436158
* nss: unify the coding style of nss_send() and nss_recv()Kamil Dudka2017-07-201-6/+11
| | | | No changes in behavior intended by this commit.
* darwinssl: fix pinnedpubkey build errorJay Satiro2017-07-171-1/+1
| | | | | | | - s/SessionHandle/Curl_easy/ Bug: https://github.com/curl/curl/commit/eb16305#commitcomment-23035670 Reported-by: Gisle Vanem
* build: remove WIN32_LEAN_AND_MEAN from individual build systemsMarcel Raad2017-07-111-3/+0
| | | | | | | | It's defined for all build systems in curl_setup.h since commit beb08481d01a07a8b10938b1078a5e298b1c2912. This caused macro redefinition warnings in the configure builds. Closes https://github.com/curl/curl/pull/1677
* curl_setup: always define WIN32_LEAN_AND_MEAN on WindowsMarcel Raad2017-07-111-3/+11
| | | | | | | | | Make sure to always define WIN32_LEAN_AND_MEAN before including any Windows headers to avoid pulling in unnecessary headers. This avoids unnecessary macro clashes and compiler warnings. Ref: https://github.com/curl/curl/issues/1562 Closes https://github.com/curl/curl/pull/1672
* strerror: Preserve Windows error code in some functionsJay Satiro2017-07-111-25/+42
| | | | | | | | | | | This is a follow-up to af02162 which removed (SET_)ERRNO macros. That commit was an earlier draft that I committed by mistake, which was then remedied by a5834e5 and e909de6, and now this commit. With this commit there is now no difference between the current code and the changes that were approved in the final draft. Thanks-to: Max Dymond, Marcel Raad, Daniel Stenberg, Gisle Vanem Ref: https://github.com/curl/curl/pull/1589
* errno: fix non-windows builds after af0216251b94e7Daniel Stenberg2017-07-102-6/+8
|
* ldap: fix MinGW compiler warningMarcel Raad2017-07-101-2/+1
| | | | | | | | | | ldap_bind_s is marked as deprecated in w32api's winldap.h shipping with the latest original MinGW, resulting in compiler warnings since commit f0fe66f13c93d3d0af45d9fb1231c9164e0f9dc8. Fix this for the non-SSPI case by using ldap_simple_bind_s again instead of ldap_bind_s with LDAP_AUTH_SIMPLE. Closes https://github.com/curl/curl/pull/1664
* curl_setup_once: Remove ERRNO/SET_ERRNO macrosJay Satiro2017-07-1012-90/+73
| | | | | | | | | | | | Prior to this change (SET_)ERRNO mapped to GetLastError/SetLastError for Win32 and regular errno otherwise. I reviewed the code and found no justifiable reason for conflating errno on WIN32 with GetLastError/SetLastError. All Win32 CRTs support errno, and any Win32 multithreaded CRT supports thread-local errno. Fixes https://github.com/curl/curl/issues/895 Closes https://github.com/curl/curl/pull/1589
* smb: rename variable to fix shadowing warningMarcel Raad2017-07-091-5/+5
| | | | | | | | | GCC 4.6.3 on travis complains: smb.c: In function ‘get_posix_time’: smb.c:725:13: error: declaration of ‘time’ shadows a global declaration [-Werror=shadow] Fix this by renaming the variable.
* cmake: offer CMAKE_DEBUG_POSTFIX when building with MSVCPaul Harris2017-07-071-0/+7
| | | | | | Removes BUILD_RELEASE_DEBUG_DIRS since it wasn't used anywhere. Closes #1649
* memdebug: don't setbuf() if the file open failedGisle Vanem2017-07-061-1/+2
| | | | Bug: https://github.com/curl/curl/issues/828#issuecomment-313475151
* asyn-thread.c: fix unused variable warnings on macOSDaniel Stenberg2017-07-061-13/+14
|
* http: s/TINY_INITIAL_POST_SIZE/EXPECT_100_THRESHOLDDaniel Stenberg2017-07-062-4/+9
| | | | | Make the name reflect its use better, and add a short comment describing what it's for.
* select.h: avoid macro redefinition harderDaniel Stenberg2017-07-051-2/+3
| | | | | ... by checking the POLLIN define, as the header file checks don't work on Windows.
* inet_pton: fix include on windows to get prototypeDaniel Stenberg2017-07-051-1/+4
| | | | | | | inet_pton() exists on Windows and gets used by our cmake builds. Make sure the correct header file is included to avoid compiler warnings. Closes #1639
* smb: add support for CURLOPT_FILETIMEGisle Vanem2017-07-041-3/+24
| | | | | | Bug: https://curl.haxx.se/mail/lib-2017-07/0005.html Closes #1643
* smb: fix build for djgpp/MSDOSGisle Vanem2017-07-041-1/+1
| | | | bug: https://curl.haxx.se/mail/lib-2017-07/0005.html
* configure: remove checks for 5 functions never usedDaniel Stenberg2017-07-041-13/+0
| | | | | | fork, getprotobyname, inet_addr, perror, uname closes #1638
* timeval.c: Use long long constant type for timeval assignmentMartin Kepplinger2017-07-041-2/+2
| | | | | | | | | | | | | | | | On a 64 bit host, sparse says: timeval.c:148:15: warning: constant 0x7fffffffffffffff is so big it is long timeval.c:149:12: warning: constant 0x7fffffffffffffff is so big it is long so let's use long long constant types in order to prevent undesired overflow failures. Bug: https://curl.haxx.se/mail/lib-2017-07/0003.html Closes #1636 Signed-off-by: Martin Kepplinger <martink@posteo.de>
* url: make the original string get used on subsequent transfersDaniel Stenberg2017-07-031-0/+7
| | | | | | | | | | | ... since CURLOPT_URL should follow the same rules as other options: they remain set until changed or cleared. Added test 1551 to verify. Fixes #1631 Closes #1632 Reported-by: Pavel Rochnyak
* gtls: fix build when sizeof(long) < sizeof(void *)Johannes Schindelin2017-07-031-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | - Change gnutls pointer/int macros to pointer/curl_socket_t. Prior to this change they used long type as well. The size of the `long` data type can be shorter than that of pointer types. This is the case most notably on Windows. If C99 were acceptable, we could simply use `intptr_t` here. But we want to retain C89 compatibility. Simply use the trick of performing pointer arithmetic with the NULL pointer: to convert an integer `i` to a pointer, simply take the address of the `i`th element of a hypothetical character array starting at address NULL. To convert back, simply cast the pointer difference. Thanks to Jay Satiro for the initial modification to use curl_socket_t instead of int/long. Closes #1617 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* http2: handle PING framesMax Dymond2017-06-301-2/+46
| | | | | | | Add a connection check function to HTTP2 based off RTSP. This causes PINGs to be handled the next time the connection is reused. Closes #1521
* handler: refactor connection checkingMax Dymond2017-06-3020-7/+78
| | | | | | Add a new type of callback to Curl_handler which performs checks on the connection. Alter RTSP so that it uses this callback to do its own check on connection health.
* openssl: improve fallback seed of PRNG with a time based hashdmitrykos2017-06-301-17/+26
| | | | Fixes #1620
* progress: prevent resetting t_starttransferRyan Winograd2017-06-301-1/+15
| | | | | | | | | | | | | Prevent `Curl_pgrsTime` from modifying `t_starttransfer` when invoked with `TIMER_STARTTRANSFER` more than once during a single request. When a redirect occurs, this is considered a new request and `t_starttransfer` can be updated to reflect the `t_starttransfer` time of the redirect request. Closes #1616 Bug: https://github.com/curl/curl/pull/1602#issuecomment-310267370
* CURLOPT_SOCKS5_AUTH: allowed methods for SOCKS5 proxy authKamil Dudka2017-06-283-9/+27
| | | | | | | | | | | | | | | | | | If libcurl was built with GSS-API support, it unconditionally advertised GSS-API authentication while connecting to a SOCKS5 proxy. This caused problems in environments with improperly configured Kerberos: a stock libcurl failed to connect, despite libcurl built without GSS-API connected fine using username and password. This commit introduces the CURLOPT_SOCKS5_AUTH option to control the allowed methods for SOCKS5 authentication at run time. Note that a new option was preferred over reusing CURLOPT_PROXYAUTH for compatibility reasons because the set of authentication methods allowed by default was different for HTTP and SOCKS5 proxies. Bug: https://curl.haxx.se/mail/lib-2017-01/0005.html Closes https://github.com/curl/curl/pull/1454
* socks: deduplicate the code for auth requestKamil Dudka2017-06-281-9/+10
|
* socks: use proxy_user instead of proxy_nameKamil Dudka2017-06-281-16/+16
| | | | ... to make it obvious what the data is used for
* progress: progress.timespent needs to be usDaniel Stenberg2017-06-241-2/+2
| | | | follow-up to 64ed44a815e4e to fix test 500 failures
* progress: fix "time spent", broke in adef394acDaniel Stenberg2017-06-241-4/+4
|
* --request-target: instead of --strip-path-slashDaniel Stenberg2017-06-213-6/+6
| | | | | | | | | | | | | | ... and CURLOPT_REQUEST_TARGET instead of CURLOPT_STRIP_PATH_SLASH. This option instead provides the full "alternative" target to use in the request, instead of extracting the path from the URL. Test 1298 and 1299 updated accordingly. Idea-by: Evert Pot Suggestion: https://daniel.haxx.se/blog/2017/06/19/options-with-curl/comment-page-1/#comment-18373 Closes #1593
* lib: fix the djgpp buildGisle Vanem2017-06-211-1/+3
| | | | Bug: https://github.com/curl/curl/commit/73a2fcea0b4adea6ba342cd7ed1149782c214ae3#commitcomment-22655993
* if2ip: fix compiler warning in ISO C90 modeMarcel Raad2017-06-201-3/+3
| | | | | remote_scope_id is only used when both HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID and ENABLE_IPV6 are defined instead of only one of them.
* http: add --strip-path-slash and CURLOPT_STRIP_PATH_SLASHDaniel Stenberg2017-06-193-0/+12
| | | | | | | | | | | ... to enable sending "OPTIONS *" which wasn't possible previously. This option currently only works for HTTP. Added test cases 1298 + 1299 to verify Fixes #1280 Closes #1462
* getinfo: return sizes as curl_off_tDaniel Stenberg2017-06-191-0/+37
| | | | | | | | | | | | | | | This change introduces new alternatives for the existing six curl_easy_getinfo() options that return sizes or speeds as doubles. The new versions are named like the old ones but with an appended '_T': CURLINFO_CONTENT_LENGTH_DOWNLOAD_T CURLINFO_CONTENT_LENGTH_UPLOAD_T CURLINFO_SIZE_DOWNLOAD_T CURLINFO_SIZE_UPLOAD_T CURLINFO_SPEED_DOWNLOAD_T CURLINFO_SPEED_UPLOAD_T Closes #1511
* PIPELINING_SERVER_BL: cleanup the internal list useDaniel Stenberg2017-06-191-22/+15
| | | | | | | | | | | The list was freed incorrectly since the llist refactor of cbae73e1dd959. Added test 1550 to verify that it works and avoid future regressions. Reported-by: Pascal Terjan Fixes #1584 Closes #1585
* http2: fix OOM crashDaniel Stenberg2017-06-182-5/+10
| | | | torture mode with test 1021 found it
* http_proxy: fix build with http and proxyMarcel Raad2017-06-182-1/+3
| | | | | | After deff7de0eb0e22d2d142b96b9cc84cd8db5d2a48, the build without CURL_DISABLE_PROXY and CURL_DISABLE_HTTP was failing because of missing includes.
* http_proxy: fix compiler warningMarcel Raad2017-06-181-1/+2
| | | | | With CURL_DISABLE_PROXY or CURL_DISABLE_HTTP, GCC complained about a missing prototype for Curl_connect_free.
* Makefile.m32: enable -W for MinGW32 buildMarcel Raad2017-06-161-1/+1
| | | | | | The configure-based build also has this in addition to -Wall. Closes https://github.com/curl/curl/pull/1578
* http-proxy: fix chunked-encoded CONNECT responsesDaniel Stenberg2017-06-162-3/+3
| | | | | | | | Regression since 5113ad0424. ... and remove 'flaky' from test 1061 again Closes #1579
* http-proxy: deal with EAGAINDaniel Stenberg2017-06-161-2/+1
| | | | | | | | ... the previous code would reset the header length wrongly (since 5113ad0424). This makes test 1060 reliable again. Also: make sws send even smaller chunks of data to increase the likeliness of this happening.
* HTTPS-Proxy: don't offer h2 for https proxy connectionsJay Satiro2017-06-163-3/+6
| | | | | | Bug: https://github.com/curl/curl/issues/1254 Closes #1546
* url: refactor the check for Windows drive letter in pathJay Satiro2017-06-161-16/+11
| | | | | | | - Move the logic to detect a Windows drive letter prefix (eg c: in c:foo) into a function-like macro. Closes https://github.com/curl/curl/pull/1571
* mk-ca-bundle.pl: Check curl's exit code after certdata downloadJay Satiro2017-06-161-1/+1
| | | | | | | | | | - No longer allow partial downloads of certdata. Prior to this change partial downloads were (erroneously?) allowed since only the server code was checked to be 200. Bug: https://github.com/curl/curl/pull/1577 Reported-by: Matteo B.