1
0
mirror of https://github.com/moparisthebest/curl synced 2024-10-31 23:55:01 -04:00
Commit Graph

3917 Commits

Author SHA1 Message Date
Yang Tse
34cf35051a update openssl version 2008-01-23 07:27:40 +00:00
Gunter Knauf
5ee3f41e0d happy new year 2008-01-23 02:12:13 +00:00
Gunter Knauf
64e88ff6a7 removed inclusion of libcurl memory debug headers since this lib stub is a well proofed method suggested by Novell. This enables usage of the stub with language bindings. 2008-01-23 02:10:40 +00:00
Yang Tse
acd7c94598 when unable to initialize sftp session, also log failure reason 2008-01-22 17:26:42 +00:00
Yang Tse
bdb2beb8e4 check availability of poll.h header at configuration time, and include
it when sys/poll.h is unavailable
2008-01-22 14:52:54 +00:00
Yang Tse
727e23322f update copyright year 2008-01-22 03:48:16 +00:00
Daniel Stenberg
ef0ed9b720 Dmitry Kurochkin removed the cancelled state for pipelining, as we agreed
that it is bad anyway. Starting now, removing a handle that is in used in a
pipeline will break the pipeline - it'll be set back up again but still...
2008-01-21 23:48:58 +00:00
Daniel Stenberg
62df0ff025 Lau Hang Kin found and fixed a problem with the multi interface when doing
CONNECT over a proxy. curl_multi_fdset() didn't report back the socket
properly during that state, due to a missing case in the switch in the
multi_getsock() function.
2008-01-18 21:51:10 +00:00
Gunter Knauf
47246eb401 updated lib versions. 2008-01-17 01:25:46 +00:00
Gunter Knauf
3620e71010 updated copyright for new year. 2008-01-17 01:20:03 +00:00
Daniel Stenberg
ddaa78f08b Dmitry Kurochkin's additional pipelining bugfix 2008-01-16 21:33:52 +00:00
Daniel Stenberg
b3de497d83 Dmitry Kurochkin worked a lot on improving the HTTP Pipelining support that
previously had a number of flaws, perhaps most notably when an application
fired up N transfers at once as then they wouldn't pipeline at all that
nicely as anyone would think... Test case 530 was also updated to take the
improved functionality into account.
2008-01-16 12:24:00 +00:00
Daniel Stenberg
ed6466d176 Calls to Curl_failf() are not supposed to provide a trailing newline as the
function itself adds that. Fixed on 50 or something strings!
2008-01-15 23:19:02 +00:00
Daniel Stenberg
991505e077 Woops, partly revert my previous commit and do it slightly differently instead.
The signalling of that a global DNS cache is wanted is done by setting the
option but the setting of the internal variable that it is in use must not be
done until it finally actually gets used!

NOTE and WARNING: I noticed that you can't actually switch off the global dns
cache with CURLOPT_DNS_USE_GLOBAL_CACHE but you couldn't do that previously
either and the option is very clearly and loudly documented as DO NOTE USE so
I won't bother to fix this bug now.
2008-01-15 22:44:12 +00:00
Daniel Stenberg
56f17d2c9f I made the torture test on test 530 go through. This was actually due to
silly code left from when we switched to let the multi handle "hold" the dns
cache when using the multi interface... Of course this only triggered when a
certain function call returned error at the correct moment.
2008-01-15 22:15:55 +00:00
Daniel Stenberg
53108806af Joe Malicki filed bug report #1871269
(http://curl.haxx.se/bug/view.cgi?id=1871269) and we could fix his hang-
problem that occurred when doing a large HTTP POST request with the
response-body read from a callback.
2008-01-14 22:02:14 +00:00
Yang Tse
1d620a3df4 fix compiler warning 2008-01-14 19:40:10 +00:00
Gisle Vanem
bcc3c9279a Trying GnuTLS and OpenSSL together fails to compile in not so
obvious ways. Give an explicit error.
2008-01-14 16:51:32 +00:00
Yang Tse
a8ae8087c4 fix compiler warning 2008-01-13 04:39:32 +00:00
Yang Tse
3564aec388 fix compiler warning 2008-01-11 17:35:10 +00:00
Yang Tse
a042090467 fix compiler warning 2008-01-11 16:49:35 +00:00
Daniel Stenberg
08adf67969 Daniel Egger made CURLOPT_RANGE work on file:// URLs the very same way it
already worked for FTP:// URLs
2008-01-11 14:20:41 +00:00
Daniel Stenberg
18faa50940 Georg Lippitsch brought CURLOPT_SEEKFUNCTION and CURLOPT_SEEKDATA to allow
libcurl to seek in a given input stream. This is particularly important when
doing upload resumes when there's already a huge part of the file present
remotely. Before, and still if this callback isn't used, libcurl will read
and through away the entire file up to the point to where the resuming
begins (which of course can be a slow opereration depending on file size,
I/O bandwidth and more). This new function will also be preferred to get
used instead of the CURLOPT_IOCTLFUNCTION for seeking back in a stream when
doing multi-stage HTTP auth with POST/PUT.
2008-01-10 10:30:19 +00:00
Daniel Stenberg
0ce484eed9 Nikitinskit Dmitriy filed bug report #1868255
(http://curl.haxx.se/bug/view.cgi?id=1868255) with a patch. It identifies
and fixes a problem with parsing WWW-Authenticate: headers with additional
spaces in the line that the parser wasn't written to deal with.
2008-01-10 09:17:07 +00:00
Daniel Stenberg
bce5ae9a07 corrected comment 2008-01-10 09:16:21 +00:00
Yang Tse
15f832d1c2 fix compiler warning 2008-01-09 19:11:56 +00:00
Daniel Stenberg
de23b98522 Introducing curl_easy_pause() and new magic return codes for both the read
and the write callbacks that now can make a connection's reading and/or
writing get paused.
2008-01-08 14:52:05 +00:00
Yang Tse
59b4bdf78d Change typecast due to http://cool.haxx.se/cvs.cgi/curl/include/curl/curl.h.diff?r1=1.336&r2=1.337 2008-01-08 01:05:50 +00:00
Daniel Stenberg
f111c9edae more SOCKS5_HOSTNAME adjustments from Richard Atterer 2008-01-06 21:41:38 +00:00
Daniel Stenberg
7138296633 make sure we deal with SOCKS5_HOSTNAME as a proxy type as well 2008-01-06 12:56:34 +00:00
Daniel Stenberg
cadd08f36a make sure CURLPROXY_SOCKS5_HOSTNAME is taken care of as well 2008-01-06 12:54:16 +00:00
Daniel Stenberg
423309541a Jeff Johnson filed bug report #1863171
(http://curl.haxx.se/bug/view.cgi?id=1863171) where he pointed out that
libcurl's date parser didn't accept a +1300 time zone which actually is used
fairly often (like New Zealand's Dailight Savings Time), so I modified the
parser to now accept up to and including -1400 to +1400.
2008-01-06 10:50:57 +00:00
Daniel Stenberg
b430576436 Based on further discussion on curl-library, I reverted yesterday's SOCKS5
code to instead introduce support for a new proxy type called
CURLPROXY_SOCKS5_HOSTNAME that is used to send the host name to the proxy
instead of IP address and there's thus no longer any need for a new
curl_easy_setopt() option.

The default SOCKS5 proxy is again back to sending the IP address to the
proxy.  The new curl command line option for enabling sending host name to a
SOCKS5 proxy is now --socks5-hostname.
2008-01-05 22:04:18 +00:00
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