]> granicus.if.org Git - curl/log
curl
7 years agosockfilt: suppress conversion warning with explicit cast
Marcel Raad [Sun, 16 Jul 2017 11:28:45 +0000 (13:28 +0200)]
sockfilt: suppress conversion warning with explicit cast

MSVC warns when implicitly casting -1 to unsigned long.

7 years agortspd: fix MSVC level 4 warning
Marcel Raad [Sun, 16 Jul 2017 11:26:21 +0000 (13:26 +0200)]
rtspd: fix MSVC level 4 warning

warning C4701: potentially uninitialized local variable 'req' used

7 years agowinbuild: re-enable warning C4127 for curl tool
Marcel Raad [Fri, 14 Jul 2017 06:52:14 +0000 (08:52 +0200)]
winbuild: re-enable warning C4127 for curl tool

Disabled in cda19a345f6970e22fe8b7a808aeb8f086a21eac. It only needs to
be disabled for libcurl.

7 years agowinbuild: build with warning level 4
Marcel Raad [Sat, 8 Jul 2017 16:25:22 +0000 (18:25 +0200)]
winbuild: build with warning level 4

This is consistent with 7bc64561a2e63ca93e4b0b31d350773ba80955c2, which
changed the warning level from 3 to 4 for the Visual Studio project
files. But disable the level 4 warning C4127 "conditional expression is
constant", as that one is issued by older versions of the Windows SDK
as well as curl itself under some circumstances.

Closes https://github.com/curl/curl/pull/1667

7 years agotravis: install libidn2
Max Dymond [Mon, 10 Jul 2017 16:56:36 +0000 (17:56 +0100)]
travis: install libidn2

Install libidn2 to increase test coverage (IDN tests)

Closes https://github.com/curl/curl/pull/1673

7 years agotravis: enable warnings also in release mode
Marcel Raad [Sat, 8 Jul 2017 15:58:20 +0000 (17:58 +0200)]
travis: enable warnings also in release mode

... to get warnings also on Linux/GCC and OSX/clang.

Closes https://github.com/curl/curl/pull/1666

7 years agotravis: install libssh2
Max Dymond [Fri, 7 Jul 2017 15:41:47 +0000 (16:41 +0100)]
travis: install libssh2

Install libssh2 to increase test coverage (SFTP, SCP)

7 years agosystem.h: include winsock2.h before windows.h
Marcel Raad [Wed, 12 Jul 2017 05:55:18 +0000 (07:55 +0200)]
system.h: include winsock2.h before windows.h

... to avoid compiler warnings if the user doesn't want
WIN32_LEAN_AND_MEAN.

7 years agobuild: remove WIN32_LEAN_AND_MEAN from individual build systems
Marcel Raad [Tue, 11 Jul 2017 14:51:48 +0000 (16:51 +0200)]
build: remove WIN32_LEAN_AND_MEAN from individual build systems

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

7 years agoISSUE_TEMPLATE: Add a comment not to file security issues on github
Jay Satiro [Tue, 11 Jul 2017 15:48:37 +0000 (11:48 -0400)]
ISSUE_TEMPLATE: Add a comment not to file security issues on github

7 years agocurl_setup: always define WIN32_LEAN_AND_MEAN on Windows
Marcel Raad [Mon, 10 Jul 2017 12:56:11 +0000 (14:56 +0200)]
curl_setup: always define WIN32_LEAN_AND_MEAN on Windows

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

7 years agostrerror: Preserve Windows error code in some functions
Jay Satiro [Tue, 11 Jul 2017 05:53:23 +0000 (01:53 -0400)]
strerror: Preserve Windows error code in some functions

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

7 years agotests: Fix up issues with errno in test files
Max Dymond [Mon, 10 Jul 2017 12:50:15 +0000 (13:50 +0100)]
tests: Fix up issues with errno in test files

Closes https://github.com/curl/curl/pull/1671

7 years agoerrno: fix non-windows builds after af0216251b94e7
Daniel Stenberg [Mon, 10 Jul 2017 11:58:35 +0000 (13:58 +0200)]
errno: fix non-windows builds after af0216251b94e7

7 years agomake: fix docs build on OpenBSD
Ryan Winograd [Fri, 7 Jul 2017 22:02:43 +0000 (17:02 -0500)]
make: fix docs build on OpenBSD

Ref: #1591

7 years agoldap: fix MinGW compiler warning
Marcel Raad [Sat, 8 Jul 2017 15:33:58 +0000 (17:33 +0200)]
ldap: fix MinGW compiler warning

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

7 years agocurl-compilers.m4: disable warning spam with Cygwin's clang
Marcel Raad [Sat, 8 Jul 2017 15:44:34 +0000 (17:44 +0200)]
curl-compilers.m4: disable warning spam with Cygwin's clang

When building with Cygwin or MinGW, libtool uses a wrapper executable
instead of a wrapper script [1], which is written in C and throws
missing-variable-declarations warnings. Don't enable these warnings on
Cygwin and MinGW in order to avoid warnings for every executable built,
which spams the test suite output when using Cygwin's clang.

[1] https://www.gnu.org/software/libtool/manual/html_node/Wrapper-executables.html

Closes https://github.com/curl/curl/pull/1665

7 years agocurl_setup_once: Remove ERRNO/SET_ERRNO macros
Jay Satiro [Mon, 19 Jun 2017 04:52:38 +0000 (00:52 -0400)]
curl_setup_once: Remove ERRNO/SET_ERRNO macros

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

7 years agotool_getparam: fix potentially uninitialized err
Jay Satiro [Sun, 9 Jul 2017 16:04:42 +0000 (12:04 -0400)]
tool_getparam: fix potentially uninitialized err

7 years agosmb: rename variable to fix shadowing warning
Marcel Raad [Sat, 8 Jul 2017 21:19:36 +0000 (23:19 +0200)]
smb: rename variable to fix shadowing warning

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.

7 years agotool_cb_wrt: fix variable shadowing warning
Marcel Raad [Sat, 8 Jul 2017 09:43:51 +0000 (11:43 +0200)]
tool_cb_wrt: fix variable shadowing warning

GCC 4.4 complains:
tool_cb_wrt.c:81: error: declaration of ‘isatty’ shadows a global
declaration
/usr/include/unistd.h:782: error: shadowed declaration is here

Fix this by renaming the variable.

Closes https://github.com/curl/curl/pull/1661

7 years agoRELEASE-NOTES: synced with be2c999b8
Daniel Stenberg [Fri, 7 Jul 2017 22:15:03 +0000 (00:15 +0200)]
RELEASE-NOTES: synced with be2c999b8

7 years agotravis: install stunnel
Daniel Stenberg [Fri, 7 Jul 2017 14:42:44 +0000 (16:42 +0200)]
travis: install stunnel

7 years agovalgrind.supp: supress OpenSSL false positive seen on travis
Daniel Stenberg [Fri, 7 Jul 2017 14:23:13 +0000 (16:23 +0200)]
valgrind.supp: supress OpenSSL false positive seen on travis

7 years agotravis: detect and use valgrind for normal builds
Daniel Stenberg [Fri, 7 Jul 2017 12:46:17 +0000 (14:46 +0200)]
travis: detect and use valgrind for normal builds

Closes #1653

7 years agotravis: add SMB, DICT, TELNET torture to coverage test
Daniel Stenberg [Fri, 7 Jul 2017 09:03:24 +0000 (11:03 +0200)]
travis: add SMB, DICT, TELNET torture to coverage test

7 years agocmake: offer CMAKE_DEBUG_POSTFIX when building with MSVC
Paul Harris [Thu, 6 Jul 2017 15:53:41 +0000 (23:53 +0800)]
cmake: offer CMAKE_DEBUG_POSTFIX when building with MSVC

Removes BUILD_RELEASE_DEBUG_DIRS since it wasn't used anywhere.

Closes #1649

7 years agoCURLOPT_POSTFIELDS.3: explain the 100-continue magic better
Daniel Stenberg [Fri, 7 Jul 2017 10:43:17 +0000 (12:43 +0200)]
CURLOPT_POSTFIELDS.3: explain the 100-continue magic better

7 years agotest1452: add telnet negotiation
Max Dymond [Wed, 5 Jul 2017 09:12:10 +0000 (10:12 +0100)]
test1452: add telnet negotiation

Add a basic telnet server for negotiating some telnet options before
echoing back any data that's sent to it.

Closes #1645

7 years agotravis: do more tests in the coverage run
Daniel Stenberg [Fri, 7 Jul 2017 08:05:30 +0000 (10:05 +0200)]
travis: do more tests in the coverage run

I added a selection of torture and event tests that run "fast enough"

7 years agocurl_easy_escape.3: mention the (lack of) encoding
Daniel Stenberg [Fri, 7 Jul 2017 08:47:46 +0000 (10:47 +0200)]
curl_easy_escape.3: mention the (lack of) encoding

Fixes #1612
Reported-by: Jeroen Ooms
7 years agomemdebug: don't setbuf() if the file open failed
Gisle Vanem [Thu, 6 Jul 2017 21:14:29 +0000 (23:14 +0200)]
memdebug: don't setbuf() if the file open failed

Bug: https://github.com/curl/curl/issues/828#issuecomment-313475151

7 years agoappveyor: enable CURL_WERROR on all builds
Daniel Stenberg [Thu, 6 Jul 2017 10:12:51 +0000 (12:12 +0200)]
appveyor: enable CURL_WERROR on all builds

7 years agocmake: add CURL_WERROR for enabling "warning as errors"
Daniel Stenberg [Thu, 6 Jul 2017 10:12:31 +0000 (12:12 +0200)]
cmake: add CURL_WERROR for enabling "warning as errors"

7 years agocmake: remove spurious "-l" from linker flags
Hannes Magnusson [Wed, 7 Jun 2017 19:43:40 +0000 (12:43 -0700)]
cmake: remove spurious "-l" from linker flags

Fixes #1552

7 years agotest506: skip if threaded-resolver
Daniel Stenberg [Thu, 6 Jul 2017 09:11:43 +0000 (11:11 +0200)]
test506: skip if threaded-resolver

7 years agoruntests: support "threaded-resolver" as a feature
Daniel Stenberg [Thu, 6 Jul 2017 09:11:07 +0000 (11:11 +0200)]
runtests: support "threaded-resolver" as a feature

... to let tests require it or skip if present

7 years agoasyn-thread.c: fix unused variable warnings on macOS
Daniel Stenberg [Thu, 6 Jul 2017 08:22:28 +0000 (10:22 +0200)]
asyn-thread.c: fix unused variable warnings on macOS

7 years agohttp: s/TINY_INITIAL_POST_SIZE/EXPECT_100_THRESHOLD
Daniel Stenberg [Thu, 6 Jul 2017 09:20:57 +0000 (11:20 +0200)]
http: s/TINY_INITIAL_POST_SIZE/EXPECT_100_THRESHOLD

Make the name reflect its use better, and add a short comment describing
what it's for.

7 years agocmake: if inet_pton is used, bump _WIN32_WINNT
Daniel Stenberg [Wed, 5 Jul 2017 08:21:58 +0000 (10:21 +0200)]
cmake: if inet_pton is used, bump _WIN32_WINNT

... and make sure inet_pton is always checked for when *not* using Windows,
which is a regression from 4fc6ebe18.

Idea-by: Sergei Nikulov
7 years agoselect.h: avoid macro redefinition harder
Daniel Stenberg [Wed, 5 Jul 2017 10:32:09 +0000 (12:32 +0200)]
select.h: avoid macro redefinition harder

... by checking the POLLIN define, as the header file checks don't work
on Windows.

7 years agoinet_pton: fix include on windows to get prototype
Daniel Stenberg [Wed, 5 Jul 2017 08:21:58 +0000 (10:21 +0200)]
inet_pton: fix include on windows to get prototype

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

7 years agoTODO: 1.10 auto-detect proxy
Daniel Stenberg [Wed, 5 Jul 2017 08:07:27 +0000 (10:07 +0200)]
TODO: 1.10 auto-detect proxy

Closes #1572

7 years agoTODO: HTTP proxy CONNECT is non-blocking now
Daniel Stenberg [Wed, 5 Jul 2017 08:00:26 +0000 (10:00 +0200)]
TODO: HTTP proxy CONNECT is non-blocking now

7 years agocmake: fix send/recv argument scanner for windows
Daniel Stenberg [Wed, 5 Jul 2017 06:29:43 +0000 (08:29 +0200)]
cmake: fix send/recv argument scanner for windows

... by simply trying the Windows argument types first.

Fixes #1640

7 years agoRELEASE-NOTES: synced with 596cfb6c0
Daniel Stenberg [Tue, 4 Jul 2017 23:11:41 +0000 (01:11 +0200)]
RELEASE-NOTES: synced with 596cfb6c0

7 years agosmb: add support for CURLOPT_FILETIME
Gisle Vanem [Tue, 4 Jul 2017 13:51:45 +0000 (15:51 +0200)]
smb: add support for CURLOPT_FILETIME

Bug: https://curl.haxx.se/mail/lib-2017-07/0005.html

Closes #1643

7 years agotravis: install nghttp2 on linux builds
Daniel Stenberg [Tue, 4 Jul 2017 21:03:49 +0000 (23:03 +0200)]
travis: install nghttp2 on linux builds

Closes #1642

7 years agosmb: fix build for djgpp/MSDOS
Gisle Vanem [Tue, 4 Jul 2017 13:42:33 +0000 (15:42 +0200)]
smb: fix build for djgpp/MSDOS

bug: https://curl.haxx.se/mail/lib-2017-07/0005.html

7 years agoconfigure: try ldap/lber in reversed order first
Daniel Stenberg [Tue, 4 Jul 2017 09:33:51 +0000 (11:33 +0200)]
configure: try ldap/lber in reversed order first

When scanning for which LDAP libraries to use, try the -lldap -llber
combination before the reversed order since it has a greater chance of
working when linking with libcurl statically.

Fixes #1619
Closes #1634
Reported-by: David E. Narváez
7 years agoconfigure: remove checks for 5 functions never used
Daniel Stenberg [Tue, 4 Jul 2017 07:01:39 +0000 (09:01 +0200)]
configure: remove checks for 5 functions never used

fork, getprotobyname, inet_addr, perror, uname

closes #1638

7 years agodist: add SMB python deps into the tarball
Daniel Stenberg [Tue, 4 Jul 2017 08:41:14 +0000 (10:41 +0200)]
dist: add SMB python deps into the tarball

7 years agotest1451: add SMB support to the testbed
Max Dymond [Mon, 3 Jul 2017 10:00:04 +0000 (11:00 +0100)]
test1451: add SMB support to the testbed

Add test 1451 which does some very basic SMB testing using the impacket
SMB server.

Closes #1630

7 years agotest: add impacket for SMB testing
Max Dymond [Fri, 30 Jun 2017 12:53:19 +0000 (13:53 +0100)]
test: add impacket for SMB testing

Import impacket 0.9.15 for use in SMB testing. This was generated by
doing "pip2.7 install -t . impacket"

Unnecessary files for current testing were deleted.

7 years agotravis.yml: use --enable-werror on debug builds
Daniel Stenberg [Tue, 4 Jul 2017 08:27:12 +0000 (10:27 +0200)]
travis.yml: use --enable-werror on debug builds

... to better detect and fault on compiler warnings/errors

Closes #1637

7 years agotool_sleep: typecast to avoid macos compiler warning
Daniel Stenberg [Tue, 4 Jul 2017 08:27:12 +0000 (10:27 +0200)]
tool_sleep: typecast to avoid macos compiler warning

tool_sleep.c:54:24: error: implicit conversion loses integer precision:
'long' to '__darwin_suseconds_t' (aka 'int')
[-Werror,-Wshorten-64-to-32]

7 years agotimeval.c: Use long long constant type for timeval assignment
Martin Kepplinger [Mon, 3 Jul 2017 11:23:47 +0000 (13:23 +0200)]
timeval.c: Use long long constant type for timeval assignment

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>
7 years agourl: make the original string get used on subsequent transfers
Daniel Stenberg [Mon, 3 Jul 2017 21:52:10 +0000 (23:52 +0200)]
url: make the original string get used on subsequent transfers

... 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
7 years agogtls: fix build when sizeof(long) < sizeof(void *)
Johannes Schindelin [Mon, 26 Jun 2017 21:15:22 +0000 (23:15 +0200)]
gtls: fix build when sizeof(long) < sizeof(void *)

- 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>
7 years agounit1399: fix integer overflow
Ryan Winograd [Sun, 2 Jul 2017 23:35:36 +0000 (18:35 -0500)]
unit1399: fix integer overflow

Bug: #1616
Closes #1633

7 years agocmake: Added compatibility options for older Windows versions
Per Malmberg [Sat, 1 Jul 2017 23:02:12 +0000 (01:02 +0200)]
cmake: Added compatibility options for older Windows versions

CURL_STATIC_CRT and ENABLE_INET_PTON

Closes #1621

7 years agounit1399: add logging to time comparison
Daniel Stenberg [Sat, 1 Jul 2017 14:40:51 +0000 (16:40 +0200)]
unit1399: add logging to time comparison

... to enable tracking down why autobuilds fail on this

Bug: #1616

7 years agomake: build the docs subdir only from within src
Daniel Stenberg [Fri, 30 Jun 2017 14:42:26 +0000 (16:42 +0200)]
make: build the docs subdir only from within src

... and don't build at all in include

Prompted-by-work-by: Simon Warta
Ref: #1590
Closes #1591

7 years agotest1450: fix up DICT server in torture mode
Max Dymond [Fri, 30 Jun 2017 11:45:17 +0000 (12:45 +0100)]
test1450: fix up DICT server in torture mode

As per https://github.com/curl/curl/pull/1615, the DICT server is a
little spammy in torture mode due to the sockets being torn down
unexpectedly. Fix this by adding some error handling to the handling
function.

Closes #1629

7 years agotest1450: add simple testing for DICT
Max Dymond [Mon, 26 Jun 2017 15:46:53 +0000 (16:46 +0100)]
test1450: add simple testing for DICT

Add a new server which provides a DICT interface. This is intended to
begin coverage testing for lib/dict.c

Closes #1615

7 years agotest1521: fix out-of-tree builds, broken with 467da3af
Dan Fandrich [Thu, 29 Jun 2017 19:34:05 +0000 (21:34 +0200)]
test1521: fix out-of-tree builds, broken with 467da3af

The test.h file is no longer in the same directory as the source file,
so that directory needs to be added to the include path.

Fixes #1627
Closes #1628

7 years agohttp2: handle PING frames
Max Dymond [Wed, 31 May 2017 13:00:45 +0000 (14:00 +0100)]
http2: handle PING frames

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

7 years agohandler: refactor connection checking
Max Dymond [Wed, 31 May 2017 11:09:56 +0000 (12:09 +0100)]
handler: refactor connection checking

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.

7 years agoopenssl: improve fallback seed of PRNG with a time based hash
dmitrykos [Tue, 27 Jun 2017 17:56:12 +0000 (20:56 +0300)]
openssl: improve fallback seed of PRNG with a time based hash

Fixes #1620

7 years agoprogress: prevent resetting t_starttransfer
Ryan Winograd [Mon, 26 Jun 2017 16:51:05 +0000 (11:51 -0500)]
progress: prevent resetting t_starttransfer

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

7 years agocurl_strequal.3: fix typo in SYNOPSIS
Daniel Stenberg [Wed, 28 Jun 2017 23:16:56 +0000 (01:16 +0200)]
curl_strequal.3: fix typo in SYNOPSIS

Reported-by: Jesse Chisholm
Fixes #1623

7 years agoRELEASE-NOTES: synced with ce2c3ebda
Daniel Stenberg [Wed, 28 Jun 2017 09:29:32 +0000 (11:29 +0200)]
RELEASE-NOTES: synced with ce2c3ebda

7 years agocurl --socks5-{basic,gssapi}: control socks5 auth
Kamil Dudka [Fri, 19 May 2017 16:11:47 +0000 (18:11 +0200)]
curl --socks5-{basic,gssapi}: control socks5 auth

Closes https://github.com/curl/curl/pull/1454

7 years agoCURLOPT_SOCKS5_AUTH: allowed methods for SOCKS5 proxy auth
Kamil Dudka [Thu, 27 Apr 2017 13:18:49 +0000 (15:18 +0200)]
CURLOPT_SOCKS5_AUTH: allowed methods for SOCKS5 proxy auth

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

7 years agosocks: deduplicate the code for auth request
Kamil Dudka [Wed, 8 Mar 2017 11:16:01 +0000 (12:16 +0100)]
socks: deduplicate the code for auth request

7 years agosocks: use proxy_user instead of proxy_name
Kamil Dudka [Wed, 8 Mar 2017 11:21:09 +0000 (12:21 +0100)]
socks: use proxy_user instead of proxy_name

... to make it obvious what the data is used for

7 years agolibtest/make: generate lib1521.c
Daniel Stenberg [Tue, 27 Jun 2017 15:27:22 +0000 (17:27 +0200)]
libtest/make: generate lib1521.c

... instead of having the generated code checked in. This saves space in
the tarball but primarily automatically adapts to newly added options.

Closes #1614

7 years agotool_getparam: fix memory leak on test 1147 OOM (torture tests)
Jay Satiro [Mon, 26 Jun 2017 05:03:12 +0000 (01:03 -0400)]
tool_getparam: fix memory leak on test 1147 OOM (torture tests)

Bug: https://github.com/curl/curl/pull/1486#issuecomment-310926872
Reported-by: Dan Fandrich
7 years agotest1537: fixed memory leak on OOM
Dan Fandrich [Sun, 25 Jun 2017 20:59:55 +0000 (22:59 +0200)]
test1537: fixed memory leak on OOM

7 years agotest1521: fix compiler warnings
Marcel Raad [Sat, 24 Jun 2017 14:39:27 +0000 (16:39 +0200)]
test1521: fix compiler warnings

The integer literal 3123123123 doesn't fit into a 32-bit signed
integer, so GCC with 32-bit long warns in C90 mode:
this decimal constant is unsigned only in ISO C90 [enabled by default]
Fix this by using ULONG_MAX, which should fit in any curl_off_t and has
the correct suffix to not issue any warnings.
Also adds the missing CURLOPT_REQUEST_TARGET from commit
9b167fd090f596eac828817d48c247eeae53407f.

Closes https://github.com/curl/curl/pull/1611

7 years agocurl/system.h: add check for XTENSA for 32bit gcc
Daniel Stenberg [Sat, 24 Jun 2017 20:26:54 +0000 (22:26 +0200)]
curl/system.h: add check for XTENSA for 32bit gcc

Reported-by: Neil Kolban
Fixes: 1598
7 years agowinbuild: fix boringssl build
Henrik S. Gaßmann [Sat, 24 Jun 2017 09:55:21 +0000 (11:55 +0200)]
winbuild: fix boringssl build

Compile with `WIN32_LEAN_AND_MEAN` which prevents `windows.h` from
including too much clutter including `wincrypt.h` which in turn contains
some preprocessor macros that clash with boringssl symbols.

Detect boringssl by checking the existance of `is_boringssl.h` and set
the corresponding `HAVE_BORINGSSL` for compilation which is used in
`ldap.c` to undefine the evil macros.

Closes #1610

7 years agoprogress: progress.timespent needs to be us
Daniel Stenberg [Sat, 24 Jun 2017 19:14:50 +0000 (21:14 +0200)]
progress: progress.timespent needs to be us

follow-up to 64ed44a815e4e to fix test 500 failures

7 years agocurl-compilers.m4: fix unknown-warning-option on Apple clang
Marcel Raad [Thu, 22 Jun 2017 23:28:17 +0000 (01:28 +0200)]
curl-compilers.m4: fix unknown-warning-option on Apple clang

Since 5598b0bd63f690c151074494ce47ef872f004ab4, clang -v is used to
detect the clang version. The version number was expected to come after
the word "version". For Apple clang, this doesn't work as it has its
own versioning scheme.
The version number is now first searched after the string
"based on LLVM". This works for Apple clang before version 7, and also
for e.g. Ubuntu's clang up to version 3.7. If it's not found and the
version string contains "Apple LLVM version", clang version 3.7 is
assumed, which is the version that comes with Xcode 7. Otherwise, the
version number is still expected after the word "version", which works
for very old Apple clang versions.

Ref: https://trac.macports.org/wiki/XcodeVersionInfo
Fixes https://github.com/curl/curl/issues/1606
Closes https://github.com/curl/curl/pull/1607

7 years agoprogress: fix "time spent", broke in adef394ac
Daniel Stenberg [Fri, 23 Jun 2017 23:18:21 +0000 (01:18 +0200)]
progress: fix "time spent", broke in adef394ac

7 years agoCURLINFO_REDIRECT_URL.3: mention the CURLOPT_MAXREDIRS case
Daniel Stenberg [Fri, 23 Jun 2017 22:59:10 +0000 (00:59 +0200)]
CURLINFO_REDIRECT_URL.3: mention the CURLOPT_MAXREDIRS case

... supported since 7.54.1

7 years agomaketgz: switch to -6e for xz
Daniel Stenberg [Fri, 23 Jun 2017 22:04:58 +0000 (00:04 +0200)]
maketgz: switch to -6e for xz

To reduce the memory requirement for decompress, and still do almost as
good compression as with -9e.

Pointed-out-by: Dan Fandrich
7 years agolibtest/Makefile: remove unused lib1541 variables
Daniel Stenberg [Thu, 22 Jun 2017 22:14:49 +0000 (00:14 +0200)]
libtest/Makefile: remove unused lib1541 variables

7 years agoCONTRIBUTE.md: mention the out-of-tree build test too
Daniel Stenberg [Thu, 22 Jun 2017 08:31:03 +0000 (10:31 +0200)]
CONTRIBUTE.md: mention the out-of-tree build test too

7 years agomaketgz: switch to xz instead of lzma
Daniel Stenberg [Wed, 21 Jun 2017 20:40:55 +0000 (22:40 +0200)]
maketgz: switch to xz instead of lzma

The compressed output size seems to be a tad bit smaller, but generally
xz seems more preferred these days and is used directly by for example
gentoo instead of bz2.

"Users of LZMA Utils should move to XZ Utils" =>
https://tukaani.org/lzma/

Closes #1604

7 years ago--request-target: instead of --strip-path-slash
Daniel Stenberg [Wed, 21 Jun 2017 21:35:08 +0000 (23:35 +0200)]
--request-target: instead of --strip-path-slash

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

7 years agolib1521: fix missing-variable-declarations clang warnings
Marcel Raad [Wed, 21 Jun 2017 16:11:11 +0000 (18:11 +0200)]
lib1521: fix missing-variable-declarations clang warnings

Declare TU-local variables static.

7 years agotravis: enable typecheck-gcc warnings
Marcel Raad [Tue, 20 Jun 2017 20:44:15 +0000 (22:44 +0200)]
travis: enable typecheck-gcc warnings

- switch debug and release configurations so that we get an optimized
  build with GCC 4.3+ as required by typecheck-gcc
- enable warnings-as-errors for release builds
  (which have warnings disabled)

Closes https://github.com/curl/curl/pull/1595

7 years agotypecheck-gcc: add support for CURLINFO_OFF_T
Marcel Raad [Mon, 19 Jun 2017 21:42:05 +0000 (23:42 +0200)]
typecheck-gcc: add support for CURLINFO_OFF_T

typecheck-gcc expected curl_socket_t instead of curl_off_t arguments
for CURLINFO_OFF_T. Detected by test1521, unfortunately only when run
locally.

Closes https://github.com/curl/curl/pull/1592

7 years agoci: whitelist branches to avoid testing feature branches twice
Simon Warta [Tue, 20 Jun 2017 21:00:49 +0000 (23:00 +0200)]
ci: whitelist branches to avoid testing feature branches twice

7 years agolib: fix the djgpp build
Gisle Vanem [Wed, 21 Jun 2017 05:46:21 +0000 (07:46 +0200)]
lib: fix the djgpp build

Bug: https://github.com/curl/curl/commit/73a2fcea0b4adea6ba342cd7ed1149782c214ae3#commitcomment-22655993

7 years agoif2ip: fix compiler warning in ISO C90 mode
Marcel Raad [Tue, 20 Jun 2017 20:33:56 +0000 (22:33 +0200)]
if2ip: fix compiler warning in ISO C90 mode

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.

7 years agotravis: do the distcheck test build out-of-tree as well
Daniel Stenberg [Mon, 19 Jun 2017 23:02:06 +0000 (01:02 +0200)]
travis: do the distcheck test build out-of-tree as well

7 years agohttp: add --strip-path-slash and CURLOPT_STRIP_PATH_SLASH
Daniel Stenberg [Mon, 19 Jun 2017 12:10:33 +0000 (14:10 +0200)]
http: add --strip-path-slash and CURLOPT_STRIP_PATH_SLASH

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

7 years agotest1521: test getinfo's OFF_T types too
Daniel Stenberg [Mon, 19 Jun 2017 07:31:37 +0000 (09:31 +0200)]
test1521: test getinfo's OFF_T types too

Closes #1588