Daniel Stenberg [Sat, 24 Apr 2010 10:40:00 +0000 (12:40 +0200)]
socks5: please static code analyzer
Make sure we don't call memcpy() if the argument is NULL even
though we also passed a zero length then, as the clang analyzer
whined and we want to limit warnings (even false positives) when
they're this easy to fix.
The change of (char) to (unsigned char) will fix long user names
and passwords on systems that have the char type signed by
default.
Daniel Stenberg [Mon, 19 Apr 2010 15:05:46 +0000 (17:05 +0200)]
parse_filename: strip trailing CRs and LFs
The feature that uses the file name given in a
Content-disposition: header didn't properly skip trailing
carriage returns and linefeed characters from the end of the file
name when it was given without quotes.
Daniel Stenberg [Fri, 16 Apr 2010 13:29:25 +0000 (15:29 +0200)]
SSL_RECV: EOF is not an error here
The recent overhaul of the SSL recv function made this treat a
zero returned from gnutls_record_recv() as an error, and this
caused our HTTPS test cases to fail. We leave it to upper layer
code to detect if an EOF is a problem or not.
Paul Howarth [Fri, 16 Apr 2010 13:09:32 +0000 (15:09 +0200)]
configure: GSSAPI detection on ancient Linux distros
On some ancient distributions such as RHEL-3, <gssapi/gssapi_krb5.h> needs
to be processed after <gssapi/gssapi.h>, but does not include it itself.
This patch checks for <gssapi/gssapi.h> first and then includes it
in the test for <gssapi/gssapi_krb5.h>, resolving the problem.
Without the patch, <gssapi/gssapi_krb5.h> is "present but cannot be
compiled".
Daniel Stenberg [Fri, 16 Apr 2010 13:02:08 +0000 (15:02 +0200)]
KRB5: use given host name instead of reverse lookup'ed name
This code would previously use dns_entry->addr->ai_canonname
instead of the given host name, which caused us grief and
problems since not all our resolver options do the reverse lookup
and I would also guess that it caused problems with KRB5/GSS with
virtual name-based hosts. Now the host name from the URL is used.
Daniel Stenberg [Thu, 15 Apr 2010 11:04:01 +0000 (13:04 +0200)]
Curl_ipv4_resolve_r: only set AI_CANONNAME when needed
As reported in bug report #2987196, the code for ipv6 already did
the setting of this bit correctly so we copied that logic into
the Curl_ipv4_resolve_r() function as well. KRB code is the only
code we know that might need the cannonical name so only resolve
it for such requests!
Daniel Stenberg [Mon, 12 Apr 2010 09:08:06 +0000 (11:08 +0200)]
refer to CURLMOPT_TIMERFUNCTION for multi_socket users
curl_multi_timeout(3) is simply the wrong function to use
if you're using the multi_socket API and this document now
states this pretty clearly to help guiding users.
Daniel Stenberg [Sun, 11 Apr 2010 09:35:33 +0000 (11:35 +0200)]
modified to use the git file, not cvs
I've done this blindly, and the last piece that works with ares
should possibly be done differently now that c-ares isn't a
subtree within the curl tree anymore...
Daniel Stenberg [Fri, 9 Apr 2010 14:54:52 +0000 (16:54 +0200)]
FTP quote commands prefixed with '*' now can fail without aborting
Prefixing the FTP quote commands with an asterisk really only
worked for the postquote actions. This is now fixed and test case
227 has been extended to verify.
Daniel Stenberg [Thu, 1 Apr 2010 20:39:15 +0000 (22:39 +0200)]
fix SFTP download hang
Matt Wixson found and fixed a bug in the SCP/SFTP area where the
code treated a 0 return code from libssh2 to be the same as
EAGAIN while in reality it isn't. The problem caused a hang in
SFTP transfers from a MessageWay server.
Ben Greear [Sun, 28 Mar 2010 21:49:00 +0000 (23:49 +0200)]
pop3: Get message listing if no mailbox in URL
If you pass a URL to pop3 that does not contain a message ID as
part of the URL, it will currently ask for 'INBOX' which just
causes the pop3 server to return an error.
The change makes libcurl treat en empty message ID as a request
for LIST (list of pop3 message IDs). User's code could then
parse this and download individual messages as desired.
Ben Greear [Sat, 27 Mar 2010 22:00:51 +0000 (23:00 +0100)]
allow user+password in the URL for all protocols
Ben Greear brought a patch that from now on allows all protocols
to specify name and user within the URL, in the same manner HTTP
and FTP have been allowed to in the past - although far from all
of the libcurl supported protocols actually have that feature in
their URL definition spec.