Daniel Stenberg
2e42b0a252
Based on Maxim Perenesenko's patch, we now do SOCKS5 operations and let the
...
proxy do the host name resolving and only if --socks5ip (or
CURLOPT_SOCKS5_RESOLVE_LOCAL) is used we resolve the host name locally and
pass on the IP address only to the proxy.
2008-01-04 23:01:00 +00:00
Gisle Vanem
083d3190e5
'false' and 'true' are not built-ins on most compilers.
...
Use TRUE/FALSE from setup_once.h.
2008-01-03 15:18:27 +00:00
Daniel Stenberg
d9023c16ab
- I fixed two cases of missing return code checks when handling chunked
...
decoding where a write error (or abort return from a callback) didn't stop
libcurl's processing.
2008-01-02 22:30:34 +00:00
Daniel Stenberg
a46b40b7fd
Richard Atterer brought a patch that added support for SOCKS4a proxies, which
...
is an inofficial PROXY4 variant that sends the hostname to the proxy instead
of the resolved address (which is already supported by SOCKS5). --socks4a is
the curl command line option for it and CURLOPT_PROXYTYPE can now be set to
CURLPROXY_SOCKS4A as well.
2008-01-02 21:40:11 +00:00
Daniel Stenberg
04e4d9a0b3
Dmitry Kurochkin mentioned a flaw
...
(http://curl.haxx.se/mail/lib-2007-12/0252.html ) in detect_proxy() which
failed to set the bits.proxy variable properly when an environment variable
told libcurl to use a http proxy.
2007-12-26 23:29:35 +00:00
Gunter Knauf
4e8c4fc80b
added missing semicolon fromn last commit.
2007-12-25 13:26:01 +00:00
Daniel Stenberg
fc1d1ea934
Gary Maxwell filed bug report #1856628
...
(http://curl.haxx.se/bug/view.cgi?id=1856628 ) and provided a fix for the
(small) memory leak in the SSL session ID caching code. It happened when a
previous entry in the cache was re-used.
2007-12-24 23:45:48 +00:00
Yang Tse
07a1857d59
MSVC 9.0 (VS2008) does not support Windows build targets prior to WinXP,
...
and makes wrong asumptions of build target when it isn't specified. So,
if no build target has been defined we will target WinXP when building
with MSVC 9.0 (VS2008).
2007-12-18 18:08:19 +00:00
Yang Tse
f4ffa85f60
pollfd struct and WSA_poll fixes for Windows Vista already present in CVS
2007-12-18 10:36:32 +00:00
Daniel Stenberg
bcd7d03b3b
Mateusz Loskot pointed out that VC++ 9.0 (2008) has the pollfd struct and
...
defines in the SDK somehow differently so we have to add a define to the
config-win32.h file to make select.h compile nicely.
2007-12-17 21:19:42 +00:00
Daniel Stenberg
7b1a22147e
David Wright filed bug report #1849764
...
(http://curl.haxx.se/bug/view.cgi?id=1849764 ) with an included fix. He
identified a problem for re-used connections that previously had sent
Expect: 100-continue and in some situations the subsequent POST (that didn't
use Expect:) still had the internal flag set for its use. David's fix (that
makes the setting of the flag in every single request unconditionally) is
fine and is now used!
2007-12-13 10:00:06 +00:00
Daniel Stenberg
b0b40d9a00
Andrew Moise filed bug report #1847501
...
(http://curl.haxx.se/bug/view.cgi?id=1847501 ) and pointed out a memcpy()
that should be memmove() in the convert_lineends() function.
2007-12-09 22:31:53 +00:00
Gisle Vanem
2b314064ae
Removed building 'libcurl_wc.lib' as this isn't a static-library
...
in the common sense. Renamed 'OBJ_DIR' to 'WC_Win32.obj'.
2007-12-09 09:44:05 +00:00
Daniel Stenberg
662bee7193
All static functions that were previously name Curl_* something no longer
...
use that prefix as we use that prefix only for library-wide internal global
symbols.
2007-12-08 22:50:55 +00:00
Daniel Stenberg
7d3ea12b62
Spacen Jasset reported a problem with doing POST (with data read with a
...
callback) over a proxy when NTLM is used as auth with the proxy. The bug
also concerned Digest and was limited to using callback only. Spacen worked
with us to provide a useful patch. I added the test case 547 and 548 to
verify two variations of POST over proxy with NTLM.
2007-12-05 21:20:14 +00:00
Yang Tse
8fa599215b
Fix compiler warning: variable may be used uninitialized
2007-12-04 00:15:03 +00:00
Daniel Stenberg
5c447f2499
Bug report #1842029 ( http://curl.haxx.se/bug/view.cgi?id=1842029 ) identified
...
a problem with SSL session caching that prevent it from working, and the
associated fix!
2007-12-03 11:48:09 +00:00
Daniel Stenberg
2be50baf97
Now libcurl (built with OpenSSL) doesn't return error anymore if the remote
...
SSL-based server doesn't present a certificate when the request is told to
ignore certificate verification anyway.
2007-12-03 11:39:27 +00:00
Daniel Stenberg
1c93e75375
Michal Marek introduced CURLOPT_PROXY_TRANSFER_MODE which is used to control
...
the appending of the "type=" thing on FTP URLs when they are passed to a
HTTP proxy. Some proxies just don't like that appending (which is done
unconditionally in 7.17.1), and some proxies treat binary/ascii transfers
better with the appending done!
2007-12-02 23:38:23 +00:00
Daniel Stenberg
45a2240ead
A bug report on the curl-library list showed a HTTP Digest session going on
...
with a 700+ letter nonce. Previously libcurl only support 127 letter ones
and now I bumped it to 1023.
2007-11-29 22:14:48 +00:00
Daniel Stenberg
f75ba55b51
Fixed the resumed FTP upload loop to not require that the read callback
...
returns a full buffer on each invoke.
2007-11-29 22:14:33 +00:00
Daniel Stenberg
46e6115d72
include the libssh2 return code in the output for these failures to ease
...
debugging
2007-11-29 11:25:10 +00:00
Daniel Stenberg
162c039e9d
reqdata doesn't exist anymore and the path moved to the UrlState struct
2007-11-24 23:18:21 +00:00
Daniel Stenberg
13648f8ccd
struct HandleData is now called struct SingleRequest, and is only for data that
...
is inited at the start of the DO action. I removed the Curl_transfer_keeper
struct completely, and I had to move out a few struct members (that had to
be set before DO or used after DONE) to the UrlState struct. The SingleRequest
struct is accessed with SessionHandle->req.
One of the biggest reasons for doing this was the bunch of duplicate struct
members in HandleData and Curl_transfer_keeper since it was really messy to
keep track of two variables with the same name and basically the same purpose!
2007-11-24 23:16:55 +00:00
Daniel Stenberg
cb04619de2
Make the do_complete() function not get called until the DO actually is
...
compelete, which bascially means when used with the multi interface
2007-11-21 22:37:55 +00:00
Daniel Stenberg
b6575ce0b0
While inspecting the Negotiate code, I noticed how the proxy auth was using
...
the same state struct as the host auth, so both could never be used at the
same time! I fixed it (without being able to check) to use two separate
structs to allow authentication using Negotiate on host and proxy
simultanouesly.
2007-11-20 23:17:08 +00:00
Daniel Stenberg
86956c2261
white space changes only to clean up indent and source width
2007-11-20 23:02:58 +00:00
Daniel Stenberg
ef6dfdc7fd
remove the unconditional enabling of cookies if you set a share to use!
2007-11-20 22:59:10 +00:00
Daniel Stenberg
f3b85ef79d
a bunch of new comments
2007-11-20 22:57:24 +00:00
Daniel Stenberg
2f928797cf
fix the treatment of the parameter-based precision, as in "%.*s%s" as
...
previously the second %s would wrongly get the numerical argument that is used
for the variable precision for the first %s...
2007-11-20 10:03:33 +00:00
Daniel Stenberg
0561bffab3
I think this is the right fix for other non-OpenSSL libs, based on the NSS fix
...
from the other day. It is time to setup the internal SSL libs and treat them
with a "handler" struct similar to how we deal with the protocols these days...
2007-11-19 09:24:24 +00:00
Gunter Knauf
5be00c95a7
removed now obsolete defines;
...
updated external library versions to latest.
2007-11-18 22:48:39 +00:00
Daniel Stenberg
c80b9c3778
Rob Crittenden fixed SSL connections with NSS done with the multi-interface
2007-11-18 09:45:05 +00:00
Yang Tse
4f05613fbb
Fix unsigned integral math check in add_buffer_send()
2007-11-16 01:19:46 +00:00
Daniel Stenberg
22e52ddd6e
Ates Goral identified a problem in http.c:add_buffer_send() when a debug
...
callback was used, as it could wrongly pass on a bad size for the outgoing
HTTP header. The bad size would be a very large value as it was a wrapped
size_t content. This happened when the whole HTTP request failed to get sent
in one single send. http://curl.haxx.se/mail/lib-2007-11/0165.html
2007-11-15 23:42:21 +00:00
Daniel Stenberg
1125d45397
removed unnecessary check from add_buffer_send() that only was made within
...
#ifdef CURL_DOES_CONVERSIONS anyway! I turned it into a DEBUGASSERT() instead.
2007-11-15 23:30:59 +00:00
Daniel Stenberg
50feea3eef
Rearranged code and changed Curl_readwrite_init() and Curl_pre_readwrite() into
...
do_init() and do_complete() which now are called first and last in the DO
function. It simplified the flow in multi.c and the functions got more
sensible names!
2007-11-15 21:45:45 +00:00
Daniel Stenberg
4e731a0189
Make the Transfer() function return earlier without doing any initializations
...
for the cases where there's nothing to do in here, like for SFTP directory
listings that already is complete when this function gets called. The init
stuff clears byte counters which isn't really desired.
2007-11-15 11:03:02 +00:00
Daniel Stenberg
5c8b973d4f
use the existing variable instead
2007-11-14 22:44:30 +00:00
Daniel Stenberg
b22e03b2b2
Fix how TFTP connections are treated when re-used, if the SessionHandle has
...
been used for other protocols in between. I found this when test 2004 started
to fail for me!
2007-11-14 22:41:42 +00:00
Yang Tse
a2926ebe7c
Fix a variable potential wrapping in add_buffer() when using absolutely
...
huge send buffer sizes
2007-11-14 00:48:11 +00:00
Daniel Stenberg
c508d70258
Fixed a remaining problem with doing SFTP directory listings on a re-used
...
persistent connection. Mentioned by Immanuel Gregoire on the mailing list.
2007-11-12 23:04:44 +00:00
Daniel Stenberg
f5971f54ff
comment language
2007-11-12 21:42:20 +00:00
Daniel Stenberg
c5b16d4468
Bug report #1830637 ( http://curl.haxx.se/bug/view.cgi?id=1830637 ), which was
...
forwarded from the Gentoo bug tracker by Daniel Black and was originally
submitted by Robin Johnson, pointed out that libcurl would do bad memory
references when it failed and bailed out before the handler thing was
setup. My fix is not done like the provided patch does it, but instead I
make sure that there's never any chance for a NULL pointer in that struct
member.
2007-11-12 21:38:43 +00:00
Daniel Stenberg
3c71a1bab7
oops, fixed build when CURL_LIBSSH2_DEBUG is defined
2007-11-12 09:24:05 +00:00
Yang Tse
9a39839a43
Some versions of winsock2.h have pollfd struct and constants
2007-11-10 04:23:15 +00:00
Yang Tse
e87c996fe0
Fix compiler warning: integral size mismatch in argument
2007-11-08 19:28:25 +00:00
Yang Tse
32195c673d
Define WIN32 when build target is Win32 API.
...
This also defines it for WinCE even though it is a subset of WIN32.
2007-11-08 18:13:54 +00:00
Yang Tse
b99a61c5b0
Fix compiler warning: may be used uninitialized
2007-11-08 16:43:01 +00:00
Daniel Stenberg
a29471d0f7
spell!
2007-11-08 10:25:23 +00:00
Daniel Stenberg
ba6f20a244
Bug report #1823487 ( http://curl.haxx.se/bug/view.cgi?id=1823487 ) pointed
...
out that SFTP requests didn't use persistent connections. Neither did SCP
ones. I gave the SSH code a good beating and now both SCP and SFTP should
use persistent connections fine. I also did a bunch for indent changes as
well as a bug fix for the "keyboard interactive" auth.
2007-11-08 10:22:49 +00:00
Yang Tse
dee3844f13
MSVC versions prior to VS2005 do not complain about portable C functions
2007-11-07 18:18:42 +00:00
Daniel Stenberg
cbd1a77ec2
if () => if()
...
while () => while()
and some other minor re-indentings
2007-11-07 09:21:35 +00:00
Dan Fandrich
33f7ac06c3
Improved telnet support by drastically reducing the number of write
...
callbacks needed to pass a buffer to the user. Instead one per byte it
is now as little as one per segment.
2007-11-07 05:52:03 +00:00
Gisle Vanem
66e4d391d3
Added prototype for _strtoi64().
2007-11-06 16:20:54 +00:00
Gisle Vanem
caf880be18
Constified from arguments.
2007-11-06 16:20:04 +00:00
Daniel Stenberg
ad6e28073c
removed space after if and while before the parenthesis for better source code
...
consistency
2007-11-05 09:45:09 +00:00
Daniel Stenberg
b9a7f4e502
Move connection-oriented variables from the SessionHandle struct to the
...
connectdata struct. This will in theory enable us to do persistent connections
with SCP+SFTP, but currently the state machine always (and wrongly) cleanup
everything in the 'done' action instead of in 'disconnect'. Also did a bunch
of indent fixes, if () => if() and a few other source cleanups like added
comments etc.
2007-11-05 09:30:45 +00:00
Daniel Stenberg
51009a40b4
make sure the code deals with failures on the DO_MORE state properly
2007-11-03 14:44:38 +00:00
Daniel Stenberg
2ec8f77f21
avoid setting up a transfer when the state machine failed previously
2007-11-02 23:34:00 +00:00
Daniel Stenberg
d34fe06fb0
minor re-indent
2007-11-01 21:43:56 +00:00
Gisle Vanem
c56c4a0a47
Add support for LDAP urls. Allthough the OpenWatcom
...
headers <winlap.h> and <winber.h> defines wrong calling convention.
2007-10-31 10:58:51 +00:00
Gisle Vanem
45064c5778
Added optional use of zlib (USE_ZLIB=1).
...
Use a response-file for the C-compiler.
2007-10-31 10:20:48 +00:00
Dan Fandrich
59b05ac383
Fixed an OOM problem with file: URLs
...
Moved Curl_file_connect into the protocol handler struct.
2007-10-30 23:00:40 +00:00
Dan Fandrich
0f77fe55b6
Reverted the const change--what was I thinking?
2007-10-29 20:57:03 +00:00
Dan Fandrich
68ee002ad0
Made some pointers const
2007-10-29 18:32:20 +00:00
Daniel Stenberg
e5f1499f62
let 7.17.1 be version-info 4:1:0
2007-10-29 10:19:07 +00:00
Gisle Vanem
848f40fd65
OpenWatcom cannot use wldap32.lib (wrong calling convention?).
...
Added generation of dummy ca-bundle.h. Sorted objects.
2007-10-28 12:02:20 +00:00
Dan Fandrich
d3ee83747c
Fixed a valgrind uninitialized variable error.
2007-10-26 19:26:41 +00:00
Yang Tse
07dbfa25a0
typecast to prevent compiler warning
2007-10-26 01:12:33 +00:00
Daniel Stenberg
6a17cae4f6
Made libcurl built with NSS possible to ignore the peer verification.
...
Previously it would fail if the ca bundle wasn't present, even if the code
ignored the verification results.
2007-10-25 21:08:55 +00:00
Daniel Stenberg
4b96ac504c
prevent compiler warnings about shadowing and one case of unused variable
2007-10-25 20:54:46 +00:00
Daniel Stenberg
ca67dcbc05
Don't assume there's a sessionhandle around when a connection is disconnected,
...
so do the data->reqdata.current_conn assignment when we know there is an easy
handle existing! Fixes the valgrind report on test 509.
2007-10-25 09:41:35 +00:00
Daniel Stenberg
9dbc2c827d
fix the check
2007-10-25 09:34:16 +00:00
Daniel Stenberg
91e27ce755
Fixed a TFTP memory leak. Enabled test 2003 to verify this.
2007-10-25 07:47:38 +00:00
Daniel Stenberg
8997d258f7
Curl_ftp_disconnect() no longer relies on anything in the reqdata struct. That
...
was even mentioned to be bad in a comment! Should make test 2000 and 2001 work
fine.
Also, freedirs() now take a ftp_conn struct pointer which saves some extra
unnecessary variable assignments.
2007-10-24 21:14:11 +00:00
Daniel Stenberg
a3f958aaaa
added clarifying comment
2007-10-24 21:09:59 +00:00
Yang Tse
08c5e2a194
Windows build targets have socklen_t definition in ws2tcpip.h but some
...
versions of ws2tcpip.h do not have the definition. It seems that when
the socklen_t definition is missing from ws2tcpip.h the definition for
INET_ADDRSTRLEN is also missing, and that when one definition is present
the other one also is available.
2007-10-24 14:39:07 +00:00
Daniel Stenberg
949ff9715a
Bug report #1812190 ( http://curl.haxx.se/bug/view.cgi?id=1812190 ) points out
...
that libcurl tried to re-use connections a bit too much when using non-SSL
protocols tunneled over a HTTP proxy.
2007-10-23 21:00:51 +00:00
Yang Tse
b9a305983f
File is not a protocol that can deal with "persistancy"
2007-10-23 15:16:46 +00:00
Yang Tse
e550df675a
Fix compiler warning: subscript has type `char'
2007-10-23 10:14:24 +00:00
Daniel Stenberg
5b358603bd
Michal Marek forwarded the bug report
...
https://bugzilla.novell.com/show_bug.cgi?id=332917 about a HTTP redirect to
FTP that caused memory havoc. His work together with my efforts created two
fixes:
#1 - FTP::file was moved to struct ftp_conn, because is has to be dealt with
at connection cleanup, at which time the struct HandleData could be
used by another connection.
Also, the unused char *urlpath member is removed from struct FTP.
#2 - provide a Curl_reset_reqproto() function that frees
data->reqdata.proto.* on connection setup if needed (that is if the
SessionHandle was used by a different connection).
2007-10-22 15:05:35 +00:00
Daniel Stenberg
1056dc9a26
Bug report #1815530 ( http://curl.haxx.se/bug/view.cgi?id=1815530 ) points out
...
that specifying a proxy with a trailing slash didn't work (unless it also
contained a port number).
2007-10-22 09:25:45 +00:00
Yang Tse
7fe89c5d29
We use this ZERO_NULL to avoid picky compiler warnings,
...
when assigning a NULL pointer to a function pointer var.
2007-10-20 15:47:16 +00:00
Yang Tse
5c8fc7dce9
Fix compiler warning: conversion from "int" to "unsigned short" may lose significant bits
2007-10-20 15:11:51 +00:00
Patrick Monnerat
8f5909b664
Allow CURLOPT_COPYPOSTFIELDS with explicit data size = 0
2007-10-18 10:54:49 +00:00
Dan Fandrich
bef2e7f2ff
Avoid a NULL pointer dereference in an OOM condition.
2007-10-18 01:04:57 +00:00
Yang Tse
0164f0cf81
Fix overflow detection, take four. Avoiding zero size malloc.
2007-10-17 19:29:06 +00:00
Yang Tse
e7387f7557
Fix overflow detection, thanks to Patrick Monnerat detecting test
...
failure condition: http://curl.haxx.se/mail/lib-2007-10/0152.html
2007-10-17 18:06:32 +00:00
Yang Tse
92433e596b
We use this ZERO_NULL to avoid picky compiler warnings,
...
when assigning a NULL pointer to a function pointer var.
2007-10-17 16:58:32 +00:00
Yang Tse
949073d448
Fix compiler warning: signed and unsigned type in conditional expression
2007-10-17 00:44:48 +00:00
Yang Tse
85877dae9a
Fix compiler warning: comparison between signed and unsigned
2007-10-17 00:10:00 +00:00
Yang Tse
c6ef31955a
ANSI C compliant overflow check
2007-10-16 23:32:02 +00:00
Dan Fandrich
65ba6e3337
Fixed compiler warning re: unused variable `bigsize'
2007-10-16 18:09:57 +00:00
Patrick Monnerat
a005243908
Fix dynamic CURLOPT_POSTFIELDS bug: back to static.
...
CURLOPT_COPYPOSTFIELDS option added for dynamic.
Fix some OS400 features.
2007-10-15 18:32:01 +00:00
Dan Fandrich
001a2d9b67
Fix LDAP compile error when LDAP is not available.
...
Fixed a typo in the LDAP configure code and made sure NULL is defined
in a test programs that need it.
2007-10-15 16:24:46 +00:00
Dan Fandrich
61ffcd7815
Made a few more functions static with the protocol handler table in place.
2007-10-13 00:47:53 +00:00
Daniel Stenberg
a9f47b9364
another Curl_handler fix, the #ifdefs got a bit mixed up...
2007-10-12 20:53:43 +00:00
Dan Fandrich
7831c1ae44
Fixed a few compile errors and warnings.
2007-10-12 18:49:14 +00:00
Patrick Monnerat
07b6e7363d
Added per-protocol callback static tables, replacing callback ptr storage
...
in the connectdata structure by a single handler table ptr.
2007-10-12 13:36:37 +00:00
Yang Tse
43e8f00861
lber.h needs to be included since ldap.h might not include it
2007-10-09 23:51:55 +00:00
Gunter Knauf
0cc9122093
added check for MSVC6 standard PSDK and bail out since insufficient for LDAP support with current code.
2007-10-09 23:25:58 +00:00
Gunter Knauf
50b3545ada
fix socklen_t for MSVC6 & 7.
2007-10-09 22:10:17 +00:00
Gunter Knauf
baac8065cf
added two more module dependencies for LDAPS.
2007-10-09 20:15:27 +00:00
Daniel Stenberg
08fd1829e0
Known bug #47 , which confused libcurl if doing NTLM auth over a proxy with
...
a response that was larger than 16KB is now improved slightly so that now
the restriction at 16KB is for the headers only and it should be a rare
situation where the response-headers exceed 16KB. Thus, I consider #47 fixed
and the header limitation is now known as known bug #48 .
2007-10-07 08:28:03 +00:00
Daniel Stenberg
4449bd9b4d
Michael Wallner made the CULROPT_COOKIELIST option support a new magic
...
string: "FLUSH". Using that will cause libcurl to flush its cookies to the
CURLOPT_COOKIEJAR file.
2007-10-05 14:37:33 +00:00
Daniel Stenberg
67d94514b0
Kim Rinnewitz reported that --local-port didn't work with TFTP transfers.
...
This happened because the tftp code always uncondionally did a bind()
without caring if one already had been done and then it failed. I wrote a
test case (1009) to verify this, but it is a bit error-prone since it will
have to pick a fixed local port number and since the tests are run on so
many different hosts in different situations I add it in disabled state.
2007-10-04 10:01:41 +00:00
Yang Tse
a11c8a6ea0
Cleanup no longer used macros
2007-10-03 16:58:10 +00:00
Yang Tse
2858935187
Fix compiler warning: local variable may be used without having been initialized
2007-10-03 16:26:56 +00:00
Yang Tse
3f3a38f9c6
Fix issue related with the use of ares_timeout() result.
2007-10-03 13:19:34 +00:00
Daniel Stenberg
4bf28cb904
exported symbols must use lowercase "curl_", and I also fixed two compiler
...
warnings, one C99 thing and the bad pointer sent to the callback
2007-10-03 08:58:40 +00:00
Daniel Stenberg
ce1cfcb7a6
Alexey Pesternikov introduced CURLOPT_OPENSOCKETFUNCTION and
...
CURLOPT_OPENSOCKETDATA to set a callback that allows an application to replace
the socket() call used by libcurl. It basically allows the app to change
address, protocol or whatever of the socket. (I also did some whitespace
indent/cleanups in lib/url.c which kind of hides some of these changes, sorry
for mixing those in.)
2007-10-03 08:45:00 +00:00
Daniel Stenberg
ce81cd21d3
I renamed the CURLE_SSL_PEER_CERTIFICATE error code to
...
CURLE_PEER_FAILED_VERIFICATION (standard CURL_NO_OLDIES style), and made this
return code get used by the previous SSH MD5 fingerprint check in case it
fails.
2007-10-03 08:07:50 +00:00
Daniel Stenberg
51c6a5d43b
Based on a patch brought by Johnny Luong, libcurl now offers
...
CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 and the curl tool --hostpubmd5. They both make
the SCP or SFTP connection verify the remote host's md5 checksum of the public
key before doing a connect, to reduce the risk of a man-in-the-middle attack.
2007-10-03 08:00:42 +00:00
Yang Tse
08b9f73219
Fix memory leak under low memory conditions.
2007-10-02 19:19:47 +00:00
Yang Tse
048bfeaaef
Fix compiler warning
2007-10-02 15:26:30 +00:00
Yang Tse
a137109a0c
<winber.h> needed for Windows LDAP client 32 API support
2007-10-02 14:48:38 +00:00
Yang Tse
17c01d21a9
Linking with wldap32.lib needed for Windows LDAP client 32 API support
2007-10-02 14:26:04 +00:00
Daniel Stenberg
119364741e
known bug #46 : chunked-encoded CONNECT responses from a http proxy now works.
...
Added test case 1008 to verify. Note that #47 is still there.
2007-10-02 10:21:36 +00:00
Daniel Stenberg
ec08e2f9f2
Alex Fishman reported a curl_easy_escape() problem that was made the
...
function do wrong on all input bytes that are >= 0x80 (decimal 128) due to a
signed / unsigned mistake in the code. I fixed it and added test case 543 to
verify.
2007-09-30 22:40:24 +00:00
Daniel Stenberg
f58ba5ab1c
Immanuel Gregoire fixed a problem with persistent transfers over SFTP - the
...
previous proto struct was kept.
2007-09-29 21:34:34 +00:00
Daniel Stenberg
2c105af910
Adapted the c-ares code to the API change c-ares 1.5.0 brings in the
...
notifier callback(s).
2007-09-28 21:48:28 +00:00
Daniel Stenberg
bb667c8ac6
rename variable to prevent shadow warning
2007-09-28 21:45:05 +00:00
Dan Fandrich
8388366849
Renamed a variable to avoid shadowing a global declarations.
2007-09-28 18:47:59 +00:00
Dan Fandrich
0819c3a8cf
Don't strdup an empty string
2007-09-27 18:39:10 +00:00
Dan Fandrich
ad05b22de3
Renamed a few variables to avoid shadowing global declarations.
2007-09-27 18:12:03 +00:00
Daniel Stenberg
a4d6611d26
a name resolve that times out is still a failed name resolve
2007-09-27 12:05:39 +00:00
Dan Fandrich
0bd2d54814
Renamed a few variables to avoid shadowing global declarations.
2007-09-27 02:45:58 +00:00
Dan Fandrich
16b95fc773
Enabled a few more gcc warnings with --enable-debug. Renamed a few
...
variables to avoid shadowing global declarations.
2007-09-27 01:45:22 +00:00
Yang Tse
9c5cd6c413
Fix compiler warning: the address of 'env' will always evaluate as 'true'
2007-09-27 00:58:41 +00:00
Daniel Stenberg
fd4cf78f36
Philip Langdale provided the new CURLOPT_POST301 option for
...
curl_easy_setopt() that alters how libcurl functions when following
redirects. It makes libcurl obey the RFC2616 when a 301 response is received
after a non-GET request is made. Default libcurl behaviour is to change
method to GET in the subsequent request (like it does for response code 302
- because that's what many/most browsers do), but with this CURLOPT_POST301
option enabled it will do what the spec says and do the next request using
the same method again. I.e keep POST after 301.
The curl tool got this option as --post301
Test case 1011 and 1012 were added to verify.
2007-09-26 12:44:59 +00:00
Daniel Stenberg
a6315359d7
Max Katsev reported that when doing a libcurl FTP request with
...
CURLOPT_NOBODY enabled but not CURLOPT_HEADER, libcurl wouldn't do TYPE
before it does SIZE which makes it less useful. I walked over the code and
made it do this properly, and added test case 542 to verify it.
2007-09-26 12:00:01 +00:00
Dan Fandrich
966130132f
Make glibc define the prototype for strcasestr
2007-09-25 17:33:56 +00:00
Dan Fandrich
bdfeaa0f95
#ifdef out a few more functions when SSL is disabled.
2007-09-25 06:45:05 +00:00
Dan Fandrich
c478200766
Use a native strcasestr() if found.
2007-09-25 06:43:58 +00:00
Daniel Stenberg
775f86cb5a
Immanuel Gregoire fixed KNOWN_BUGS #44 : --ftp-method nocwd did not handle
...
URLs ending with a slash properly (it should list the contents of that
directory). Test case 351 brought back and also test 1010 was added.
2007-09-24 21:47:35 +00:00
Daniel Stenberg
015d5869d7
Mark Davies fixed Negotiate authentication over proxy, and also introduced
...
the --proxy-negotiate command line option to allow a user to explicitly
select it.
2007-09-21 11:05:31 +00:00
Daniel Stenberg
8c3f40ee32
Rob Crittenden provided an NSS update with the following highlights:
...
o It looks for the NSS database first in the environment variable SSL_DIR,
then in /etc/pki/nssdb, then it initializes with no database if neither of
those exist.
o If the NSS PKCS#11 libnspsem.so driver is available then PEM files may be
loaded, including the ca-bundle. If it is not available then only
certificates already in the NSS database are used.
o Tries to detect whether a file or nickname is being passed in so the right
thing is done
o Added a bit of code to make the output more like the OpenSSL module,
including displaying the certificate information when connecting in
verbose mode
o Improved handling of certificate errors (expired, untrusted, etc)
The libnsspem.so PKCS#11 module is currently only available in Fedora
8/rawhide. Work will be done soon to upstream it. The NSS module will work
with or without it, all that changes is the source of the certificates and
keys.
2007-09-18 22:21:54 +00:00
Daniel Stenberg
45fd6685bd
Immanuel pointed out that public key SSH auth failed if no public/private
...
key was specified and there was no HOME environment variable, and then it
didn't continue to try the other auth methods. Now it will instead try to
get the files id_dsa.pub and id_dsa from the current directory if none of
the two conditions were met.
2007-09-18 21:14:28 +00:00
Gunter Knauf
7ac7c119be
added a define for Win32 to detect already defined ssize_t.
2007-09-18 18:18:34 +00:00
Daniel Stenberg
e04151ed76
Michal Marek made libcurl automatically append ";type=<a|i>" when using HTTP
...
proxies for FTP urls.
2007-09-15 21:14:12 +00:00
Gunter Knauf
b41e65a8e3
fixed ldap support for winldap.
2007-09-15 20:03:03 +00:00
Gunter Knauf
be8c219ec2
fixed VC6 makefiles for new ldap linkage.
2007-09-15 20:02:22 +00:00
Daniel Stenberg
1ce732e9d6
- I noticed while writing test 541 that the FTP code wrongly did a CWD on the
...
second transfer as it didn't store and remember the "" path from the
previous transfer so it would instead CWD to the entry path as stored. This
worked, but did a superfluous command. Thus, test case 541 now also verifies
this fix.
2007-09-11 22:21:39 +00:00
Daniel Stenberg
cc618e761c
- Bug report #1792649 ( http://curl.haxx.se/bug/view.cgi?id=1792649 ) pointed
...
out a problem with doing an empty upload over FTP on a re-used connection.
I added test case 541 to reproduce it and to verify the fix.
2007-09-11 22:21:12 +00:00
Dan Fandrich
7350f9851a
TFTP now reports the "not defined" TFTP error code 0 as an error,
...
not success.
2007-09-07 20:35:37 +00:00
Dan Fandrich
8147c3659d
Minix doesn't support getsockopt on UDP sockets or send/recv on TCP
...
sockets.
2007-09-05 22:01:57 +00:00
Daniel Stenberg
73e91ce20c
Curl_GetFTPResponse() now checks and properly deals with the fact that the
...
underlying ftp_readresp() function has a separate "cache" where there might
in fact be leftover data...
2007-09-05 21:41:07 +00:00
Dan Fandrich
3fa60164af
Renamed the CURLE_FTP_SSL_FAILED error code to CURLE_USE_SSL_FAILED.
...
Renamed the curl_ftpssl enum to curl_usessl and its enumerated constants,
creating macros for backward compatibility.
2007-08-31 19:36:32 +00:00
Dan Fandrich
ac6e0501c6
Made some of the error strings returned by the *strerror functions more
...
generic, and more consistent with each other.
2007-08-31 17:56:06 +00:00
Dan Fandrich
4f17c58315
Fixed an invalid returned error code added in my last submission.
2007-08-31 17:54:01 +00:00
Dan Fandrich
f6251734fc
Added more accurate error code returns from SFTP operations. Added test
...
case 615 to test an SFTP upload failure.
2007-08-30 23:03:59 +00:00
Dan Fandrich
9f44a95522
Renamed several libcurl error codes and options to make them more general
...
and allow reuse by multiple protocols. Several unused error codes were
removed. In all cases, macros were added to preserve source (and binary)
compatibility with the old names. These macros are subject to removal at
a future date, but probably not before 2009. An application can be
tested to see if it is using any obsolete code by compiling it with the
CURL_NO_OLDIES macro defined.
Documented some newer error codes in libcurl-error(3)
2007-08-30 20:34:57 +00:00
Dan Fandrich
5d4c981e13
Fixed a few compiler warnings. Try to do a slightly better job of
...
cleaning up after an OOM condition in curl_multi_add_handle
2007-08-30 18:26:19 +00:00
Daniel Stenberg
da4a776758
Made Curl_GetFTPResponse() use lots less code and instead use the proper
...
low-level ftp_readresp() function. Hopefully adressing bug #1779054 .
2007-08-30 14:06:00 +00:00
Dan Fandrich
1b66c1da6c
Added lots of consts
2007-08-29 05:36:53 +00:00
Dan Fandrich
8cf0814a14
Fixed some minor type mismatches and missing consts mainly found by splint.
2007-08-27 06:31:28 +00:00
Dan Fandrich
523767660c
Fixed some minor mismatched types found by splint.
2007-08-26 05:53:26 +00:00
Gunter Knauf
327c0d6b1c
bail out with error if someone tries to use another cert than PEM with OpenLDAP.
2007-08-25 12:10:30 +00:00
Gunter Knauf
870842ccee
only link with -lwldap32 if we dont use other LDAP SDKs.
2007-08-25 12:08:38 +00:00
Gunter Knauf
68b215157f
added defines to build with OpenLDAP.
2007-08-24 17:08:49 +00:00
Daniel Stenberg
7cba40b218
Bug report #1779054 ( http://curl.haxx.se/bug/view.cgi?id=1779054 ) pointed
...
out that libcurl didn't deal with large responses from server commands, when
the single response was consisting of multiple lines but of a total size of
16KB or more. Dan Fandrich improved the ftp test script and provided test
case 1006 to repeat the problem, and I fixed the code to make sure this new
test case runs fine.
2007-08-24 14:00:42 +00:00
Patrick Monnerat
d994fcf2b1
Remove leading space in curl_version_info ss_version field.
2007-08-24 09:06:17 +00:00
Daniel Stenberg
a5cb022407
added the two new os400 files
2007-08-23 14:58:10 +00:00
Patrick Monnerat
557cc55f6f
Porting library to OS/400
2007-08-23 14:30:24 +00:00
Gunter Knauf
2d8dba388b
added support for CA cert verification;
...
default now to verify cert unless data->set.ssl.verifypeer is 0.
2007-08-23 00:10:56 +00:00
Daniel Stenberg
91fd2c3bcd
Bug report #1779751 ( http://curl.haxx.se/bug/view.cgi?id=1779751 ) pointed
...
out that doing first a file:// upload and then an FTP upload crashed libcurl
or at best caused furious valgrind complaints. Fixed now by making sure we
free and clear the file-specific struct properly when done with it.
2007-08-22 22:48:41 +00:00
Gisle Vanem
d38891c950
Reversed the 'HAVE_LDAP_URL_PARSE' ifdef statement.
2007-08-22 18:05:46 +00:00
Daniel Stenberg
381e372939
Bug report #1779054 ( http://curl.haxx.se/bug/view.cgi?id=1779054 ) pointed
...
out that libcurl didn't deal with very long (>16K) FTP server response lines
properly. Starting now, libcurl will chop them off (thus the client app will
not get the full line) but survive and deal with them fine otherwise. Test
case 1003 was added to verify this.
2007-08-22 14:18:06 +00:00
Gunter Knauf
5b4f50857a
for now comment the tls_start section...
2007-08-22 10:14:57 +00:00
Gunter Knauf
6f10a718e4
sync libssh2 paths with comments.
2007-08-21 03:04:46 +00:00
Gunter Knauf
658de40930
added targets to create the files missing in CVS which makes calling buildconf.bat obsolete;
...
removed obsolete wsock32 link lib.
2007-08-21 02:42:29 +00:00
Gunter Knauf
fa1c916943
fixed warning with unused var;
...
removed now obsolete defines since we include now ldap headers which define these.
2007-08-20 23:31:26 +00:00
Daniel Stenberg
b132e865b9
Based on a patch by Christian Vogt, the FTP code now sets the upcoming
...
download transfer size much earlier to be possible to get read with
CURLINFO_CONTENT_LENGTH_DOWNLOAD as soon as possible.
2007-08-20 21:54:00 +00:00
Gunter Knauf
d4c4fd6272
compile with ldaps by default since it seems to work fine so far.
2007-08-20 16:34:04 +00:00
Gunter Knauf
acb905231d
fixed ldaps section for OpenLDAP. Still not working, but at least it compiles now, and should serve as base to get it finally working. Also seems that the ifdefs can be arranged some better because the Solaris and Netscape/iPlanet/Mozilla LDAP SDKs seem to be closer to the Novell section than the OpenLDAP one.
2007-08-20 16:30:41 +00:00
Gunter Knauf
c915eac93c
added some comments about the paths and build options;
...
added define to build with ldaps support;
enabled build with the Novell LDAP SDK.
2007-08-20 16:21:51 +00:00
Gunter Knauf
e347cff0e4
added define for ldap_ssl.h.
2007-08-20 12:50:44 +00:00
Gunter Knauf
d79fdbc46e
ignore errors of the RM command; seems that the del command fails on W2K when the file to delete isnt found while on XP it only prints the warning but make continues....
2007-08-19 23:23:50 +00:00
Gunter Knauf
ab13c2f814
added some comments in the makefiles about build options.
2007-08-19 00:26:24 +00:00
Daniel Stenberg
1aa82decea
- Robson Braga Araujo filed bug report #1776232
...
(http://curl.haxx.se/bug/view.cgi?id=1776232 ) about libcurl calling
Curl_client_write(), passing on a const string that the caller may not
modify and yet it does (on some platforms).
2007-08-17 22:31:51 +00:00
Daniel Stenberg
3217809294
Robson Braga Araujo filed bug report #1776235
...
(http://curl.haxx.se/bug/view.cgi?id=1776235 ) about ftp requests with NOBODY
on a directory would do a "SIZE (null)" request. This is now fixed and test
case 1000 was added to verify.
2007-08-17 22:22:43 +00:00
Daniel Stenberg
5a79532aee
Song Ma provided a patch that cures a problem libcurl has when doing resume
...
HTTP PUT using Digest authentication. Test case 5320 and 5322 were also
added to verify the functionality.
2007-08-17 20:21:32 +00:00
Gunter Knauf
29ac001aa6
fixed warning about uninitialized.
2007-08-16 15:23:39 +00:00
Gunter Knauf
ccba0d10b6
added basic ldaps support; for now its ifdef'd with HAVE_LDAP_SSL unless we know its fully working, and available with all LDAP SDKs.
...
Win32 requires to have the trusted CA in local keystore - I've not found yet a way to disable the cert check.
2007-08-16 14:08:47 +00:00
Gunter Knauf
7f7e42732d
added define PORT_LDAPS.
2007-08-15 16:17:32 +00:00
Patrick Monnerat
ca410ec2ca
Fix a potential buffer overflow bug in lib/version.c
2007-08-15 14:49:16 +00:00
Gunter Knauf
e5d8693865
added ldap_msgfree() to fix memory leak.
2007-08-15 08:18:37 +00:00
Gunter Knauf
46c92c0b80
added a dependency for libcares if build with ares support;
...
other minor makefile tweaks.
2007-08-14 18:39:26 +00:00
Gunter Knauf
327598e7b4
only include LDAP headers if we build with LDAP support.
2007-08-14 16:31:20 +00:00
Gunter Knauf
11caaad5f9
added -lwldap32 to link libs.
2007-08-14 14:48:25 +00:00
Gunter Knauf
3e0845e182
changed autoload dependent LDAP NLM.
2007-08-14 13:01:40 +00:00
Gunter Knauf
a2c7abea6c
trial to enable LDAP support again with patched Novell headers.
2007-08-14 12:02:10 +00:00
Daniel Stenberg
2f8f12e82e
Andrew Wansink provided an NTLM bugfix: in the case the server sets the flag
...
NTLMFLAG_NEGOTIATE_UNICODE, we need to filter it off because libcurl doesn't
unicode encode the strings it packs into the NTLM authenticate packet.
2007-08-14 10:28:21 +00:00
Dan Fandrich
8ee5e95ab1
Removed unused variable.
2007-08-13 16:37:51 +00:00
Patrick Monnerat
22c61d8da6
Simplify and rename internal structure to avoid potential name clash with LDAP header file.
2007-08-13 13:03:08 +00:00
Daniel Stenberg
1b88990cbb
Fixed the LDAP_DEPRECATED #define as suggested by Daniel Johnson, and
...
indented some of the code to curl-style
2007-08-12 22:25:50 +00:00
Gunter Knauf
44dc36cc8f
disable LDAP since we can no longer compile due to header incompatiblities.
2007-08-12 00:48:10 +00:00
Daniel Stenberg
6d3701318d
Allen Pulsifer provided a patch that makes libcurl set the expected download
...
size earlier when doing HTTP downloads, so that applications and the
progress meter etc know get the info earlier in the flow than before.
2007-08-11 21:05:13 +00:00
Daniel Stenberg
d0edb47896
Patrick Monnerat modified the LDAP code and approach in curl. Starting now,
...
the configure script checks for openldap and friends and we link with those
libs just like we link all other third party libraries, and we no longer
dlopen() those libraries. Our private header file lib/ldap.h was renamed to
lib/curl_ldap.h due to this. I set a tag in CVS (curl-7_17_0-preldapfix)
just before this commit, just in case.
2007-08-11 20:57:54 +00:00
Gunter Knauf
b238e0b1b4
fixed warning with gcc 4.x (hopefully); dynamincally imported UseAccurateCaseForPaths() for CLIB port to be stonetime-compatible (NW 3.x).
2007-08-09 22:33:49 +00:00
Gunter Knauf
3f62bfb61d
fixed a warning which MingW gcc 4.2.1.
2007-08-09 21:05:05 +00:00
Gunter Knauf
1866b95b7f
moved ugly CLIB define to nwos.c.
2007-08-08 20:09:08 +00:00
Dan Fandrich
668c204970
Song Ma noted a zlib memory leak in the illegal compressed header
...
countermeasures code path.
2007-08-08 17:51:40 +00:00
Gunter Knauf
d5ed9f787f
blocked ssize_t define for MingW32.
2007-08-08 16:59:43 +00:00
Patrick Monnerat
259f27b09f
Fix getsockname argument type
...
Improve "universal" alignment type in struct memdebug
2007-08-08 10:37:07 +00:00
Dan Fandrich
c669e1ae45
Fixed torture test for test 509
2007-08-07 18:24:49 +00:00
Gunter Knauf
10203cada9
moved HAVE_LONGLONG from makefiles to config-win32.h.
2007-08-07 17:40:56 +00:00
Patrick Monnerat
ad9cb40b6f
Some #if --> #ifdef
...
undef standard *printf before (re)defining them
2007-08-07 12:44:38 +00:00
Dan Fandrich
2e60ca382d
Fixed some icc compiler warnings.
2007-08-07 00:10:27 +00:00
Daniel Stenberg
26af759732
Patrick Monnerat updated the _FORM_DEBUG-enabled code, and I updated comments
...
based on his comments/suggestions.
2007-08-05 21:33:31 +00:00
Gunter Knauf
87fc4ad919
changed to use libssh2 0.16;
...
fixed link order in case libssh2 is build with zlib.
2007-08-04 23:35:23 +00:00
Daniel Stenberg
1926f4573d
Patrick Monnerat fixed curl_easy_escape() and curlx_strtoll() to work on
...
non-ASCII systems.
2007-08-04 20:47:59 +00:00
Dan Fandrich
7fe65aaf5b
Fixed a couple of compiler warnings.
2007-08-04 16:54:58 +00:00
Dan Fandrich
0d3d84e3ff
Refactored CreateConnection() somewhat to reduce its length by splitting
...
it into a few new functions.
Fixed a few leaks in out of memory conditions, including for test case 231.
2007-08-03 22:46:59 +00:00
Gunter Knauf
4aabbc5ac2
some more makefile fixes/changes.
2007-08-03 14:30:02 +00:00
James Housley
e7a50e37d6
Start adding some expanded error conversion of libssh2 errors.
2007-08-03 13:57:37 +00:00
James Housley
9fa05db83b
The previous commit to force the use of libssh2-0.16 by removing
...
LIBSSH2_APINO
2007-08-03 13:46:59 +00:00
Gunter Knauf
7ed58c4636
changed 'rm -f' to 'del /f' so it works without GnuUtils as Peteris Krumins pointed out; changed to use latest external libs.
2007-08-03 12:53:00 +00:00
Daniel Stenberg
252f16db02
remove left-over partly support for libssh2 0.14
2007-08-03 08:25:28 +00:00
Daniel Stenberg
72f5d6ba46
The SSH code now only works with libssh2 0.16 or later. Thus we must not
...
release the next curl until there is a libssh2 0.16 released.
2007-08-03 08:14:51 +00:00
Daniel Stenberg
5ec786b02e
Scott Cantor filed bug report #1766320
...
(http://curl.haxx.se/bug/view.cgi?id=1766320 ) pointing out that the libcurl
code accessed two curl_easy_setopt() options (CURLOPT_DNS_CACHE_TIMEOUT and
CURLOPT_DNS_USE_GLOBAL_CACHE) as ints even though they're documented to be
passed in as longs, and that makes a difference on 64 bit architectures.
2007-08-02 20:10:28 +00:00
Dan Fandrich
035ee257c8
Fixed a compiler warning.
2007-08-02 19:23:35 +00:00
Daniel Stenberg
188b08ca55
Patrick Monnerat's cleanup fix after my alloc-strings commit
2007-08-02 14:42:16 +00:00
Daniel Stenberg
6f750f3b57
Dmitriy Sergeyev reported a regression: resumed file:// transfers broke
...
after 7.16.2. This is much due to the different treatment file:// gets
internally, but now I added test 231 to make it less likely to happen again
without us noticing!
2007-08-02 14:09:08 +00:00
Daniel Stenberg
59c16a570f
argh, Greg Morse pointed out that the NTLM POST fix only worked if VERBOSE
...
was set, this should make it work for all cases!
2007-08-02 11:34:50 +00:00
Daniel Stenberg
50c10aa5bf
Patrick Monnerat and I modified libcurl so that now it *copies* all strings
...
passed to it with curl_easy_setopt()! Previously it has always just refered
to the data, forcing the user to keep the data around until libcurl is done
with it. That is now history and libcurl will instead clone the given
strings and keep private copies.
2007-08-01 21:20:01 +00:00
Daniel Stenberg
006878686c
Greg Morse reported a problem with POSTing using ANYAUTH to a server requiring
...
NTLM, and he provided test code and a test server and we worked out a bug
fix. We failed to count sent body data at times, which then caused internal
confusions when libcurl tried to send the rest of the data in order to
maintain the same connection alive.
(and then I did some minor reformatting of code in lib/http.c)
2007-08-01 12:58:04 +00:00
Daniel Stenberg
f01c6e51f4
Patrick Monnerat restored qssl successful compilation and loading
2007-07-30 21:41:12 +00:00
Dan Fandrich
de55038e33
Properly set USE_SSL on OS/400
2007-07-30 17:08:26 +00:00
Dan Fandrich
ea908c23ae
Fixed compiler warning on non-SSL builds
2007-07-30 17:05:39 +00:00
Daniel Stenberg
f1fa7b8ba4
Bug report #1759542 ( http://curl.haxx.se/bug/view.cgi?id=1759542 ). A bad use
...
of a socket after it has been closed, when the FTP-SSL data connection is taken
down.
2007-07-29 12:54:05 +00:00
Daniel Stenberg
86ff3194fa
added missing part for the qsossl support
2007-07-27 08:33:32 +00:00
Dan Fandrich
48a06d1a7b
Removed unused variable.
2007-07-24 15:23:16 +00:00
Daniel Stenberg
813a1107f4
#if that should be #ifdef
2007-07-23 21:48:27 +00:00
Daniel Stenberg
b3461bab1d
Implemented the parts of Patrick Monnerat's OS/400 patch that introduces
...
support for the OS/400 Secure Sockets Layer library
2007-07-23 21:46:26 +00:00
Dan Fandrich
5ecd56d964
Implemented only the parts of Patrick Monnerat's OS/400 patch that renamed
...
some few internal identifiers to avoid conflicts, which could be useful on
other platforms.
2007-07-23 18:51:22 +00:00
Daniel Stenberg
9af807a5ce
HTTP Digest auth fix on a re-used connection
2007-07-22 10:17:52 +00:00
Dan Fandrich
b465750041
Make the pointers of a few static const arrays const, too, for safety.
2007-07-21 02:08:17 +00:00
Daniel Stenberg
e3377e637a
Ralf S. Engelschall filed bug report #1757328
...
(http://curl.haxx.se/bug/view.cgi?id=1757328 ) and submitted a patch. It turns
out we broke login to FTP servers that don't require (nor understand) PASS
after the USER command
2007-07-20 09:35:58 +00:00
James Housley
2ab854cafd
Fix a loop with PWD
2007-07-20 01:03:49 +00:00
Dan Fandrich
4a2f0fb2be
Made some const arrays static to avoid unnecessary stack usage.
2007-07-20 00:41:12 +00:00
James Housley
ca1356702a
As has been pointed out, err_msg should not be freed here. The actual
...
issue is in libssh2 and not freeing a dynamic error message during cleanup.
2007-07-18 18:31:34 +00:00
Daniel Stenberg
1d728aae2a
Jofell Gallardo posted a libcurl log using FTP that exposed a bug which made
...
a control connection that was deemed "dead" to yet be re-used in a following
request. We must make sure the connection gets closed on this situation.
2007-07-17 20:59:53 +00:00
Gunter Knauf
dab569d76c
make users use the latest OpenSSL and Zlib libraries;
...
added hint to compile with SSPI with MSVC6 without PSDK.
2007-07-15 13:00:39 +00:00
Gunter Knauf
fee4f8c86d
for now unless we do better fixed LIBSSH2_APINO compares to use long constants.
2007-07-14 15:59:01 +00:00
Daniel Stenberg
46c699c483
Colin Hogben filed bug report #1750274
...
(http://curl.haxx.se/bug/view.cgi?id=1750274 ) and submitted a patch for the
case where libcurl did a connect attempt to a non-listening port and didn't
provide a human readable error string back.
2007-07-13 20:17:35 +00:00
Daniel Stenberg
cf5378b366
Daniel Cater made libcurl build with CURL_NO_OLDIES defined (which doesn't
...
define the symbols for backwards source compatibility)
2007-07-13 20:04:53 +00:00
Daniel Stenberg
a67c8b4698
Made the krb5 code build with Heimdal's GSSAPI lib
2007-07-12 21:34:42 +00:00
Daniel Stenberg
cf86f8cb78
Shmulik Regev found an (albeit rare) case where the proxy CONNECT operation
...
could in fact get stuck in an endless loop.
2007-07-12 20:15:38 +00:00
Gunter Knauf
0de56e5535
added nwos.c so that it gets distributed with releases and tarballs.
2007-07-12 10:44:46 +00:00
Daniel Stenberg
d12759c73e
Made CURLOPT_SSL_VERIFYHOST set to 1 acts as described in the documentation:
...
fail to connect if there is no Common Name field found in the remote cert.
We should deprecate the support for this set to 1 anyway soon, since the
feature is pointless and most likely never really used by anyone.
2007-07-11 22:20:46 +00:00
Gunter Knauf
c0095d6dd9
removed now obsolete NETDB_DEFINE_CONTEXT macro calls.
2007-07-11 21:47:31 +00:00
Gunter Knauf
6a88eab067
updated makefile to compile nwos.c.
2007-07-11 21:38:28 +00:00
Gunter Knauf
a4f36558fc
added NetWare-own file to provide some init functions (for now only CLIB);
...
added call to netware_init() in curl_global_init() to make sure it gets called before any library functions get used.
2007-07-11 21:34:22 +00:00
Gunter Knauf
2a1345ae9f
added netdb.h for NetWare CLIB since gethostname() is defined there.
2007-07-11 09:08:03 +00:00
Gunter Knauf
cf61c8d659
fixed endif comment.
2007-07-11 09:03:22 +00:00
Gunter Knauf
c39690486c
fixed endif comment.
2007-07-11 08:55:28 +00:00
Daniel Stenberg
5119fb16d6
Shmulik Regev:
...
The tiny patch below fixes a bug (that I introduced :) which happens
when negotiating authentication with a proxy (probably with web
servers as well) that uses chunked transfer encoding for the 407 error
pages. In this case the ''ignorebody'' flag was ignored (no pun
intended).
2007-07-10 22:45:01 +00:00
Daniel Stenberg
dc2c70be07
Giancarlo Formicuccia reported and fixed a problem with a closed connection
...
to a proxy during CONNECT auth negotiation.
2007-07-10 22:31:13 +00:00
James Housley
8026d94c07
* Finish moving sftp:// into a state machine so it won't block in multi mode
...
* Move scp:// into a state machine so it won't block in multi mode
* When available use the full directory entry from the sftp:// server
2007-07-10 22:26:32 +00:00
Daniel Stenberg
4b1782c371
7.16.4 preps
2007-07-10 21:36:30 +00:00
Gunter Knauf
f84642197f
added better CodeWarrior detection (forgot to add with previos version).
2007-07-09 02:00:39 +00:00
Gunter Knauf
4b0e48cb4e
added better CodeWarrior detection;
...
moved autounload flag so that its used for both lib architectures.
2007-07-08 23:18:47 +00:00
Gunter Knauf
932d38323f
removed some obsolete include paths and defines.
2007-07-07 16:26:02 +00:00
Daniel Stenberg
74ad8516d7
Thomas J. Moore made it build with less warnings
2007-07-06 22:14:29 +00:00
James Housley
7fd4f82a45
Gavrie Philipson provided a patch that will use a more specific error
...
message for an scp:// upload failure. If libssh2 has his matching
patch, then the error message return by the server will be used instead
of a more generic error.
2007-07-05 12:48:34 +00:00
James Housley
29357151af
Fix spelling error in error message
2007-07-04 22:54:29 +00:00
Gunter Knauf
9f21f74fbd
enabled ares build.
2007-07-04 13:45:46 +00:00
Gunter Knauf
70f8068d4d
fixed rule to build libcares when needed.
2007-07-03 00:50:40 +00:00
Gunter Knauf
5a051617f3
some more makefile tweaks and hacks to deal with both lib architectures.
2007-07-02 18:42:14 +00:00
Daniel Stenberg
54967d2a3a
Thomas J. Moore provided a patch that introduces Kerberos5 support in
...
libcurl. This also makes the options change name to --krb (from --krb4) and
CURLOPT_KRBLEVEL (from CURLOPT_KRB4LEVEL) but the old names are still
2007-07-01 22:01:18 +00:00
Daniel Stenberg
667fd9a60b
Song Ma helped me verify and extend a fix for doing FTP over a SOCKS4/5 proxy
2007-07-01 21:28:14 +00:00
Gunter Knauf
892a24f4c4
changed RECV_* / SEND_* defines to correctly reflect NetWare APIs;
...
some more minor Makefile tidyups.
2007-07-01 21:06:41 +00:00
Gunter Knauf
f7676e9667
disabled 64bit type for CLIB build which removes compiler runtime dependency.
2007-07-01 16:55:37 +00:00
Gunter Knauf
73e13ef19d
added lib architecture to NLM description.
2007-07-01 01:33:51 +00:00
Gunter Knauf
e983cd5cd3
added HAVE_SYS_IOCTL_H define; added gcc runtime.
2007-06-30 23:53:54 +00:00
Gunter Knauf
ca3e5a6322
moved includes to setup.h so that the project headers also pick them up (eleminate gcc warning).
2007-06-30 23:45:57 +00:00
Gunter Knauf
c4931601c6
fixed path to Metrowerks tools and runtime since they changed between compiler versions.
2007-06-30 21:20:24 +00:00
Gunter Knauf
afdfa4bed2
minor patches to enable building for NetWare CLIB.
...
sent by Dmitry Mityugov.
2007-06-30 20:08:13 +00:00
Gunter Knauf
3fc6faf1ae
enabled building for NetWare CLIB architecture.
2007-06-30 20:02:51 +00:00
James Housley
aed0cc6f2a
Using fdopen() is a more correct way to implement the CURLOPT_NEW_FILE_PREMS
...
file.c, but the debug interface was missing. This adds the routines needed
to make the memory debuging work for fdopen().
2007-06-28 11:11:29 +00:00
James Housley
4cd7f85410
Add two new options for the SFTP/SCP/FILE protocols: CURLOPT_NEW_FILE_PERMS
...
and CURLOPT_NEW_DIRECTORY_PERMS. These control the premissions for files
and directories created on the remote server. CURLOPT_NEW_FILE_PERMS
defaults to 0644 and CURLOPT_NEW_DIRECTORY_PERMS defaults to 0755
2007-06-27 20:15:48 +00:00
Gunter Knauf
edd35cab5c
removed trailing spaces.
2007-06-27 10:14:00 +00:00
Gunter Knauf
a2060effed
fixed wrong var name
2007-06-27 10:12:48 +00:00
Daniel Stenberg
62f0f5571d
Robert Iakobashvili re-arranged the internal hash code to work with a custom
...
hash function for different hashes, and also expanded the default size for
the socket hash table used in multi handles to greatly enhance speed when
very many connections are added and the socket API is used.
2007-06-26 21:09:28 +00:00
James Housley
7a360de49d
The results for a list only directory should be sent to the callback
2007-06-26 20:23:10 +00:00
James Housley
1be4557694
ftp_list_only mode should list all file types, not just directories.
2007-06-26 19:12:58 +00:00
Daniel Stenberg
6a21738704
gah, adding missing braces, removed silly debug output, added new debug output
2007-06-25 14:17:52 +00:00
Daniel Stenberg
974fa1242a
Adjusted how libcurl treats HTTP 1.1 responses without content-lenth or
...
chunked encoding (that also lacks "Connection: close"). It now simply
assumes that the connection WILL be closed to signal the end, as that is how
RFC2616 section 4.4 point #5 says we should behave.
2007-06-25 13:58:14 +00:00
Daniel Stenberg
af4edf10f5
As reported by "Tro" in http://curl.haxx.se/mail/lib-2007-06/0161.html and
...
http://curl.haxx.se/mail/lib-2007-06/0238.html , libcurl didn't properly do
no-body requests on FTP files on re-used connections properly, or at least
it didn't provide the info back in the header callback properly in the
subsequent requests.
2007-06-24 19:32:33 +00:00
Gunter Knauf
2aed8946b0
made debug flag settable from outside; add allways debug stuff when DB != NDEBUG
2007-06-22 21:10:17 +00:00
Daniel Stenberg
03b03f7b60
remove annoying debug output
2007-06-22 20:24:11 +00:00
Daniel Stenberg
a1b650ad7b
Gerrit Bruchhuser pointed out a warning that the Intel(R) Thread Checker
...
tool reports and it was indeed a legitimate one and it is one fixed. It was
a use of a share without doing the proper locking first.
2007-06-21 14:23:38 +00:00
James Housley
6e7f47da5b
If the creation of rsa and rsa_pub fail due to memory, don't try
...
other authentication methods. Terminate with a memory error.
2007-06-20 11:30:35 +00:00
James Housley
277bab0c7b
Check both variables, not the same one twice. Pointed out by Colin Hogben
2007-06-19 13:23:21 +00:00
Daniel Stenberg
fc3c5dae87
and fix another flaw in the singlecwd case when we get ftp://site.com/, also
...
from the #1739100 bug report
2007-06-19 12:33:28 +00:00
Daniel Stenberg
891dffb528
extra precaution to make PATH_MAX always be defined
2007-06-19 11:50:08 +00:00
James Housley
f0b361ecc1
Change rsa and rsa_pub from static arrays in ssh_conn to be dynamically
...
allocated when needed
2007-06-19 11:31:33 +00:00
James Housley
df7eed16dd
If LIBSSH2DEBUG was defined "i" was undefined
2007-06-18 22:28:40 +00:00
Daniel Stenberg
fe85ae15f3
make the ftp-method multicwd case possible to LIST the root directory of a
...
server!
2007-06-18 21:04:45 +00:00
James Housley
b61b420cb8
Curl_ssh_connect() was using an uninitialized variable in one location.
...
Caught by the auto-builds
2007-06-16 16:58:02 +00:00
Daniel Stenberg
b691102ec7
Shmulik Regev fixed a flaw in the multi interface that occurred when doing
...
HTTP CONNECT over a proxy
2007-06-14 14:42:21 +00:00
James Housley
db5d4bd811
Remove duplicate code that was left in as part of 1.35. This code
...
only affected sftp_sendquote() for the "chgrp/chmod/chown" commands.
This also fixed failure of test 614 on a system that previously failed.
2007-06-14 13:22:00 +00:00
Daniel Stenberg
dc3b3c6916
Make our own definitions of the POLL* defiens and the pollfd struct only get
...
done if the sys/poll.h file is missing, as we have seen machines with poll()
present but without the header file and machines that don't get HAVE_POLL
defined but that do have the sys/poll.h header file...
2007-06-14 11:21:48 +00:00
James Housley
82d3f97659
BUG FIX: When reading a directory listing that contains symlinks
...
with the latest libssh2, the listing would be truncated at the symlink.
Fix by looping on LIBSSH2_ERROR_EAGAIN, like the rest of the calls.
2007-06-14 10:36:53 +00:00
James Housley
f37dc9168a
Restore functionality mistakenly removed in the previous commit
2007-06-13 17:13:44 +00:00
Gisle Vanem
05ba9f9fcd
libssh2_session_free() returns void. Fix "#endif".
2007-06-13 14:01:48 +00:00
James Housley
96f4af4db9
Commit Tom Regner's code for SFTP create missing directories. This patch
...
uses the --ftp-create-dirs flag to control if cURL will try and create
directories that are specified in an upload path, but don't exist.
2007-06-13 12:15:23 +00:00
James Housley
3ec7f8a25a
Add a define to protect the state machine from older versions of libssh2,
...
ie 0.14, that don't know about newer constants used in the state machine.
2007-06-13 11:27:41 +00:00
Daniel Stenberg
375cdf89ad
With lots of help from Rich Rauenza(?) in bug #1733119 , we introduce a fairly
...
complicated work-around for 64bit HPUX compiles. We do the fix using inline
static functions to make them follow the header file properly and thus get
used fine in the test suite too etc.
2007-06-12 21:39:21 +00:00
James Housley
ab7e7144ef
* Updates for the latest version of libssh2, specifically
...
libssh2_sftp_shutdown() and libssh2_session_free() can now return
LIBSSH2_ERROR_EAGAIN.
* Fix the _send() and _recv() return values so non-blocking works
2007-06-12 21:32:45 +00:00
James Housley
6f59e19b91
While connect and transfer works fine in non-blocking mode for the test
...
suite, transfer fails in the real world. So after connect set to blocking
as full non-blocking is migrated out.
2007-06-12 16:15:20 +00:00
James Housley
73c13220ee
Prevent the state machine from getting stuck in SSH_AUTH_HOST_INIT
2007-06-12 13:47:32 +00:00
James Housley
99e0597c7b
Convert Curl_ssh_connect() to run in a state machine for
...
LIBSSH2_APINO >= 200706012030. More to come...
2007-06-12 12:31:10 +00:00
Daniel Stenberg
3247ac1918
remove unused field in the state struct
2007-06-12 08:15:02 +00:00
Daniel Stenberg
d23d686de2
restore the correct timeout time that my previous commit broke
2007-06-11 13:35:33 +00:00
Daniel Stenberg
c8677e9d3f
Properly wait for the c-ares resolve to complete, hopefully the cure for
...
bug #1733955
2007-06-11 13:32:49 +00:00
Gisle Vanem
1dcb99f0f7
constify 'hostname' in init_thread_sync_data(). Simply clear
...
the whole 'tsd' structure on exit in destroy_thread_sync_data().
2007-06-11 04:33:21 +00:00
Gisle Vanem
03bc2d34da
Squelsh some warnings for libssh older than 0.1.5.
2007-06-11 04:07:51 +00:00
James Housley
4f8ebd1673
Curl_scp_done() needs to call libssh2_channel_free() to prevent a
...
memory leak, and it is the right thing to do.
2007-06-08 16:19:21 +00:00
James Housley
cd4e6fbcac
Fix to work with the latest CVS version of libssh2
...
* As of (LIBSSH2_APINO >= 200706012030) there are not *nb() functions
* As of (LIBSSH2_APINO >= 200706012030) most libssh2_*() functions
can return LIBSSH2_ERROR_EAGAIN to indicate that the call would block.
To make the code work as previously, blocking, all the code has been
updated so that when (LIBSSH2_APINO >= 200706012030) it loops simulating
blocking. This allows the existing code to function and not hold up
the upcoming release.
2007-06-08 16:02:57 +00:00
Dan Fandrich
38b490a310
Fixed a compiler warning on uClibc.
2007-06-07 22:24:53 +00:00
Daniel Stenberg
48064f8dee
if we read zero bytes from the proxy, the connection is broken and we need
...
to bail out
2007-06-05 13:42:23 +00:00
Daniel Stenberg
e71378d3c8
mark connect failures as non-connected when ConnectPlease() fails, like when
...
a connection through a socks proxy doesn't work
2007-06-05 13:41:50 +00:00
Daniel Stenberg
b10ff9791b
ouch, two conditionals were turned backwards!
2007-06-01 21:24:34 +00:00
Daniel Stenberg
86a25239ec
do the update timer stuff even when CURLM_CALL_MULTI_PERFORM is returned
2007-06-01 21:01:57 +00:00
Daniel Stenberg
4c663ba9a8
When transferring 500 downloads in parallel with a c-ares enabled build only
...
to find that it crashed miserably, and this was due to some select()isms left
in the code. This was due to API restrictions in c-ares 1.3.x, but with the
upcoming c-ares 1.4.0 this is no longer the case so now libcurl runs much
better with c-ares and the multi interface with > 1024 file descriptors in
use.
2007-05-31 11:34:32 +00:00
Daniel Stenberg
713c9f8602
Feng Tu made (lib)curl support "upload" resuming work for file:// URLs.
2007-05-31 08:59:44 +00:00
Daniel Stenberg
a49e78d9b7
Added CURLMOPT_MAXCONNECTS which is a curl_multi_setopt() option for setting
...
the maximum size of the connection cache maximum size of the multi handle.
2007-05-30 20:04:44 +00:00
Daniel Stenberg
b6820b2674
remove really annoying debug output that makes life miserable when you do
...
hundreds of parallel transfers...
2007-05-30 09:24:06 +00:00
Daniel Stenberg
8bd7197a8f
Primarily this fixes an off-by-one buffer overwrite (rare but still existing).
...
I also switched from calloc() to malloc() as a minor performance boost since
the rest of the code fills in the structs fine anyway - and they must for the
case when we use the stack-based auto variable array instead of the allocated
one.
I made the loop filling in poll_fds[] break when poll_nfds is reached as a
minor speed improvement.
2007-05-26 22:02:29 +00:00
Daniel Stenberg
fe1fe64fd4
Rob Crittenden fixed bug #1705802
...
(http://curl.haxx.se/bug/view.cgi?id=1705802 ), which was filed by Daniel
Black identifying several FTP-SSL test cases fail when we build libcurl with
NSS for TLS/SSL. Listed as #42 in KNOWN_BUGS.
2007-05-25 21:56:27 +00:00
Daniel Stenberg
c25da51913
Song Ma filed bug report #1724016
...
(http://curl.haxx.se/bug/view.cgi?id=1724016 ) noticing that downloading
glob-ranges for TFTP was broken in CVS.
2007-05-24 21:11:18 +00:00
Daniel Stenberg
05ab8d291c
stay within 80 cols
2007-05-24 21:11:00 +00:00
Daniel Stenberg
96c093f27c
Andre Guibert de Bruet fixed a memory leak when PKCS #12 parsing failed
2007-05-22 20:46:51 +00:00
Daniel Stenberg
a9d49769ff
Andre Guibert de Bruet fixed a memory leak in the function that verifies the
...
peer's name in the SSL certificate when built for OpenSSL. The leak happens
for libcurls with CURL_DOES_CONVERSIONS enabled that fail to convert the CN
name from UTF8.
2007-05-22 19:51:44 +00:00
Daniel Stenberg
d7616d8a0a
WaitForSingleObject() uses a millisecond timeout and CURL_TIMEOUT_RESOLVE is
...
counted in seconds...
2007-05-20 22:11:47 +00:00
Daniel Stenberg
826bbfc01c
better fix for the dl/ul counters
2007-05-18 10:40:43 +00:00
Daniel Stenberg
250f9670b7
Feng Tu reported that curl -w did wrong on TFTP transfers in
...
bug report #1715394 (http://curl.haxx.se/bug/view.cgi?id=1715394 ), and the
transfer-related info "variables" were indeed overwritten with zeroes wrongly
and have now been adjusted. The upload size still isn't accurate.
2007-05-18 10:32:48 +00:00
Daniel Stenberg
ed4936fd30
bail out with error codes on failures
2007-05-18 10:12:57 +00:00
Daniel Stenberg
8479785620
Feng Tu pointed out a division by zero error in the TFTP connect timeout
...
code for timeouts less than fice seconds, and also provided a fix for it.
2007-05-17 21:40:08 +00:00
Dan Fandrich
0427e94465
Added support for compiling under Minix 3.1.3 using ACK.
2007-05-17 06:04:44 +00:00
Dan Fandrich
3fef839f75
Added call to setvbuf (disabled by default for speed) to flush the
...
memdebug log file after every line and avoid losing the last few log
entries if curl crashes.
2007-05-15 00:36:56 +00:00
Dan Fandrich
ea43bb013b
Added support for quote commands before a transfer using SFTP and test
...
case 614.
Allow SFTP quote commands chmod, chown, chgrp to set a value of 0.
2007-05-15 00:28:50 +00:00
Dan Fandrich
41ba7666f0
Kristian Gunstone fixed a problem where overwriting an uploaded file with
...
sftp didn't truncate it first, which would corrupt the file if the new
file was shorter than the old.
2007-05-09 18:24:27 +00:00
Daniel Stenberg
1b7f00b2a6
CURLE_FTP_COULDNT_STOR_FILE is now known as CURLE_UPLOAD_FAILED. This is
...
because I just made SCP uploads return this value if the file size of
the upload file isn't given with CURLOPT_INFILESIZE*. Docs updated to
reflect this news, and a define for the old name was added to the public
header file.
2007-05-08 11:34:31 +00:00
Daniel Stenberg
ad19f95f15
James Bursa fixed a bug in the multi handle code that made the connection
...
cache grow a bit too much, beyond the normal 4 * easy_handles.
2007-05-07 07:07:55 +00:00
Daniel Stenberg
f7472075d7
Anders Gustafsson remarked that requiring CURLOPT_HTTP_VERSION set to 1.0
...
when CURLOPT_HTTP200ALIASES is used to avoid the problem mentioned below is
not very nice if the client wants to be able to use _either_ a HTTP 1.1
server or one within the aliases list... so starting now, libcurl will
simply consider 200-alias matches the to be HTTP 1.0 compliant.
2007-05-02 20:42:02 +00:00
Dan Fandrich
9f72db13c4
Fixed an out of memory handling issue with HTTP pipelines.
2007-05-02 19:13:56 +00:00
Daniel Stenberg
acc4868b78
Tobias Rundstrom reported a problem they experienced with xmms2 and recent
...
libcurls, which turned out to be the 25-nov-2006 change which treats HTTP
responses without Content-Length or chunked encoding as without bodies. We
now added the conditional that the above mentioned response is only without
body if the response is HTTP 1.1.
2007-05-02 17:35:47 +00:00
Daniel Stenberg
2f0539d880
- Set the timeout for easy handles to expire really soon after addition or
...
when CURLM_CALL_MULTI_PERFORM is returned from curl_multi_socket*/perform,
to make applications using only curl_multi_socket() to properly function
when adding easy handles "on the fly". Bug report and test app provided by
Michael Wallner.
2007-05-02 13:47:56 +00:00
Daniel Stenberg
3d513f7ab1
spell and language fix
2007-05-02 11:14:55 +00:00
Dan Fandrich
93844f64ef
Use memcpy instead of strcpy to improve performance.
2007-05-01 20:50:50 +00:00
Dan Fandrich
717adfeb96
Rearranged some allocs so they will be freed correctly in the error path.
2007-04-29 07:04:29 +00:00
Daniel Stenberg
503557e5ce
Peter O'Gorman fixed libcurl to not init GnuTLS as early as we did before,
...
since it then inits libgcrypt and libgcrypt is being evil and EXITS the
application if it fails to get a fine random seed. That's really not a nice
thing to do by a library.
2007-04-28 21:01:30 +00:00
Daniel Stenberg
f611f42dcf
Frank Hempel fixed a curl_easy_duphandle() crash on a handle that had
...
been removed from a multi handle, and then fixed another flaw that prevented
curl_easy_duphandle() to work even after the first fix - the handle was
still marked as using the multi interface.
2007-04-28 20:27:07 +00:00
Daniel Stenberg
7a0e0c36c5
Move the explictit free of the range string to Curl_close() from Curl_disconnect()
...
since it easy-handle related and not connection-related.
2007-04-27 08:30:48 +00:00
Daniel Stenberg
61edee979f
oops, this was supposed to be properly removed
2007-04-27 08:19:48 +00:00
Daniel Stenberg
7a343a3f60
As a follow-up to the removal of the free of the range data in Curl_done() - this
...
moves and re-arranges how range/resume is setup and freed.
2007-04-27 08:18:47 +00:00
Daniel Stenberg
b4d3c4a76c
Peter O'Gorman found a problem with SCP downloads when the downloaded file
...
was 16385 bytes (16K+1) and it turned out we didn't properly always "suck
out" all data from libssh2. The effect being that libcurl would hang on the
socket waiting for data when libssh2 had in fact already read it all...
2007-04-26 21:30:29 +00:00
Dan Fandrich
6e835ef3aa
Fixed an out of memory handling issue.
2007-04-25 20:54:02 +00:00
Daniel Stenberg
ed8cb57151
Sonia Subramanian brought our attention to a problem that happens if you set
...
the CURLOPT_RESUME_FROM or CURLOPT_RANGE options and an existing connection
in the connection cache is closed to make room for the new one when you call
curl_easy_perform(). It would then wrongly free range-related data in the
connection close funtion.
2007-04-25 20:20:15 +00:00
Yang Tse
94b253fde7
Steve Little's fixes to allow compilation on VMS 64-bit mode
2007-04-25 03:00:10 +00:00
Daniel Stenberg
bc1ae973da
Robert Iakobashvili made the 'master_buffer' get allocated first once it is
...
can/will be used as it then makes the common cases save 16KB of data for each
easy handle that isn't used for pipelining.
2007-04-24 10:18:06 +00:00
Yang Tse
3616912d22
Avoid an unnecessary call to gettimeofday() when
...
using custom timeout values.
2007-04-22 18:17:46 +00:00
Daniel Stenberg
cea9695bcf
Daniel Black filed bug #1704675 ( http://curl.haxx.se/bug/view.cgi?id=1704675 )
...
identifying a double-free problem in the SSL-dealing layer, telling GnuTLS to
free NULL credentials on closedown after a failure and a bad #ifdef for NSS
when closing down SSL.
2007-04-21 21:32:31 +00:00
Daniel Stenberg
92039629c7
Curl_ssl_close(): mark the connection as not using SSL anymore, to better
...
survive getting called twice
2007-04-21 21:24:53 +00:00
Gunter Knauf
c8d3327e92
fixed ARFLAGS for CodeWarrior build.
2007-04-21 15:32:35 +00:00
Yang Tse
7f33aae067
initialize pending_ms to zero to avoid compiler warning:
...
'pending_ms' may be used uninitialized in this function
2007-04-20 01:58:15 +00:00
Yang Tse
61022f3817
- Save one call to curlx_tvnow(), which calls gettimeofday(), in each of
...
Curl_socket_ready(), Curl_poll() and Curl_select() when these are called
with a zero timeout or a timeout value indicating a blocking call should
be performed.
These unnecessary calls to gettimeofday() got introduced in 7.16.2 when
fixing 'timeout would restart when signal caught while awaiting socket
events' on 20 March 2007.
- Move some loop breaking logic from the while clause into the loop,
avoiding compiler warning 'assignment within conditional expression'
2007-04-20 00:07:19 +00:00
Daniel Stenberg
bf648fcfc3
keep lines < 80 columns
2007-04-19 20:20:48 +00:00
Yang Tse
b0e909329e
fix comment and line spacing
2007-04-19 20:16:28 +00:00
Daniel Stenberg
c234b9d04b
clarify the comment about libssh2_sftp_write's return type
2007-04-18 20:15:22 +00:00
Daniel Stenberg
7a86740afd
- James Housley made SFTP uploads use libssh2's non-blocking API (if available)
2007-04-18 20:11:47 +00:00
Daniel Stenberg
8e719e3ef5
- Prevent the internal progress meter from updating more frequently than once
...
per second.
2007-04-18 20:02:41 +00:00
Gunter Knauf
f30ae93a1f
added ranlib when library is created with ar.
2007-04-16 20:54:56 +00:00
Daniel Stenberg
76627b322e
- Robert Iakobashvil added curl_multi_socket_action() to libcurl, which is a
...
function that deprecates the curl_multi_socket() function. Using the new
function the application tell libcurl what action that was found in the
socket that it passes in. This gives a significant performance boost as it
allows libcurl to avoid a call to poll()/select() for every call to
curl_multi_socket*().
2007-04-16 16:34:08 +00:00
Yang Tse
b039d883e5
proper fix for compiler warning
2007-04-13 08:45:07 +00:00
Yang Tse
b3401ddbad
Take in account that it can be built with compiler debug info and
...
without the curl memory debugging leak detection code enabled.
2007-04-13 08:22:56 +00:00
Yang Tse
038fe54e21
fix compiler warning
2007-04-13 07:57:31 +00:00
Daniel Stenberg
c38c339480
Song Ma found a memory leak in the if2ip code if you pass in an interface
...
name longer than the name field of the ifreq struct (typically 6 bytes), as
then it wouldn't close the used dummy socket.
2007-04-12 20:09:19 +00:00
Dan Fandrich
70cce4cddd
Work around an out of memory situation in Curl_ftp_done instead of
...
returning an error code, to allow connections to be torn down
cleanly since this function can be called AFTER an OOM situation
has already been reached.
2007-04-12 01:26:02 +00:00
Yang Tse
84c5e846b3
convenience SIG_ATOMIC_T macro definition
2007-04-11 11:02:13 +00:00
Dan Fandrich
47f044265e
Fixed some out of memory handling issues.
2007-04-11 00:25:41 +00:00
Dan Fandrich
d46d995766
Fixed some out of memory handling issues.
2007-04-10 22:52:50 +00:00
Daniel Stenberg
5daa6b9367
Ravi Pratap provided fixes for HTTP pipelining
2007-04-10 20:46:40 +00:00
Yang Tse
5be7b543d8
Update NTLM flag and description
2007-04-10 02:17:06 +00:00
Dan Fandrich
910ee13b20
Fixed an out of memory handling issue.
2007-04-10 00:38:41 +00:00
Yang Tse
be5ade5c7a
VC8+ (VS2005+) has C99 variadic macro support
2007-04-09 17:46:01 +00:00
Yang Tse
0e05a6329a
fix out of memory handling issue
2007-04-08 22:49:38 +00:00
Daniel Stenberg
c518c52aba
Nick Zitzmann did ssh.c cleanups
2007-04-08 22:44:21 +00:00
Yang Tse
a11374d994
fix out of memory handling issue
2007-04-07 17:25:19 +00:00
Yang Tse
d9e89e170f
fix out of memory handling issue
2007-04-07 04:51:35 +00:00
Yang Tse
47594be5c0
fix compiler warning
2007-04-07 00:38:46 +00:00
Yang Tse
0d635a1119
fix out of memory handling issue
2007-04-06 20:53:15 +00:00
Dan Fandrich
e9ffa9a3b8
Fixed a few memory leaks in OOM conditions.
...
Made libssh2 logging more verbose when debugging is enabled.
2007-04-06 06:32:05 +00:00
Yang Tse
c895dc8a19
runtests -t discovered this out of memory handling issues
2007-04-05 11:09:46 +00:00
Dan Fandrich
c321b9f704
Fixes some more out of memory handling bugs.
2007-04-04 23:41:35 +00:00
Dan Fandrich
7e74349b86
Fixed file handle leak in OOM condition.
2007-04-04 22:49:12 +00:00
Yang Tse
8fe9376d54
move WinSock definitions of EBADF, EINTR, EINVAL and EAFNOSUPPORT to setup_once.h
2007-04-04 06:06:36 +00:00
Dan Fandrich
7d48d851a2
Fixed a memory leak and improper shutdown on SFTP post-quote command failure.
2007-04-04 00:46:16 +00:00
Daniel Stenberg
990b15e402
Rob Jones fixed better #ifdef'ing for a bunch of #include lines.
2007-04-03 20:54:37 +00:00
Yang Tse
584f3639e3
update copyright year
2007-04-03 18:25:18 +00:00
Yang Tse
f1b4f5e2ae
fix MSDOS symbol check
2007-04-03 15:35:19 +00:00
Yang Tse
bcf0af9ddb
recover code simplification lost with last commit
2007-04-03 13:26:05 +00:00
Gisle Vanem
c420113795
DOS targets do have setmode().
2007-04-03 10:18:38 +00:00
Daniel Stenberg
20d33ad7e5
Nick Zitzmann made CURLOPT_POSTQUOTE work for SFTP as well.
2007-04-02 21:24:05 +00:00
Yang Tse
e4d4ee8db5
fix compiler warning
2007-04-02 03:38:18 +00:00
Yang Tse
8a7d58378b
fix compiler warning
2007-04-02 02:13:26 +00:00
Daniel Stenberg
6c6e4710b5
Robert Iakobashvili made curl_multi_remove_handle() a lot faster when many
...
easy handles are added to a multi handle, by avoiding the looping over all
the handles to find which one to remove.
2007-04-01 08:24:23 +00:00
Daniel Stenberg
5e7164f87a
Matt Kraai provided a patch that makes curl build on QNX 6 fine again. Mostly
...
by letting configure check for setmode and ifdef on HAVE_SETMODE. NOTE: non-
configure platforms that havve setmode() needs their hard-coded config.h files
fixed. I fixed the src/config-win32.h.
2007-04-01 07:51:30 +00:00
Daniel Stenberg
c1f117700a
Pointless to check for non-NULL pointers that already have been dereferenced
...
and they have to be non-NULL long before this check.
CID 22 in the coverity.com scan
2007-03-31 21:10:05 +00:00
Daniel Stenberg
7ea90c46eb
avoid dereferencing a NULL pointer by setting a default word to lookup in case
...
it is missing
CID 5 in the coverity.com scan
2007-03-31 21:06:40 +00:00
Daniel Stenberg
4d9e24d1e4
Better deal with NULL pointers.
...
CID 3 and 4 from the coverity.com scan.
2007-03-31 21:01:18 +00:00
Daniel Stenberg
d27813c2dd
*** empty log message ***
2007-03-31 20:46:47 +00:00
Daniel Stenberg
371a25eee9
When curl_easy_duphandle() fails because it can't get or make a connection
...
cache, we must make sure not to derefence the NULL pointer...
CID 6 coverity.com scan
2007-03-31 11:28:03 +00:00
Daniel Stenberg
e535a71c71
The info types cannot be checked for explicity by ANDing the types since they
...
have not been properly defined to allow this! Instead of changing the defines
and break the ABI/API, I opted to modify the code to check for exact type
matches.
CID 10 coverity.com scan
2007-03-31 11:12:28 +00:00
Daniel Stenberg
b9e5fecf5f
Check for a NULL easy->easy_conn in multi_getsock() since it can in fact
...
happen when curl_multi_remove_handle() is called.
CID 13. coverity.com scan
2007-03-31 10:56:07 +00:00
Daniel Stenberg
3af08472ad
Removed check for ftpcode being NULL, as later it is derefenced unconditionally
...
anyway and we can just as well rely on it being valid.
CID 12, coverity.com scan
2007-03-31 10:39:54 +00:00
Daniel Stenberg
75db459f0a
Pointer "conn" dereferenced before NULL check. found by coverity.com scan
2007-03-30 20:54:32 +00:00
Daniel Stenberg
74e54c5a49
Pointer "cur_pos" dereferenced before NULL check, found by coverity.com scan.
...
Removed the NULL check since the pointer must be valid already.
2007-03-30 20:52:42 +00:00
Daniel Stenberg
3dcc7202d5
dead code removed, found by the coverity.com scan
2007-03-30 19:59:15 +00:00
Dan Fandrich
ffb11ad5c6
Don't tear down the ftp connection if the maximum filesize was exceeded
...
and added tests 290 and 291 to check.
2007-03-30 01:13:47 +00:00
Dan Fandrich
7763bb9172
Send an EOF message before closing a channel, as recommended by RFC4254.
...
Enable libssh2 tracing when ssh debugging is turned on.
2007-03-29 19:17:18 +00:00
Yang Tse
a1e5c621c0
fix compiler warning
2007-03-29 12:29:32 +00:00
Yang Tse
3d5a8515a6
fix error introduced in last commit
2007-03-29 00:11:55 +00:00
Yang Tse
bfa0f8c6c2
fix compiler warning
2007-03-28 19:05:43 +00:00
Yang Tse
869d192ffc
Improve detection of socket events which allow a further recv() call
...
to complete with no delay and actually find out what happened with
the socket. As well as detection of socket send()able condition.
This also allows removal of a Cygwin specific block of code.
2007-03-28 18:59:42 +00:00
Gisle Vanem
60bc103a78
djgpp uses gcc which has varadic macros.
2007-03-28 04:48:11 +00:00
Gisle Vanem
8a0a7ce3a8
Fix compiler warning.
2007-03-28 04:44:14 +00:00
Gisle Vanem
25c064c888
Simplified code around 'tld_errmsg' a bit.
2007-03-28 04:23:33 +00:00
Gunter Knauf
45b2577974
added variadic macro stuff.
2007-03-27 19:27:43 +00:00
Yang Tse
d58c7a8bdd
Update message
2007-03-27 18:16:35 +00:00
Yang Tse
eed47311f8
New Internal wrapper function Curl_select() around select (2), it
...
uses poll() when a fine poll() is available, so now libcurl can be
built without select() support at all if a fine poll() is available.
2007-03-27 18:15:26 +00:00
Yang Tse
59eaae42b8
don't retry select() call upon unrecoverable error EBADF
2007-03-27 15:22:49 +00:00
Yang Tse
4294cac701
Platforms that lack autotools support should define HAVE_VARIADIC_MACROS_C99
...
and/or HAVE_VARIADIC_MACROS_GCC for specific compiler versions that support
variadic macros with C99 style and/or old gcc style in their specific config.h
file.
If previous definitions are not done, even when aplicable, and --disable-verbose
is used, the fallback (void) method will be used to define infof, avoiding the
inclusion of unwanted strings in the resulting library/executable.
2007-03-27 04:17:26 +00:00
Yang Tse
fba4cd0e62
Internal function Curl_select() renamed to Curl_socket_ready()
2007-03-26 23:23:46 +00:00
Gunter Knauf
8272abef28
changed link lib order to make nlmconv happy.
2007-03-26 17:01:35 +00:00
Gunter Knauf
5fbc93c3eb
added CVS Id tag.
2007-03-26 01:54:06 +00:00
Gunter Knauf
8851df41c5
fixed build to use compiler-default lib extension.
2007-03-26 01:50:44 +00:00
Daniel Stenberg
6c56b5301f
- Daniel Johnson fixed multi code to traverse the easy handle list properly.
...
A left-over bug from the February 21 fix.
2007-03-25 08:16:16 +00:00
Yang Tse
fa0780bb91
fix compiler warning
2007-03-25 03:20:17 +00:00
Yang Tse
f08ac86834
fix compiler warning
2007-03-25 02:30:58 +00:00
Yang Tse
d6eca89229
fix compiler warning
2007-03-25 01:59:52 +00:00
Dan Fandrich
2bd1d7e996
Fixed a couple of compile problems.
2007-03-24 17:23:01 +00:00
Dan Fandrich
0dd1219668
Fixed a memory leak when specifying a proxy with a file: URL and added
...
test case 288 to verify it.
2007-03-24 02:15:20 +00:00
Daniel Stenberg
3d528e1b15
add missing state name for the debug state switch output
2007-03-23 22:25:04 +00:00
Daniel Stenberg
f9a339a225
fix debug message
2007-03-23 22:24:33 +00:00
Dan Fandrich
0043e87014
Added --pubkey option to curl and made --key also work for SCP/SFTP,
...
plus made --pass work on an SSH private key as well.
2007-03-23 17:59:40 +00:00