1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
Commit Graph

3559 Commits

Author SHA1 Message Date
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