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
Yang Tse
0f634a0c89
fix yet another leftover in previous commit
2007-03-23 12:13:08 +00:00
Yang Tse
047cd1a533
fix leftover in previous commit
2007-03-23 12:09:16 +00:00
Yang Tse
f9eb61e90a
fix compiler warning: empty body in an if/else-statement
2007-03-23 12:01:19 +00:00
Yang Tse
34afb0b257
Change spelling, ONE_TERRABYTE -> ONE_TERABYTE
...
Shave off a couple of function calls in the part of
Curl_pgrsUpdate() which is always executed when called.
Fix a couple of comments.
2007-03-23 04:23:53 +00:00
Dan Fandrich
6bb9bd8b69
Don't shut down sftp in an error if it was never started.
2007-03-23 00:03:34 +00:00
Dan Fandrich
3229a80c9f
Fixed unused variable compiler warning.
2007-03-22 17:58:01 +00:00
Dan Fandrich
5eba84eed3
Use C99-style variadic macros when available.
2007-03-22 17:18:41 +00:00
Yang Tse
4fb483012c
Add a couple of local macros to improve code readability.
...
For completeness sake, wait_ms() might also get interrupted when
experimental CURL_ACKNOWLEDGE_EINTR is defined.
2007-03-22 15:32:28 +00:00
Yang Tse
90ce18019c
reverted back to previous version => http://curl.haxx.se/mail/lib-2007-03/0258.html
2007-03-21 13:09:39 +00:00
Yang Tse
fe10cb2ef5
avoid the use of variadic macros for greater portability
2007-03-21 08:17:13 +00:00
Yang Tse
842be6c52f
fix compiler warning: implicit conversion from "long" to "int"
2007-03-21 07:29:03 +00:00
Yang Tse
e4b754f64e
Fixed: When a signal was caught awaiting for an event using Curl_select()
...
or Curl_poll() with a non-zero timeout both functions would restart the
specified timeout. This could even lead to the extreme case that if a
signal arrived with a frecuency lower to the specified timeout neither
function would ever exit.
Added experimental symbol definition check CURL_ACKNOWLEDGE_EINTR in
Curl_select() and Curl_poll(). When compiled with CURL_ACKNOWLEDGE_EINTR
defined both functions will return as soon as a signal is caught. Use it
at your own risk, all calls to these functions in the library should be
revisited and checked before fully supporting this feature.
2007-03-20 20:00:40 +00:00
Gisle Vanem
34ed4642ec
Remove unneeded 'HAVE_*' defines.
2007-03-20 16:30:14 +00:00
Yang Tse
072a8b2955
Bryan Henderson fixed the progress function so that it can get called
...
more frequently allowing same calling frecuency for the client progress
callback, while keeping the once a second frecuency for speed calculations
and internal display of the transfer progress.
2007-03-19 12:02:33 +00:00
Yang Tse
da2b75a026
Fix compiler warning/error: ISO C90 forbids mixed declarations and code
2007-03-18 17:29:24 +00:00
Yang Tse
0e2d3b7b6c
Code refactoring, extracting a new function wait_ms() from Curl_select and
...
Curl_poll() which is called whenever not a single valid file descriptor is
passed to these functions.
Improve readibility using a poll() macro to replace WSApoll().
2007-03-18 04:51:40 +00:00
Gisle Vanem
46a50aa001
Remove unneeded 'HAVE_*' defines. Detect i386 OS-target (gcc).
2007-03-17 18:19:15 +00:00
Dan Fandrich
9189ac1141
Fixed some memory leaks in various error paths.
2007-03-15 21:25:56 +00:00
Dan Fandrich
8605321d06
Fixed a memory leak.
2007-03-15 00:04:41 +00:00
Daniel Stenberg
d314453037
yassl doesn't have SSL_get_shutdown() in its OpenSSL() layer so we check for
...
it and avoid it, even if this cripples the CCC command
2007-03-14 23:40:46 +00:00
Dan Fandrich
9cb69f77f1
Fixed a NULL pointer dereference on sftp initialization failure.
...
Added some more debug logs.
2007-03-14 02:04:17 +00:00
Gisle Vanem
0188493d54
Use Curl_inet_pton() instead of inet_pton().
2007-03-13 12:52:28 +00:00
Yang Tse
b66def2b4c
Emmanuel Dreyfus fixed not being able to find ber_free() in
...
libldap when available in liblber.
2007-03-12 05:09:25 +00:00
Daniel Stenberg
20b9ab49a7
can just as well NULLify the pointer in a single spot
2007-03-11 22:48:58 +00:00
Daniel Stenberg
c8cd13337e
reverted the pselect patch => http://curl.haxx.se/mail/lib-2007-03/0100.html
2007-03-11 09:11:29 +00:00
Yang Tse
40e9e40cb4
fix compiler warning: unused variable
2007-03-11 00:26:01 +00:00
Daniel Stenberg
09c70dec08
Eygene Ryabinkin fixed a use-after-free issue with HTTP transfers with the
...
multi interface
2007-03-10 22:51:20 +00:00
Daniel Stenberg
dbaf4f9361
- Bryan Henderson introduces two things:
...
1) the progress callback gets called more frequently (at times)
2) libcurl *might* call the callback when it receives a signal
2007-03-10 12:11:21 +00:00
Daniel Stenberg
1e55ed5c7d
- Robert Iakobashvili fixed CURLOPT_INTERFACE for IPv6.
2007-03-09 22:48:07 +00:00
Daniel Stenberg
6dd4fe0740
- Robert A. Monat improved the maketgz and VC6/8 generating to set the correct
...
machine type too.
2007-03-09 22:26:59 +00:00
Dan Fandrich
85daec253c
Honour --ftp-ssl-control on ftps:// URLs to allow encrypted control and
...
unencrypted data connections.
2007-03-07 22:42:05 +00:00
Yang Tse
82d310d0d9
Do not remove CURLM_STATE_WAITPROXYCONNECT from the CURLMstate enum
...
in builds with HTTP support disabled to keep consistent enum values
for CURLMstate in all kind of builds.
2007-03-01 12:02:17 +00:00
Yang Tse
4fdb42377b
proper symbol definition check for Novell NetWare
2007-02-28 15:10:20 +00:00
Yang Tse
be8a5d0aef
proper symbol definition check for all AmigaOS flavours
2007-02-28 14:45:48 +00:00
Yang Tse
99dcd33f04
protect from themselves those who need it
2007-02-28 05:15:56 +00:00
Daniel Stenberg
060f7ca2d2
- Hang Kin Lau found and fixed: When I use libcurl to connect to an https
...
server through a proxy and have the remote https server port set using the
CURLOPT_PORT option, protocol gets reset to http from https after the first
request.
User defined URL was modified internally by libcurl and subsequent reuse of
the easy handle may lead to connection using a different protocol (if not
originally http).
I found that libcurl hardcoded the protocol to "http" when it tries to
regenerate the URL if CURLOPT_PORT is set. I tried to fix the problem as
follows and it's working fine so far
2007-02-27 22:12:15 +00:00
Gisle Vanem
d165da07fe
Added TOPDIR variable. Put dependencies in external file.
2007-02-27 15:24:32 +00:00
Yang Tse
acc4cf87cd
no proxy support if libcurl is built with HTTP disabled
2007-02-27 02:24:13 +00:00
Daniel Stenberg
7444342675
Jose Kahan pointed out a Digest server that provided the algorith last in the
...
header line without quotes and with a CRLF immediately following...
2007-02-26 22:03:01 +00:00
Gisle Vanem
c514a2a89a
Removed inclusion of <sys/types.h> and <sys/stat.h> in .c-files
...
since they're already included through "setup.h".
2007-02-26 04:24:26 +00:00
Gisle Vanem
e2f0580dfe
Removed unneeded 'HAVE_x' defines.
2007-02-26 03:41:25 +00:00
Gisle Vanem
d165bed2d6
Fix typo.
2007-02-26 03:38:26 +00:00
Daniel Stenberg
b819c72700
- Adam D. Moss made the HTTP CONNECT procedure less blocking when used from
...
the multi interface. Note that it still does a part of the connection in a
blocking manner.
2007-02-25 11:38:13 +00:00
Yang Tse
4937281ddc
compiler warning fix
2007-02-22 07:39:45 +00:00
Yang Tse
8e27ed2fdd
Fix compiler warning "statement is unreachable"
2007-02-22 06:22:19 +00:00
Yang Tse
9bf9617ad6
Fix compiler warnings
...
"case label value exceeds maximum value for type" and
"comparison is always false due to limited range of data type"
Both triggered when using a bool variable as the switch variable
in a switch statement and using enums for the case targets.
2007-02-22 06:19:39 +00:00
Yang Tse
69565afab0
Check for stdbool.h at configuration stage, and include it if available.
...
Check for lowercase 'bool' type at configuration stage. If not available
provide a suitable replacement with a type definition of 'unsigned char'
in setup_once.h
Move definitions of TRUE and FALSE to setup_once.h
2007-02-22 02:51:54 +00:00
Daniel Stenberg
39aac63521
silence two cases of "comparison between signed and unsigned"
2007-02-21 22:02:13 +00:00
Daniel Stenberg
f19d333ef6
- Ravi Pratap provided work on libcurl making pipelining more robust and
...
fixing some bugs:
o Don't mix GET and POST requests in a pipeline
o Fix the order in which requests are dispatched from the pipeline
o Fixed several curl bugs with pipelining when the server is returning
chunked encoding:
* Added states to chunked parsing for final CRLF
* Rewind buffer after parsing chunk with data remaining
* Moved chunked header initializing to a spot just before receiving
headers
2007-02-21 21:59:40 +00:00
Yang Tse
3a634a273a
curlassert macro replaced with DEBUGASSERT macro defined in setup_once.h
2007-02-21 19:03:20 +00:00
Dan Fandrich
06d1b029f6
Include some possible dependencies of arpa/inet.h
2007-02-21 18:05:38 +00:00
Yang Tse
48029d7e74
fix compiler warning "enumerated type mixed with another type"
2007-02-21 05:48:07 +00:00
Linus Nielsen Feltzing
2f5e99ca02
New FTP CCC functionality - adds passive and active mode to accomodate for different server behaviour
2007-02-20 22:02:11 +00:00
Dan Fandrich
6014c21bc9
Include network byte order conversion macros on Minix.
2007-02-20 17:31:20 +00:00
Yang Tse
8c0b1dc3c5
compiler warning fix
2007-02-20 14:26:15 +00:00
Yang Tse
be3c5f0b94
compiler warning fix
2007-02-20 14:01:04 +00:00
Yang Tse
29bb6f65f1
Move header file inclusion logic and definition of timeval
...
struct for platforms that don't have it to setup_once.h
2007-02-20 12:12:27 +00:00
Daniel Stenberg
1045b8d382
- Shmulik Regev found a memory leak in re-used HTTPS connections, at least
...
when the multi interface was used.
2007-02-19 12:20:32 +00:00
Daniel Stenberg
d2bdad5945
and fix warnings due to lack of protos
2007-02-19 11:55:49 +00:00