platform/upstream/curl.git
11 years agoCURL_CHECK_CA_BUNDLE: don't check for paths when cross-compiling
Daniel Stenberg [Thu, 18 Apr 2013 21:37:56 +0000 (23:37 +0200)]
CURL_CHECK_CA_BUNDLE: don't check for paths when cross-compiling

When cross-compiling we can't scan and detect existing files or paths.

Bug: http://curl.haxx.se/mail/lib-2013-04/0294.html

11 years agousercertinmem.c: add example showing user cert in memory
Ishan SinghLevett [Thu, 18 Apr 2013 21:05:36 +0000 (23:05 +0200)]
usercertinmem.c: add example showing user cert in memory

Relies on CURLOPT_SSL_CTX_FUNCTION, which is OpenSSL specific

11 years agourl: Fix chksrc longer than 79 columns warning
Steve Holme [Thu, 18 Apr 2013 19:21:11 +0000 (20:21 +0100)]
url: Fix chksrc longer than 79 columns warning

11 years agourl: Fix incorrect variable type for result code
Steve Holme [Thu, 18 Apr 2013 18:18:02 +0000 (19:18 +0100)]
url: Fix incorrect variable type for result code

11 years agourl: Fix compiler warning
Steve Holme [Thu, 18 Apr 2013 18:14:25 +0000 (19:14 +0100)]
url: Fix compiler warning

signed and unsigned type in conditional expression

11 years agourl: Moved parsing of login details out of parse_url_login()
Steve Holme [Thu, 18 Apr 2013 16:52:05 +0000 (17:52 +0100)]
url: Moved parsing of login details out of parse_url_login()

Separated the parsing of login details from the processing of them in
parse_url_login() ready for use by setstropt_userpwd().

11 years agourl: Re-factored set_userpass() and parse_url_userpass()
Steve Holme [Thu, 18 Apr 2013 16:09:40 +0000 (17:09 +0100)]
url: Re-factored set_userpass() and parse_url_userpass()

Re-factored these functions to reflect their new behaviour following the
addition of login options.

11 years agourl: Reworked URL parsing to allow overriding by CURLOPT_USERPWD
Steve Holme [Thu, 18 Apr 2013 16:02:28 +0000 (17:02 +0100)]
url: Reworked URL parsing to allow overriding by CURLOPT_USERPWD

11 years agomaketgz: make bzip2 creation work with Parallel BZIP2 too
Daniel Stenberg [Thu, 18 Apr 2013 09:13:56 +0000 (11:13 +0200)]
maketgz: make bzip2 creation work with Parallel BZIP2 too

Apparently the previous usage didn't work with that implementation,
while this updated version works with at least both Parallel BZIP2
v1.1.8 and regular bzip "Version 1.0.6, 6-Sept-2010".

11 years agoAdd tests/http_pipe.py to the tarball build
Linus Nielsen Feltzing [Thu, 18 Apr 2013 08:55:41 +0000 (10:55 +0200)]
Add tests/http_pipe.py to the tarball build

11 years agosmtp: Re-factored all perform based functions
Steve Holme [Tue, 16 Apr 2013 18:47:15 +0000 (19:47 +0100)]
smtp: Re-factored all perform based functions

Standardised the naming of all perform based functions to be in the form
smtp_perform_something().

11 years agosmtp: Added description comments to all perform based functions
Steve Holme [Tue, 16 Apr 2013 18:40:54 +0000 (19:40 +0100)]
smtp: Added description comments to all perform based functions

11 years agosmtp: Moved smtp_quit() to be with the other perform functions
Steve Holme [Tue, 16 Apr 2013 18:35:09 +0000 (19:35 +0100)]
smtp: Moved smtp_quit() to be with the other perform functions

11 years agosmtp: Moved smtp_rcpt_to() to be with the other perform functions
Steve Holme [Tue, 16 Apr 2013 18:32:55 +0000 (19:32 +0100)]
smtp: Moved smtp_rcpt_to() to be with the other perform functions

11 years agosmtp: Moved smtp_mail() to be with the other perform functions
Steve Holme [Tue, 16 Apr 2013 18:30:43 +0000 (19:30 +0100)]
smtp: Moved smtp_mail() to be with the other perform functions

11 years agocurl-config: don't output static libs when they are disabled
Wouter Van Rooy [Tue, 16 Apr 2013 13:40:00 +0000 (15:40 +0200)]
curl-config: don't output static libs when they are disabled

Curl-config outputs static libraries even when they are disabled in
configure.

This causes problems with the build of pycurl.

11 years agodocs/libcurl: fix formatting in manpage
Dave Reisner [Tue, 16 Apr 2013 01:46:50 +0000 (03:46 +0200)]
docs/libcurl: fix formatting in manpage

Commit c3ea3eb6 introduced some minor cosmetic errors in
curl_mutli_socket_action(3).

11 years agoAdd extra libs for lib1900 and lib2033 test programs
Paul Howarth [Mon, 15 Apr 2013 09:14:30 +0000 (10:14 +0100)]
Add extra libs for lib1900 and lib2033 test programs

These are needed in cases where clock_gettime is used, from librt.

11 years agoFAQ: mention that the network connection can be monitored
Dan Fandrich [Mon, 15 Apr 2013 20:26:18 +0000 (22:26 +0200)]
FAQ: mention that the network connection can be monitored

Also note the prohibition on sharing handles across threads.

11 years agopop3: Added missing comment for pop3_state_apop_resp()
Steve Holme [Mon, 15 Apr 2013 19:16:28 +0000 (20:16 +0100)]
pop3: Added missing comment for pop3_state_apop_resp()

11 years agosmtp: Updated the coding style of smtp_state_servergreet_resp()
Steve Holme [Mon, 15 Apr 2013 19:11:25 +0000 (20:11 +0100)]
smtp: Updated the coding style of smtp_state_servergreet_resp()

Updated the coding style, in this function, to be consistant with other
response functions rather then performing a hard return on failure.

11 years agopop3: Updated the coding style of pop3_state_servergreet_resp()
Steve Holme [Mon, 15 Apr 2013 19:10:25 +0000 (20:10 +0100)]
pop3: Updated the coding style of pop3_state_servergreet_resp()

Updated the coding style, in this function, to be consistent with other
response functions rather then performing a hard return on failure.

11 years agopop3: Re-factored all perform based functions
Steve Holme [Sun, 14 Apr 2013 08:53:07 +0000 (09:53 +0100)]
pop3: Re-factored all perform based functions

Standardised the naming of all perform based functions to be in the form
pop3_perform_something() following the changes made to IMAP.

11 years agopop3: Added description comments to all perform based functions
Steve Holme [Sun, 14 Apr 2013 08:47:32 +0000 (09:47 +0100)]
pop3: Added description comments to all perform based functions

11 years agopop3: Moved pop3_quit() to be with the other perform functions
Steve Holme [Sun, 14 Apr 2013 08:37:19 +0000 (09:37 +0100)]
pop3: Moved pop3_quit() to be with the other perform functions

11 years agopop3: Moved pop3_command() to be with the other perform functions
Steve Holme [Sun, 14 Apr 2013 08:35:35 +0000 (09:35 +0100)]
pop3: Moved pop3_command() to be with the other perform functions

Started to apply the same tidy up to the POP3 code as applied to the
IMAP code in the 7.30.0 release.

11 years agoRELEASE-NOTES: Removed erroneous spaces
Steve Holme [Sat, 13 Apr 2013 17:35:16 +0000 (18:35 +0100)]
RELEASE-NOTES: Removed erroneous spaces

11 years agoRELEASE-NOTES: synced with 8723cade21fb
Steve Holme [Sat, 13 Apr 2013 15:43:30 +0000 (16:43 +0100)]
RELEASE-NOTES: synced with 8723cade21fb

11 years agosmtp: Added support for ;auth=<mech> in the URL
Steve Holme [Sat, 13 Apr 2013 15:21:58 +0000 (16:21 +0100)]
smtp: Added support for ;auth=<mech> in the URL

Added support for specifying the preferred authentication mechanism in
the URL as per Internet-Draft 'draft-earhart-url-smtp-00'.

11 years agopop3: Reworked authentication type constants
Steve Holme [Sat, 13 Apr 2013 15:14:01 +0000 (16:14 +0100)]
pop3: Reworked authentication type constants

... to use left-shifted values, like those defined in curl.h, rather
than 16-bit hexadecimal values.

11 years agopop3: Small consistency tidy up
Steve Holme [Sat, 13 Apr 2013 15:11:55 +0000 (16:11 +0100)]
pop3: Small consistency tidy up

11 years agopop3: Added support for ;auth=<mech> in the URL
Steve Holme [Sat, 13 Apr 2013 15:09:28 +0000 (16:09 +0100)]
pop3: Added support for ;auth=<mech> in the URL

Added support for specifying the preferred authentication type and SASL
mechanism in the URL as per RFC-2384.

11 years agoimap: Added support for ;auth=<mech> in the URL
Steve Holme [Sat, 13 Apr 2013 14:58:15 +0000 (15:58 +0100)]
imap: Added support for ;auth=<mech> in the URL

Added support for specifying the preferred authentication mechanism in
the URL as per RFC-5092.

11 years agosasl: Reworked SASL mechanism constants
Steve Holme [Sat, 13 Apr 2013 12:29:50 +0000 (13:29 +0100)]
sasl: Reworked SASL mechanism constants

... to use left-shifted values, like those defined in curl.h, rather
than 16-bit hexadecimal values.

11 years agosasl: Added predefined preferred mechanism values
Steve Holme [Sat, 13 Apr 2013 12:11:37 +0000 (13:11 +0100)]
sasl: Added predefined preferred mechanism values

In preparation for the upcoming changes to IMAP, POP3 and SMTP added
preferred mechanism values.

11 years agourl: Added support for parsing login options from the URL
Steve Holme [Sat, 13 Apr 2013 09:49:42 +0000 (10:49 +0100)]
url: Added support for parsing login options from the URL

As well as parsing the username and password from the URL, added support
for parsing the optional options part from the login details, to allow
the following supported URL format:

schema://username:password;options@example.com/path?q=foobar

This will only be used by IMAP, POP3 and SMTP at present but any
protocol that may be given login options in the URL will be able to
add support for them.

11 years agosmtp: Fix compiler warning
Steve Holme [Fri, 12 Apr 2013 23:06:19 +0000 (00:06 +0100)]
smtp: Fix compiler warning

warning: unused variable 'smtp' introduced in commit 73cbd21b5ee6.

11 years agosmtp: Moved parsing of url path into separate function
Steve Holme [Fri, 12 Apr 2013 22:15:51 +0000 (23:15 +0100)]
smtp: Moved parsing of url path into separate function

11 years agoFTP: handle a 230 welcome response
Daniel Stenberg [Mon, 18 Feb 2013 22:40:29 +0000 (23:40 +0100)]
FTP: handle a 230 welcome response

...instead of the 220 we otherwise expect.

Made the ftpserver.pl support sending a custom "welcome" and then
created test 1219 to verify this fix with such a 230 welcome.

Bug: http://curl.haxx.se/mail/lib-2013-02/0102.html
Reported by: Anders Havn

11 years agoconfigure: try pthread_create without -lpthread
Daniel Stenberg [Thu, 11 Apr 2013 14:21:49 +0000 (16:21 +0200)]
configure: try pthread_create without -lpthread

For libc variants without a spearate pthread lib (like bionic), try
using pthreads without the pthreads lib first and only if that fails try
the -lpthread linker flag.

Bug: http://curl.haxx.se/bug/view.cgi?id=1216
Reported by: Duncan

11 years agoFTP: access files in root dir correctly
Daniel Stenberg [Fri, 12 Apr 2013 13:29:28 +0000 (15:29 +0200)]
FTP: access files in root dir correctly

Accessing a file with an absolute path in the root dir but with no
directory specified was not handled correctly. This fix comes with four
new test cases that verify it.

Bug: http://curl.haxx.se/mail/lib-2013-04/0142.html
Reported by: Sam Deane

11 years agopop3: Reworked the function description for Curl_pop3_write()
Steve Holme [Fri, 12 Apr 2013 19:20:27 +0000 (20:20 +0100)]
pop3: Reworked the function description for Curl_pop3_write()

11 years agopop3: Added function description to pop3_parse_custom_request()
Steve Holme [Fri, 12 Apr 2013 19:18:37 +0000 (20:18 +0100)]
pop3: Added function description to pop3_parse_custom_request()

11 years agopop3: Moved utility functions to end of pop3.c
Steve Holme [Fri, 12 Apr 2013 19:16:57 +0000 (20:16 +0100)]
pop3: Moved utility functions to end of pop3.c

11 years agodarwinssl: add TLS session resumption
Nick Zitzmann [Fri, 12 Apr 2013 18:20:10 +0000 (12:20 -0600)]
darwinssl: add TLS session resumption

This ought to speed up additional TLS handshakes, at least in theory.

11 years agoimap: Added function description to imap_parse_custom_request()
Steve Holme [Fri, 12 Apr 2013 17:20:20 +0000 (18:20 +0100)]
imap: Added function description to imap_parse_custom_request()

11 years agoimap: Moved utility functions to end of imap.c (Part 3/3)
Steve Holme [Fri, 12 Apr 2013 17:12:11 +0000 (18:12 +0100)]
imap: Moved utility functions to end of imap.c (Part 3/3)

Moved imap_is_bchar() be with the other utility based functions.

11 years agoimap: Moved utility functions to end of imap.c (Part 2/3)
Steve Holme [Fri, 12 Apr 2013 17:08:09 +0000 (18:08 +0100)]
imap: Moved utility functions to end of imap.c (Part 2/3)

Moved imap_parse_url_path() and imap_parse_custom_request() to the end of the
file allowing all utility functions to be grouped together.

11 years agoimap: Moved utility functions to end of imap.c (Part 1/3)
Steve Holme [Fri, 12 Apr 2013 17:05:53 +0000 (18:05 +0100)]
imap: Moved utility functions to end of imap.c (Part 1/3)

Moved imap_atom() and imap_sendf() to the end of the file allowing all
utility functions to be grouped together.

11 years agoimap: Corrected function description for imap_connect()
Steve Holme [Fri, 12 Apr 2013 17:01:03 +0000 (18:01 +0100)]
imap: Corrected function description for imap_connect()

11 years agotests: prevent test206, test1060, and test1061 from failing
Kamil Dudka [Fri, 12 Apr 2013 12:13:42 +0000 (14:13 +0200)]
tests: prevent test206, test1060, and test1061 from failing

... in case runtests.pl is invoked with non-default -b option

Fixes a regression caused by 1e29d275c643ef6aab7948f0f55a7a9397e56b42.

11 years agolibcurl-share.3: update what it does and does not share.
David Strauss [Thu, 11 Apr 2013 18:36:43 +0000 (20:36 +0200)]
libcurl-share.3: update what it does and does not share.

Update sharing interface documentation to provide exhaustive list of
what it does and does not share.

11 years agoTHANKS: remove duplicated names
Daniel Stenberg [Fri, 12 Apr 2013 10:37:47 +0000 (12:37 +0200)]
THANKS: remove duplicated names

11 years agobump: start working towards next release
Daniel Stenberg [Fri, 12 Apr 2013 09:30:32 +0000 (11:30 +0200)]
bump: start working towards next release

11 years agoTHANKS: added people from the 7.30.0 RELEASE-NOTES
Daniel Stenberg [Fri, 12 Apr 2013 09:30:12 +0000 (11:30 +0200)]
THANKS: added people from the 7.30.0 RELEASE-NOTES

11 years agoRELEASE-NOTES: cleaned up for 7.30 (synced with 5c5e1a1cd20)
Daniel Stenberg [Thu, 11 Apr 2013 22:05:39 +0000 (00:05 +0200)]
RELEASE-NOTES: cleaned up for 7.30 (synced with 5c5e1a1cd20)

Most notable the security advisory:
http://curl.haxx.se/docs/adv_20130412.html

11 years agotest1218: another cookie tailmatch test
Daniel Stenberg [Wed, 10 Apr 2013 11:40:36 +0000 (13:40 +0200)]
test1218: another cookie tailmatch test

... and make 1216 also verify it with a file input

These tests verify commit 3604fde3d3c9b0d, the fix for the "cookie
domain tailmatch" vulnerability. See
http://curl.haxx.se/docs/adv_20130412.html

11 years agocookie: fix tailmatching to prevent cross-domain leakage
YAMADA Yasuharu [Wed, 10 Apr 2013 22:17:15 +0000 (00:17 +0200)]
cookie: fix tailmatching to prevent cross-domain leakage

Cookies set for 'example.com' could accidentaly also be sent by libcurl
to the 'bexample.com' (ie with a prefix to the first domain name).

This is a security vulnerabilty, CVE-2013-1944.

Bug: http://curl.haxx.se/docs/adv_20130412.html

11 years agoEnabled MinGW sync resolver builds.
Guenter Knauf [Thu, 11 Apr 2013 12:05:08 +0000 (14:05 +0200)]
Enabled MinGW sync resolver builds.

11 years agoif2ip.c: fix compiler warning
Yang Tse [Wed, 10 Apr 2013 14:44:54 +0000 (16:44 +0200)]
if2ip.c: fix compiler warning

11 years agoFixed lost OpenSSL output with "-t" - followup.
Guenter Knauf [Tue, 9 Apr 2013 22:20:37 +0000 (00:20 +0200)]
Fixed lost OpenSSL output with "-t" - followup.

The previously applied patch didnt work on Windows; we cant rely
on shell commands like 'echo' since they act diffently on each
platform and each shell.
In order to keep this script platform-independent the code must
only use pure Perl.

11 years agotest1217: verify parsing 257 responses with "rubbish" before path
Daniel Stenberg [Tue, 9 Apr 2013 20:21:49 +0000 (22:21 +0200)]
test1217: verify parsing 257 responses with "rubbish" before path

Test 1217 verifies commit e0fb2d86c9f78, and without that change this
test fails.

11 years agoFTP: handle "rubbish" in front of directory name in 257 responses
Bill Middlecamp [Tue, 9 Apr 2013 20:18:33 +0000 (22:18 +0200)]
FTP: handle "rubbish" in front of directory name in 257 responses

When doing PWD, there's a 257 response which apparently some servers
prefix with a comment before the path instead of after it as is
otherwise the norm.

Failing to parse this, several otherwise legitimate use cases break.

Bug: http://curl.haxx.se/mail/lib-2013-04/0113.html

11 years agoFixed ares-enabled builds with static makefiles.
Guenter Knauf [Tue, 9 Apr 2013 15:44:51 +0000 (17:44 +0200)]
Fixed ares-enabled builds with static makefiles.

11 years agoFixed lost OpenSSL output with "-t".
Guenter Knauf [Tue, 9 Apr 2013 14:59:57 +0000 (16:59 +0200)]
Fixed lost OpenSSL output with "-t".

The OpenSSL pipe wrote to the final CA bundle file, but the encoded PEM
output wrote to a temporary file.  Consequently, the OpenSSL output was
lost when the temp file was renamed to the final file at script finish
(overwriting the final file written earlier by openssl).
Patch posted to the list by Richard Michael (rmichael edgeofthenet org).

11 years agotest1216: test tailmatching cookie domains
Daniel Stenberg [Tue, 9 Apr 2013 13:45:27 +0000 (15:45 +0200)]
test1216: test tailmatching cookie domains

This test is an attempt to repeat the problem YAMADA Yasuharu reported
at http://curl.haxx.se/mail/lib-2013-04/0108.html

11 years agoRELEASe-NOTES: synced with 29fdb2700f797
Daniel Stenberg [Mon, 8 Apr 2013 21:41:00 +0000 (23:41 +0200)]
RELEASe-NOTES: synced with 29fdb2700f797

added "tcpkeepalive on Mac OS X"

11 years agodarwinssl: disable insecure ciphers by default
Nick Zitzmann [Mon, 8 Apr 2013 23:07:20 +0000 (17:07 -0600)]
darwinssl: disable insecure ciphers by default

I noticed that aria2's SecureTransport code disables insecure ciphers such
as NULL, anonymous, IDEA, and weak-key ciphers used by SSLv3 and later.
That's a good idea, and now we do the same thing in order to prevent curl
from accessing a "secure" site that only negotiates insecure ciphersuites.

11 years agotcpkeepalive: Support CURLOPT_TCP_KEEPIDLE on OSX
Robert Wruck [Mon, 8 Apr 2013 21:13:05 +0000 (23:13 +0200)]
tcpkeepalive: Support CURLOPT_TCP_KEEPIDLE on OSX

MacOS X doesn't have TCP_KEEPIDLE/TCP_KEEPINTVL but only a single
TCP_KEEPALIVE (see
http://developer.apple.com/library/mac/#DOCUMENTATION/Darwin/Reference/ManPages/man4/tcp.4.html).
Here is a patch for CURLOPT_TCP_KEEPIDLE on OSX platforms.

11 years agoconfigure: remove CURL_CHECK_FUNC_RECVFROM
Daniel Stenberg [Mon, 8 Apr 2013 20:22:43 +0000 (22:22 +0200)]
configure: remove CURL_CHECK_FUNC_RECVFROM

1 - We don't use the results from the test and we never did. recvfrom()
is only used by the TFTP code and it has not caused any problems.

2 - the CURL_CHECK_FUNC_RECVFROM function is extremely slow

11 years agoRELEASE-NOTES: Corrected duplicate NTLM memory leaks
Steve Holme [Mon, 8 Apr 2013 19:59:50 +0000 (20:59 +0100)]
RELEASE-NOTES: Corrected duplicate NTLM memory leaks

11 years agoRELEASE-NOTES: Removed trailing full stop
Steve Holme [Mon, 8 Apr 2013 19:34:29 +0000 (20:34 +0100)]
RELEASE-NOTES: Removed trailing full stop

11 years agoproxy: make ConnectionExists() check credential of proxyconnections too
Fabian Keil [Sun, 31 Mar 2013 11:26:54 +0000 (13:26 +0200)]
proxy: make ConnectionExists() check credential of proxyconnections too

Previously it only compared credentials if the requested needle
connection wasn't using a proxy. This caused NTLM authentication
failures when using proxies as the authentication code wasn't send on
the connection where the challenge arrived.

Added test 1215 to verify: NTLM server authentication through a proxy
(This is a modified copy of test 67)

11 years agoRELEASE-NOTES: sync with 704a5dfca9
Daniel Stenberg [Mon, 8 Apr 2013 06:43:18 +0000 (08:43 +0200)]
RELEASE-NOTES: sync with 704a5dfca9

11 years agoTODO-RELEASE: cleaned up, not really maintained lately
Daniel Stenberg [Mon, 8 Apr 2013 06:32:10 +0000 (08:32 +0200)]
TODO-RELEASE: cleaned up, not really maintained lately

11 years agoif2ip.c: Fixed another warning: unused parameter 'remote_scope'
Marc Hoersken [Sun, 7 Apr 2013 19:04:39 +0000 (21:04 +0200)]
if2ip.c: Fixed another warning: unused parameter 'remote_scope'

11 years agocookie.c: Made cookie sort function more deterministic
Marc Hoersken [Sun, 7 Apr 2013 08:34:32 +0000 (10:34 +0200)]
cookie.c: Made cookie sort function more deterministic

Since qsort implementations vary with regards to handling the order
of similiar elements, this change makes the internal sort function
more deterministic by comparing path length first, then domain length
and finally the cookie name. Spotted with testcase 62 on Windows.

11 years agocurl_schannel.c: Follow up on memory leak fix ae4558d
Marc Hoersken [Sun, 7 Apr 2013 07:44:29 +0000 (09:44 +0200)]
curl_schannel.c: Follow up on memory leak fix ae4558d

11 years agoRevert "getpart.pm: Strip carriage returns to fix Windows support"
Marc Hoersken [Sat, 6 Apr 2013 22:28:15 +0000 (00:28 +0200)]
Revert "getpart.pm: Strip carriage returns to fix Windows support"

This reverts commit e51b23c925a2721cf7c29b2b376d3d8903cfb067.
As discussed on the mailinglist, this was not the correct approach.

11 years agohttp_negotiate.c: Fixed passing argument from incompatible pointer type
Marc Hoersken [Sat, 6 Apr 2013 22:06:19 +0000 (00:06 +0200)]
http_negotiate.c: Fixed passing argument from incompatible pointer type

11 years agoftp.c: Added missing brackets around ABOR command logic
Marc Hoersken [Sat, 6 Apr 2013 21:11:20 +0000 (23:11 +0200)]
ftp.c: Added missing brackets around ABOR command logic

11 years agosockfilt.c: Fixed detection of client-side connection close
Marc Hoersken [Sat, 6 Apr 2013 21:09:50 +0000 (23:09 +0200)]
sockfilt.c: Fixed detection of client-side connection close

WINSOCK only:
Since FD_CLOSE is only signaled once, it may trigger at the same
time as FD_READ. Data actually being available makes it impossible
to detect that the connection was closed by checking that recv returns
zero. Another recv attempt could block the connection if it was
not closed. This workaround abuses exceptfds in conjunction with
readfds to signal that the connection has actually closed.

11 years agocurl_schannel.c: Fixed memory leak if connection was not successful
Marc Hoersken [Sat, 6 Apr 2013 18:55:27 +0000 (20:55 +0200)]
curl_schannel.c: Fixed memory leak if connection was not successful

11 years agoif2ip.c: Fixed warning: unused parameter 'remote_scope'
Marc Hoersken [Sat, 6 Apr 2013 18:30:13 +0000 (20:30 +0200)]
if2ip.c: Fixed warning: unused parameter 'remote_scope'

11 years agoruntests.pl: Fixed --verbose parameter passed to http_pipe.py
Marc Hoersken [Sat, 6 Apr 2013 18:24:10 +0000 (20:24 +0200)]
runtests.pl: Fixed --verbose parameter passed to http_pipe.py

11 years agosockfilt.c: Reduce CPU load while running under a Windows PIPE
Marc Hoersken [Sat, 6 Apr 2013 17:05:16 +0000 (19:05 +0200)]
sockfilt.c: Reduce CPU load while running under a Windows PIPE

11 years agotftpd.c: Apply sread timeout to the whole data transfer session
Marc Hoersken [Sat, 6 Apr 2013 17:00:42 +0000 (19:00 +0200)]
tftpd.c: Apply sread timeout to the whole data transfer session

11 years agogetpart.pm: Strip carriage returns to fix Windows support
Marc Hoersken [Sat, 6 Apr 2013 16:10:56 +0000 (18:10 +0200)]
getpart.pm: Strip carriage returns to fix Windows support

11 years agoftp tests: libcurl returns CURLE_FTP_ACCEPT_FAILED better now
Daniel Stenberg [Sat, 6 Apr 2013 15:49:58 +0000 (17:49 +0200)]
ftp tests: libcurl returns CURLE_FTP_ACCEPT_FAILED better now

Since commit 57aeabcc1a20f, it handles errors on the control connection
while waiting for the data connection better.

Test 591 and 592 are updated accordingly.

11 years agoFTP: wait on both connections during active STOR state
Daniel Stenberg [Fri, 5 Apr 2013 06:39:24 +0000 (08:39 +0200)]
FTP: wait on both connections during active STOR state

When doing PORT and upload (STOR), this function needs to extract the
file descriptor for both connections so that it will respond immediately
when the server eventually connects back.

This flaw caused active connections to become unnecessary slow but they
would still often work due to the normal polling on a timeout. The bug
also would not occur if the server connected back very fast, like when
testing on local networks.

Bug: http://curl.haxx.se/bug/view.cgi?id=1183
Reported by: Daniel Theron

11 years agotftpd.c: Follow up cleanup and restore of previous sockopt
Marc Hoersken [Sat, 6 Apr 2013 15:18:13 +0000 (17:18 +0200)]
tftpd.c: Follow up cleanup and restore of previous sockopt

11 years agoconnect: treat an interface bindlocal() problem as a non-fatal error
Kim Vandry [Wed, 3 Apr 2013 20:06:51 +0000 (16:06 -0400)]
connect: treat an interface bindlocal() problem as a non-fatal error

I am using curl_easy_setopt(CURLOPT_INTERFACE, "if!something") to force
transfers to use a particular interface but the transfer fails with
CURLE_INTERFACE_FAILED, "Failed binding local connection end" if the
interface I specify has no IPv6 address. The cause is as follows:

The remote hostname resolves successfully and has an IPv6 address and an
IPv4 address.

cURL attempts to connect to the IPv6 address first.

bindlocal (in lib/connect.c) fails because Curl_if2ip cannot find an
IPv6 address on the interface.

This is a fatal error in singleipconnect()

This change will make cURL try the next IP address in the list.

Also included are two changes related to IPv6 address scope:

- Filter the choice of address in Curl_if2ip to only consider addresses
with the same scope ID as the connection address (mismatched scope for
local and remote address does not result in a working connection).

- bindlocal was ignoring the scope ID of addresses returned by
Curl_if2ip . Now it uses them.

Bug: http://curl.haxx.se/bug/view.cgi?id=1189

11 years agotftpd.c: Fixed sread timeout on Windows by setting it manually
Marc Hoersken [Sat, 6 Apr 2013 12:39:56 +0000 (14:39 +0200)]
tftpd.c: Fixed sread timeout on Windows by setting it manually

11 years agoftp.pm: Added tskill to support Windows XP Home
Marc Hoersken [Sat, 6 Apr 2013 10:55:57 +0000 (12:55 +0200)]
ftp.pm: Added tskill to support Windows XP Home

11 years agoruntests.pl: Modularization of MinGW/Msys compatibility functions
Marc Hoersken [Sat, 6 Apr 2013 10:45:05 +0000 (12:45 +0200)]
runtests.pl: Modularization of MinGW/Msys compatibility functions

11 years agoftp.pm: Made Perl testsuite able to handle Windows processes
Marc Hoersken [Sat, 6 Apr 2013 09:56:04 +0000 (11:56 +0200)]
ftp.pm: Made Perl testsuite able to handle Windows processes

11 years agoutil.c: Revert workaround eeefcdf, 6eb56e7 and e3787e8
Marc Hoersken [Sat, 6 Apr 2013 09:55:30 +0000 (11:55 +0200)]
util.c: Revert workaround eeefcdf, 6eb56e7 and e3787e8

11 years agoftp.pm: Made Perl testsuite able to kill Windows processes
Marc Hoersken [Sat, 6 Apr 2013 09:33:55 +0000 (11:33 +0200)]
ftp.pm: Made Perl testsuite able to kill Windows processes

11 years agoutil.c: Follow up cleanup on eeefcdf
Marc Hoersken [Sat, 6 Apr 2013 08:03:43 +0000 (10:03 +0200)]
util.c: Follow up cleanup on eeefcdf

11 years agocpp: use #ifdef __MINGW32__ to avoid compiler complaints
Daniel Stenberg [Fri, 5 Apr 2013 22:55:27 +0000 (00:55 +0200)]
cpp: use #ifdef __MINGW32__ to avoid compiler complaints

... instead of just #if