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

4867 Commits

Author SHA1 Message Date
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
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
Daniel Stenberg
17e8d60c01 - Robson Braga Araujo made passive FTP transfers work with SOCKS (both 4 and
5).
2007-02-19 11:53:54 +00:00
Daniel Stenberg
ec1b351317 fixed code to compile and removed one warning 2007-02-19 11:47:04 +00:00
Daniel Stenberg
cbf58d88d0 - Jeff Pohlmeyer identified two problems: first a rather obscure problem with
the multi interface and connection re-use that could make a
  curl_multi_remove_handle() ruin a pointer in another handle.

  The second problem was less of an actual problem but more of minor quirk:
  the re-using of connections wasn't properly checking if the connection was
  marked for closure.
2007-02-18 23:02:42 +00:00
Yang Tse
300cbc2e21 Michal Marek comment fix 2007-02-18 00:54:26 +00:00
Yang Tse
ec9e399668 fix ENAMETOOLONG and ENOTEMPTY may already be defined in errno.h 2007-02-18 00:34:37 +00:00
Yang Tse
d9bf55570b Move portable error number symbolic name definitions to setup_once.h 2007-02-17 13:51:24 +00:00
Dan Fandrich
a0a47f2767 Better separate the library dependencies into those required by libcurl
and those required by other components to avoid forcing unneeded
dependencies into the target objects.
2007-02-17 01:29:01 +00:00
Dan Fandrich
69f2f5cb6f Replicate the configure tests that determined that timeval was available. 2007-02-17 01:23:37 +00:00
Yang Tse
a1d5983991 use macros ERRNO, SET_ERRNO(), SOCKERRNO and SET_SOCKERRNO() for errno handling 2007-02-16 18:19:35 +00:00
Daniel Stenberg
aa4435c23b - Duncan Mac-Vicar Prett and Michal Marek reported problems with resetting
CURLOPT_RANGE back to no range on an easy handle when using FTP.
2007-02-16 15:37:05 +00:00
Daniel Stenberg
dca8f962e0 maxdownload is actually -1 for unlimited 2007-02-16 15:27:49 +00:00
Yang Tse
6663608d15 avoid redefinition of SET_ERRNO() 2007-02-15 18:44:32 +00:00
Yang Tse
d21e4eb8ae introduce uppercase macros SOCKERRNO, SET_SOCKERRNO(), ERRNO and SET_ERRNO()
making them available to any source code file which includes "setup.h".

Macro SOCKERRNO / SET_SOCKERRNO() returns / sets the *socket-related* errno
(or equivalent) on this platform to hide platform details to code using it.

Macro ERRNO / SET_ERRNO() returns / sets the NOT *socket-related* errno
(or equivalent) on this platform to hide platform details to code using it.
2007-02-15 16:23:24 +00:00
Yang Tse
d86e6d3ed2 Do not define HAVE_GMTIME_R for native Windows builds 2007-02-15 01:58:37 +00:00
Yang Tse
f99ca90540 Daniel Mirchandani fix to make libcurl build nicely on Winsock
build targets when --disable-verbose is specified.
2007-02-15 01:38:07 +00:00
Gunter Knauf
e24cb6cb90 enabled IPV6 builds. 2007-02-15 01:36:35 +00:00
Yang Tse
fbcf86b83e avoid using funtion isblank() and just use our ISBLANK
macro to provide this functionality on all platforms
2007-02-14 13:31:37 +00:00
Yang Tse
5c3f36b4b4 compiler warning fix 2007-02-14 04:45:30 +00:00
Daniel Stenberg
4efa0d9f68 ftp@example.com is now the new anonymous FTP password. I opted for 'ftp' on
the left side of @ to make it short(er).
2007-02-13 22:50:16 +00:00
Daniel Stenberg
e021fe9444 - Robert A. Monat made libcurl build fine with VC2005 - it doesn't have
gmtime_r() like the older VC versions. He also made use of some machine-
  specific defines to differentiate the "OS" define.
2007-02-13 21:21:44 +00:00
Yang Tse
be71ccbce3 check for isblank() at configuration stage. If not available
provide a suitable replacement for use in our ISBLANK macro
2007-02-13 19:01:03 +00:00
Yang Tse
0db485a448 use our own ISUPPER and ISLOWER macros 2007-02-13 18:02:20 +00:00
Yang Tse
6d05a33ed9 use our own ISBLANK macro 2007-02-13 17:47:27 +00:00
Yang Tse
569c169559 use our own ISSPACE macro 2007-02-13 17:28:40 +00:00
Yang Tse
5649b738be compiler warning fix 2007-02-13 02:30:31 +00:00
Daniel Stenberg
7f70dbcad5 Rob Crittenden added support for NSS (Network Security Service) for the
SSL/TLS layer. http://www.mozilla.org/projects/security/pki/nss/
2007-02-12 22:32:37 +00:00
Daniel Stenberg
28b932fb4e - Shmulik Regev fixed so that the final CRLF of HTTP response headers are sent
to the debug callback.

- Shmulik Regev added CURLOPT_HTTP_CONTENT_DECODING and
  CURLOPT_HTTP_TRANSFER_DECODING that if set to zero will disable libcurl's
  internal decoding of content or transfer encoded content. This may be
  preferable in cases where you use libcurl for proxy purposes or similar. The
  command line tool got a --raw option to disable both at once.
2007-02-12 21:13:47 +00:00
Daniel Stenberg
c7d0966201 - Jeff Pohlmeyer fixed a flaw in curl_multi_add_handle() when adding a handle
that has an easy handle present in the "closure" list pending closure.
2007-02-12 12:15:41 +00:00
Daniel Stenberg
04e6568a7e SCP upload done non-blocking 2007-02-07 22:00:33 +00:00
Yang Tse
77fcad041f fix for millisecond resolution timeouts 2007-02-06 18:08:11 +00:00
Yang Tse
e213555c98 compiler warning fix 2007-02-06 18:06:37 +00:00
Daniel Stenberg
028a9d6785 read SFTP with the non-blocking API 2007-02-06 15:41:19 +00:00
Yang Tse
d0aca8017f compiler warning fix 2007-02-06 03:31:27 +00:00
Daniel Stenberg
91386937ff - Michael Wallner provided a patch that adds support for CURLOPT_TIMEOUT_MS
and CURLOPT_CONNECTTIMEOUT_MS that, as their names should hint, do the
  timeouts with millisecond resolution instead. The only restriction to that
  is the alarm() (sometimes) used to abort name resolves as that uses full
  seconds. I fixed the FTP response timeout part of the patch.

  Internally we now count and keep the timeouts in milliseconds but it also
  means we multiply set timeouts with 1000. The effect of this is that no
  timeout can be set to more than 2^31 milliseconds (on 32 bit systems), which
  equals 24.86 days.  We probably couldn't before either since the code did
  *1000 on the timeout values on several places already.
2007-02-05 22:51:32 +00:00
Yang Tse
bc2183b440 compiler warning fix 2007-02-05 04:10:32 +00:00
Gisle Vanem
6a175b42db Suppress warning "'nread' might be used uninitialized in this function". 2007-02-04 12:18:22 +00:00
Yang Tse
82f52e5a6f compiler warning fix 2007-02-03 13:05:28 +00:00
Daniel Stenberg
138b4f27b4 - Manfred Schwarb reported that socks5 support was broken and help us pinpoint
the problem. The code now tries harder to use httproxy and proxy where
  apppropriate, as not all proxies are HTTP...
2007-02-03 09:33:54 +00:00
Yang Tse
c26ec47e90 compiler warning fix 2007-02-02 17:16:06 +00:00
Yang Tse
ef6f24a7ce move DEBUGF macro definition to setup_once.h 2007-02-02 15:31:32 +00:00
Daniel Stenberg
abe90019d3 prefer using the (upcoming) non-blocking libssh2 API 2007-02-02 15:26:57 +00:00
Yang Tse
d2dd3d7e16 compiler warning fix 2007-02-01 15:36:56 +00:00
Gisle Vanem
1c63ceb317 Suppress the "'convbuf' might be used uninitialized in this function" warning. 2007-02-01 12:23:00 +00:00
Yang Tse
c25283185a fogot to change Curl_mk_connc in header file 2007-02-01 11:27:42 +00:00
Yang Tse
54db98c220 compiler warning fix 2007-02-01 01:42:13 +00:00
Yang Tse
49c4d9c9cd add debug messages for initialization failures 2007-01-31 19:47:49 +00:00
Gisle Vanem
e994c6af75 Use DOS line-endings. 2007-01-29 19:08:04 +00:00
Daniel Stenberg
abdbd3100f - Michael Wallner reported that when doing a CONNECT with a custom User-Agent
header, you got _two_ User-Agent headers in the CONNECT request...! Added
  test case 287 to verify the fix.
2007-01-29 09:26:36 +00:00
Gunter Knauf
ddace02efe fixed segfault when compiled with MingW32 and cmd or command shell. 2007-01-29 00:51:02 +00:00
Daniel Stenberg
1f4c8c4f09 Andreas Rieke added extra infof() for when a connection is not re-used due to
SSL conditions not being the same
2007-01-28 22:45:22 +00:00
Daniel Stenberg
8162b32bad silence compiler warnings 2007-01-28 22:36:23 +00:00
Gunter Knauf
daf527b276 enabled build with sspi. 2007-01-28 21:54:10 +00:00
Gunter Knauf
ee51c07be6 enabled build with hardcoded ca-bundle path;
added distclean target.
2007-01-28 15:31:06 +00:00
Gunter Knauf
856ba4c6c6 force to create ca-bunde.h even if it exists already. 2007-01-28 15:07:53 +00:00
Gunter Knauf
b3e23373bd use var for awk. 2007-01-28 14:43:25 +00:00
Daniel Stenberg
e5adab39b1 curl_easy_reset() now resets the CA bundle path correctly 2007-01-28 12:58:13 +00:00
Gunter Knauf
d31153584e another small fix to directory listing output; disabled CURL_LIBSSH2_DEBUG. 2007-01-28 12:35:39 +00:00
Gunter Knauf
a79e5d7925 fix sftp directory listing so that it works without -v and is redirectable with -o/-O. 2007-01-27 12:14:02 +00:00
Gunter Knauf
82491d5c06 tell us what we put out here... 2007-01-27 11:50:42 +00:00
Yang Tse
b6f889085d update copyright year notice 2007-01-27 03:43:05 +00:00
Yang Tse
cdbbb7d900 Compiler warning fix 2007-01-27 03:14:25 +00:00
Yang Tse
f1918aa343 sync comment with reality 2007-01-27 01:56:20 +00:00
Dan Fandrich
e6aed92742 Fixed compiler warning. 2007-01-26 17:50:06 +00:00
Gunter Knauf
5f5a28d20e added project header to lib resource file; fixed header copyright. 2007-01-26 08:53:03 +00:00
Daniel Stenberg
2b280bcc69 fix compiler warnings for SSL-disabled builds 2007-01-25 21:00:03 +00:00
Gunter Knauf
83a43bea8a removed unused define. 2007-01-25 15:00:01 +00:00
Gunter Knauf
2b7bcf2505 fixed copyright for new year. 2007-01-25 13:17:20 +00:00
Gunter Knauf
4b27fae069 enabled build with libssh2. 2007-01-25 13:14:42 +00:00
Daniel Stenberg
10a13eba72 fix non-SSL builds again 2007-01-25 11:09:56 +00:00
Dan Fandrich
44ac2776ae Fixed a dangling pointer problem that prevented the http_proxy environment
variable from being properly used in many cases (and caused test case 63
to fail).
2007-01-25 01:35:43 +00:00
Gunter Knauf
36e3e6ed16 removed not used define. 2007-01-25 00:26:29 +00:00
Dan Fandrich
5f9cbc4209 Only shut down SSL if the CCC command succeeded. 2007-01-24 19:09:12 +00:00
Daniel Stenberg
3239f059b8 moved the SSL pending function to the proper place and name 2007-01-24 17:19:08 +00:00
Daniel Stenberg
45bac25d90 bail out on strdup() errors 2007-01-24 12:34:23 +00:00
Daniel Stenberg
354c8dcd82 - David McCreedy did NTLM changes mainly for non-ASCII platforms:
#1
  There's a compilation error in http_ntlm.c if USE_NTLM2SESSION is NOT
  defined.  I noticed this while testing various configurations.  Line 867 of
  the current http_ntlm.c is a closing bracket for an if/else pair that only
  gets compiled in if USE_NTLM2SESSION is defined.  But this closing bracket
  wasn't in an #ifdef so the code fails to compile unless USE_NTLM2SESSION was
  defined.  Lines 198 and 140 of my patch wraps that closing bracket in an
  #ifdef USE_NTLM2SESSION.

  #2
  I noticed several picky compiler warnings when DEBUG_ME is defined.  I've
  fixed them with casting.  By the way, DEBUG_ME was a huge help in
  understanding this code.

  #3
  Hopefully the last non-ASCII conversion patch for libcurl in a while.  I
  changed the "NTLMSSP" literal to hex since this signature must always be in
  ASCII.

  Conversion code was strategically added where necessary.  And the
  Curl_base64_encode calls were changed so the binary "blobs" http_ntlm.c
  creates are NOT translated on non-ASCII platforms.
2007-01-23 22:57:42 +00:00
Daniel Stenberg
9e1aef7183 very minor indent change 2007-01-23 22:13:05 +00:00
Gunter Knauf
9ab7cda010 enabled build with libssh2; fixed copyright for new year.. 2007-01-23 00:26:45 +00:00
Gisle Vanem
7b704e173c Supress "comparison between signed and unsigned" warning. 2007-01-17 15:15:21 +00:00
Daniel Stenberg
8cade952bf David McCreedy fixed a flaw from his previous non-ascii HTTP patch 2007-01-16 22:26:50 +00:00
Daniel Stenberg
385e612fa5 - Armel Asselin improved libcurl to behave a lot better when an easy handle
doing an FTP transfer is removed from a multi handle before completion. The
  fix also fixed the "alive counter" to be correct on "premature removal" for
  all protocols.
2007-01-16 22:22:10 +00:00
Daniel Stenberg
1886388791 restore previous addition to the amount of data that is returned 2007-01-16 21:28:45 +00:00
Dan Fandrich
bbdc483671 Fixed a small memory leak in tftp uploads discovered by curl's memory leak
detector.  Also changed tftp downloads to URL-unescape the downloaded
file name.
2007-01-16 18:33:25 +00:00
Daniel Stenberg
0fb5a65a58 - David McCreedy provided libcurl changes for doing HTTP communication on
non-ASCII platforms. It does add some complexity, most notably with more
  #ifdefs, but I want to see this supported added and I can't see how we can
  add it without the extra stuff added.
2007-01-14 14:57:51 +00:00
Daniel Stenberg
869d65337e fixed bad variable use when getting the size which we should read when
attempting not to read data that might belong to the next response (if
pipelining)
2007-01-13 23:33:21 +00:00
Daniel Stenberg
277df1c6b1 make Curl_cookie_clearall() survive getting called with a NULL pointer 2007-01-13 23:32:14 +00:00
Dan Fandrich
9e61c904ac Display crypto engine name correctly in debug message. 2007-01-10 21:21:53 +00:00
Linus Nielsen Feltzing
d465199411 Correct error code for CCC/SSL shutdown failure 2007-01-08 11:24:11 +00:00
Linus Nielsen Feltzing
55123424c8 Removed unused variable in Curl_ossl_shutdown() 2007-01-08 10:03:19 +00:00
Linus Nielsen Feltzing
7515a75206 Fix compilation errors when building without SSL 2007-01-06 10:49:11 +00:00
Daniel Stenberg
4750e6f3c5 - Linus Nielsen Feltzing introduced the --ftp-ssl-ccc command line option to
curl that uses the new CURLOPT_FTP_SSL_CCC option in libcurl. If enabled, it
  will make libcurl shutdown SSL/TLS after the authentication is done on a
  FTP-SSL operation.
2007-01-05 23:11:14 +00:00
Gisle Vanem
b7aaa4d907 Include <dos.h> for delay() on MSDOS. 2007-01-05 15:56:28 +00:00
Daniel Stenberg
359d500908 - David McCreedy made changes to allow base64 encoding/decoding to work on
non-ASCII platforms.
2007-01-03 23:04:38 +00:00
Daniel Stenberg
d8ff0336a5 - Matt Witherspoon fixed the flaw which made libcurl 7.16.0 always store
downloaded data in two buffers, just to be able to deal with a special HTTP
  pipelining case. That is now only activated for pipelined transfers. In
  Matt's case, it showed as a considerable performance difference,
2007-01-03 22:18:38 +00:00
Daniel Stenberg
0682d25da5 - Victor Snezhko helped us fix bug report #1603712
(http://curl.haxx.se/bug/view.cgi?id=1603712) (known bug #36) --limit-rate
  (CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_RECV_SPEED_LARGE) are broken
  on Windows (since 7.16.0, but that's when they were introduced as previous
  to that the limiting logic was made in the application only and not in the
  library). It was actually also broken on select()-based systems (as apposed
  to poll()) but we haven't had any such reports. We now use select(), Sleep()
  or delay() properly to sleep a while without waiting for anything input or
  output when the rate limiting is activated with the easy interface.
2007-01-02 22:34:56 +00:00
Daniel Stenberg
bd600fbebe curl_easy_duphandle() sets the magic number in the new handle 2006-12-29 11:32:14 +00:00
Daniel Stenberg
bedc61ac45 - Robert Foreman provided a prime example snippet showing how libcurl would
get confused and not acknowledge the 'no_proxy' variable properly once it
  had used the proxy and you re-used the same easy handle. I made sure the
  proxy name is properly stored in the connect struct rather than the
  sessionhandle/easy struct.
2006-12-22 15:04:59 +00:00
Daniel Stenberg
61a6992559 Curl_getinfo() now checks for a NULL SessionHandle pointer 2006-12-22 13:44:10 +00:00
Daniel Stenberg
ebee2e323d - David McCreedy fixed a bad call to getsockname() that wrongly used a size_t
variable to point to when it should be a socklen_t.
2006-12-22 13:30:54 +00:00
Daniel Stenberg
b2f8de571f When setting a proxy with environment variables and (for example) running
'curl [URL]' with a URL without a protocol prefix, curl would not send a
correct request as it failed to add the protocol prefix.
2006-12-22 07:30:21 +00:00
Daniel Stenberg
cb4a5f5a2b minor indent fix 2006-12-21 15:47:19 +00:00
Daniel Stenberg
1beb7de7e0 removed unused variables 2006-12-21 10:18:15 +00:00
Daniel Stenberg
89ab5f4380 Robson Braga Araujo reported bug #1618359
(http://curl.haxx.se/bug/view.cgi?id=1618359) and subsequently provided a
patch for it: when downloading 2 zero byte files in a row, curl 7.16.0
enters an infinite loop, while curl 7.16.1-20061218 does one additional
unnecessary request.

Fix: During the "Major overhaul introducing http pipelining support and
shared connection cache within the multi handle." change, headerbytecount
was moved to live in the Curl_transfer_keeper structure. But that structure
is reset in the Transfer method, losing the information that we had about
the header size. This patch moves it back to the connectdata struct.
2006-12-21 10:15:38 +00:00
Daniel Stenberg
8d11767048 recv() doesn't take MSG_NOSIGNAL in its forth argument so let's not pass it.
Brendan Jurd pointed out.
2006-12-16 22:28:08 +00:00
Daniel Stenberg
fcccf9aa0d Brendan Jurd provided a fix that now prevents libcurl from getting a SIGPIPE
during certain conditions when GnuTLS is used.
2006-12-16 21:33:51 +00:00
Daniel Stenberg
72bd027537 Brendan Jurd pointed out these typos 2006-12-16 21:05:33 +00:00
Gisle Vanem
33831759b5 Fix typo. 2006-12-15 16:49:40 +00:00
Daniel Stenberg
88c8d72a21 Alexey Simak found out that when doing FTP with the multi interface and
something went wrong like it got a bad response code back from the server,
libcurl would leak memory. Added test case 538 to verify the fix.

I also noted that the connection would get cached in that case, which
doesn't make sense since it cannot be re-use when the authentication has
failed. I fixed that issue too at the same time, and also that the path
would be "remembered" in vain for cases where the connection was about to
get closed.
2006-12-11 09:32:58 +00:00
Daniel Stenberg
cf99fed17a PROT_CLOSEACTION doesn't have to be its own bit but can just as well just
include the protocol bits of such actions, which currently only means FTP
2006-12-11 09:31:08 +00:00
Daniel Stenberg
ca48b6bf35 fixed the printf formatting after I changed the type of 'excess' 2006-12-07 15:33:06 +00:00
Daniel Stenberg
840e796aa9 Sebastien Willemijns reported bug #1603712
(http://curl.haxx.se/bug/view.cgi?id=1603712) which is about connections
getting cut off prematurely when --limit-rate is used. While I found no such
problems in my tests nor in my reading of the code, I found that the
--limit-rate code was severly flawed (since it was moved into the lib, since
7.15.5) when used with the easy interface and it didn't work as documented so
I reworked it somewhat and now it works for my tests.
2006-12-06 09:37:40 +00:00
Daniel Stenberg
5fd096da8d Stefan Krause pointed out a compiler warning with a picky MSCV compiler when
passing a curl_off_t argument to the Curl_read_rewind() function which takes
an size_t argument. Curl_read_rewind() also had debug code left in it and it
was put in a different source file with no good reason when only used from
one single spot.
2006-12-05 21:40:14 +00:00
Daniel Stenberg
eb29c5c285 removed the final traces of the closepolicy option 2006-12-05 21:39:24 +00:00
Daniel Stenberg
e4505aefd9 Jared Lundell filed bug report #1604956
(http://curl.haxx.se/bug/view.cgi?id=1604956) which identified setting
CURLOPT_MAXCONNECTS to zero caused libcurl to SIGSEGV. Starting now, libcurl
will always internally use no less than 1 entry in the connection cache.
2006-12-05 15:36:26 +00:00
Daniel Stenberg
d6b0612882 better preprocessor check for recent MSVC versions 2006-12-05 15:24:18 +00:00
Daniel Stenberg
4c65eb0af8 CURLOPT_FORBID_REUSE works again with a cleaned up order of doing things in
Curl_done()
2006-12-05 15:17:32 +00:00
Daniel Stenberg
318a8258fd oops, fix belonging to the previous curl_getdate() fix since it makes MSVC
use gmtime_r
2006-12-05 15:00:14 +00:00
Daniel Stenberg
17ae28e0fe Martin Skinner brought back bug report #1230118 to haunt us once again.
(http://curl.haxx.se/bug/view.cgi?id=1230118) curl_getdate() did not work
properly for all input dates on Windows. It was mostly seen on some TZ time
zones using DST. Luckily, Martin also provided a fix.
2006-12-05 14:57:43 +00:00
Daniel Stenberg
3c4f622479 Alexey Simak filed bug report #1600447
(http://curl.haxx.se/bug/view.cgi?id=1600447) in which he noted that active
FTP connections don't work with the multi interface. The problem is here that
the multi interface state machine has a state during which it can wait for the
data connection to connect, but the active connection is not done in the same
step in the sequence as the passive one is so it doesn't quite work for
active. The active FTP code still use a blocking function to allow the remote
server to connect.

The fix (work-around is a better word) for this problem is to set the
boolean prematurely that the data connection is completed, so that the "wait
for connect" phase ends at once.
2006-12-05 13:49:29 +00:00
Daniel Stenberg
3ce43764be Matt Witherspoon fixed a problem case when the CPU load went to 100% when a
HTTP upload was disconnected:

"What appears to be happening is that my system (Linux 2.6.17 and 2.6.13) is
setting *only* POLLHUP on poll() when the conditions in my previous mail
occur. As you can see, select.c:Curl_select() does not check for POLLHUP. So
basically what was happening, is poll() was returning immediately (with
POLLHUP set), but when Curl_select() looked at the bits, neither POLLERR or
POLLOUT was set. This still caused Curl_readwrite() to be called, which
quickly returned. Then the transfer() loop kept continuing at full speed
forever."
2006-12-05 13:37:05 +00:00
Daniel Stenberg
d8c61d459e Toon Verwaest reported that there are servers that send the Content-Range:
header in a third, not suppported by libcurl, format and we agreed that we
could make the parser more forgiving to accept all the three found
variations.
2006-12-01 07:49:22 +00:00
Daniel Stenberg
688699a046 no need to access it with conn->data since data is already a local variable
holding the conn->data value
2006-11-27 13:38:32 +00:00
Daniel Stenberg
da58d03ff7 Venkat Akella found out that libcurl did not like HTTP responses that simply
responded with a single status line and no headers nor body. Starting now, a
HTTP response on a persistent connection (i.e not set to be closed after the
response has been taken care of) must have Content-Length or chunked
encoding set, or libcurl will simply assume that there is no body.

To my horror I learned that we had no less than 57(!) test cases that did bad
HTTP responses like this, and even the test http server (sws) responded badly
when queried by the test system if it is the test system. So although the
actual fix for the problem was tiny, going through all the newly failing test
cases got really painful and boring.
2006-11-25 13:32:04 +00:00
Daniel Stenberg
9ea3831c08 James Housley fixed SCP downloading by setting the maxdownload. 2006-11-25 09:49:29 +00:00
Yang Tse
a46f55b9de Make sure RETSIGTYPE is properly defined 2006-11-25 01:02:52 +00:00
Daniel Stenberg
a634f64400 James Housley did lots of work and introduced SFTP downloads. 2006-11-24 22:14:39 +00:00
Yang Tse
bcd8a3b240 Define HAVE_SIGNAL_H, HAVE_SIG_ATOMIC_T and HAVE_SIG_ATOMIC_T_VOLATILE
as appropriate for platforms that don't have autotools support
2006-11-24 16:38:58 +00:00
Yang Tse
73226415fc Added a check in configure that verifies if <signal.h> is available,
defining HAVE_SIGNAL_H if the header is available.

Added a check in configure that tests if the sig_atomic_t type is
available, defining HAVE_SIG_ATOMIC_T if it is available. Providing
a suitable default in setup_once.h if not available.

Added a check in configure that tests if the sig_atomic_t type is
already defined as volatile, defining HAVE_SIG_ATOMIC_T_VOLATILE
if it is available and already defined as volatile.
2006-11-22 18:41:34 +00:00
Gisle Vanem
b8039a821b Call libssh2_session_free() to release memory allocated during
libssh2 startup.
2006-11-15 05:35:35 +00:00
Gisle Vanem
438312f00e Free 'scp->path' in case of libssh2 setup failure. 2006-11-14 20:26:13 +00:00
Daniel Stenberg
3204494883 bug #1595348 by Ron pointed out this flaw and fix 2006-11-13 17:26:43 +00:00
Daniel Stenberg
e1ac99af1f fix header to match actual proto 2006-11-11 22:05:33 +00:00
Daniel Stenberg
be0d17e812 cleaned up Curl_write() and the sub functions it uses for various protocols.
They all now return ssize_t to Curl_write().

Unfortunately, Curl_read() is in a sorrier state but it too would benefit from
a similar cleanup.
2006-11-11 21:34:43 +00:00
Daniel Stenberg
4eb35406f4 Nir Soffer updated libcurl.framework.make: fix symlinks, should link to
Versions, not to ./Versions and indentation improvments
2006-11-09 21:58:28 +00:00
Daniel Stenberg
624745ab20 Dmitriy Sergeyev found a SIGSEGV with his test04.c example posted on 7 Nov
2006. It turned out we wrongly assumed that the connection cache was present
when tearing down a connection.
2006-11-09 21:54:33 +00:00
Daniel Stenberg
9354822e09 Ciprian Badescu found a SIGSEGV when doing multiple TFTP transfers using the
multi interface, but I could also repeat it doing multiple sequential ones
with the easy interface. Using Ciprian's test case, I could fix it.
2006-11-09 21:36:18 +00:00
Daniel Stenberg
f830d77307 Bradford Bruce reported that when setting CURLOPT_DEBUGFUNCTION without
CURLOPT_VERBOSE set to non-zero, you still got a few debug messages from the
SSL handshake. This is now stopped.
2006-11-08 21:49:14 +00:00
Daniel Stenberg
b5b3d9e5c7 Olaf fixed a leftover problem with the CONNECT fix of his that would leave a
wrong error message in the error message buffer.
2006-11-07 14:07:02 +00:00
Yang Tse
01926d66d7 add TODO note 2006-11-06 18:28:34 +00:00
Yang Tse
69f7d0a0ce compiler warning fix 2006-11-06 18:27:25 +00:00
Yang Tse
d1c84705ec remove redundant check for Win32 2006-11-06 18:26:36 +00:00
Yang Tse
1bcbe89802 Prevent multiple initialization of memdebug configuration variables.
This was possible on debug c-ares enabled builds when both CURL_MEMDEBUG
and CARES_MEMDEBUG environment variables were set. Leading to a file handle
leak even when both variables had the same value, and wierd test suite
results when different.
2006-11-05 12:42:50 +00:00
Gisle Vanem
bf57e9bb12 Ifdef around S_IRGRP and S_IROTH (meaningless on Win32). 2006-11-03 15:52:21 +00:00
Daniel Stenberg
a777eb3d81 Olaf Stueben provided a patch that I edited slightly. It fixes the notorious
KNOWN_BUGS #25, which happens when a proxy closes the connection when
libcurl has sent CONNECT, as part of an authentication negotiation. Starting
now, libcurl will re-connect accordingly and continue the authentication as
it should.
2006-11-03 12:43:55 +00:00
Daniel Stenberg
db680edc26 Update the information about what c-ares version that's required. 1.3.1 had
a fatal bug so we must require 1.3.2 to get flawless functionality with c-ares.
2006-11-03 10:56:37 +00:00
Daniel Stenberg
2147284cad James Housley brought support for SCP transfers 2006-11-02 21:56:40 +00:00
Yang Tse
0ed285e84d prototype for gethostname is in unistd.h 2006-11-02 00:33:43 +00:00
Daniel Stenberg
b1db9dbb16 corrected how tests/memanalyze.pl is used 2006-10-29 23:00:52 +00:00
Yang Tse
ba481718a4 Make more human readable and maintainable previous
compiler warning fix since it was Ok and actually
avoids the targeted compiler warning.
2006-10-29 14:58:59 +00:00
Daniel Stenberg
1be60dde7f updated to current status 2006-10-29 09:18:32 +00:00
Daniel Stenberg
e92e811a61 updated to reflect reality 2006-10-29 09:11:44 +00:00
Yang Tse
a93695a70e Compiler warning fix.
Assigning the const value zero to a pointer to function
results in a null pointer value assignment to the function
pointer.

Assignment of any nonzero value is what should result in a
implementation compiler dependent result.

Since what we want to do here is the first case, this should
not trigger compiler warnings related with conversions from
'pointer to data' to 'pointer to function'.

Our autobuild test suite will judge.
2006-10-27 15:32:18 +00:00
Gisle Vanem
ce935a2697 Fixed 'x_TYPE_ARG2' to match prototypes of recv() and send(). 2006-10-27 14:13:32 +00:00
Gisle Vanem
812ce0d93f Get rid of the special sread()+swrite() for MSDOS. Use recv()
and send(). Added needed HAVE_x defines.
2006-10-27 14:07:32 +00:00
Gisle Vanem
bbae5b49f9 Added 'RECV_TYPE_ARGx' needed in getinfo.c. 2006-10-27 13:57:16 +00:00
Yang Tse
772a985dc3 Update copyright year, since the file has been modified 2006-10-27 03:47:57 +00:00
Yang Tse
8a7514de8a Compiler warning fix 2006-10-27 02:18:29 +00:00
Yang Tse
8a8d5c784c Do an explicit typecast of data pointers to function pointers
to avoid picky compiler warnings, since this is what we want!
2006-10-27 01:04:41 +00:00
Yang Tse
012d7e2878 Fix Curl_open() not reporting failure when allocation of the
buffer used to store headers in the SessionHandle failed.
2006-10-26 11:15:25 +00:00
Daniel Stenberg
cde5e35d9b Fixed CURLOPT_FAILONERROR to return CURLE_HTTP_RETURNED_ERROR even for the
case when 401 or 407 are returned, *IF* no auth credentials have been given.
The CURLOPT_FAILONERROR option is not possible to make fool-proof for 401
and 407 cases when auth credentials is given, but we've now covered this
somewhat more.

You might get some amounts of headers transferred before this situation is
detected, like for when a "100-continue" is received as a response to a
POST/PUT and a 401 or 407 is received immediately afterwards.

Added test 281 to verify this change.
2006-10-25 20:40:14 +00:00
Daniel Stenberg
b2c378267b updated copyright year 2006-10-25 07:19:45 +00:00
Daniel Stenberg
f44ef427a2 other pipelining fixes by Ravi Pratap, that now makes pipelines get used better 2006-10-24 21:14:40 +00:00
Daniel Stenberg
36a3514225 the check in ConnectionExists() for not re-using a non-resolved connection now
applies for asynch name resolves in general and not only ares
2006-10-23 20:41:50 +00:00
Daniel Stenberg
e1edd41e1b Ravi Pratap provided a major update with pipelining fixes. We also no longer
re-use connections (for pipelining) before the name resolving is done.
2006-10-23 20:34:56 +00:00
Daniel Stenberg
ef769500d4 Nir Soffer fixed a cp line and got rid of an rm 2006-10-22 22:18:24 +00:00
Daniel Stenberg
23692574a2 until we learn how to use Makefile.inc from here, I've added socks.o in here
as well
2006-10-22 07:43:34 +00:00
Yang Tse
db24518a30 Fix misplaced runtime library specification for 'release-dll' target 2006-10-21 16:25:31 +00:00
Yang Tse
de59cde155 Fix copy-paste error 2006-10-21 12:36:10 +00:00
Yang Tse
3cd95eacdf Compiler warning fix 2006-10-21 12:35:16 +00:00
Daniel Stenberg
4e717cdb30 Armel Asselin separated CA cert verification problems from problems with
reading the (local) CA cert file to let users easier pinpoint the actual
problem. CURLE_SSL_CACERT_BADFILE (77) is the new libcurl error code.
2006-10-21 11:32:05 +00:00
Yang Tse
316a9f6480 Compiler warning fix 2006-10-20 17:54:05 +00:00
Daniel Stenberg
bd5d21aaf2 When a resolve is made on a pipelined connection we need to detect it properly
(when the resoling isn't completede yet) and not confuse it with a simple
connection re-use (non-pipelined).
2006-10-20 12:25:39 +00:00
Yang Tse
83884180ac Builds using synchronous name resolver dislike marking the connection as async. 2006-10-19 02:30:02 +00:00
Yang Tse
5df4be1165 Check for USE_WINSOCK instead of WIN32 where the check was done
to verify winsock API availability.
2006-10-18 21:05:40 +00:00
Yang Tse
96445f1b7d Introduce symbol USE_WINSOCK which will be defined when
using winsock or winsock2 API.
2006-10-18 15:57:49 +00:00
Daniel Stenberg
4bdd7596d3 the expire timer is a bit too annoying to see all the time ;-) 2006-10-18 15:11:24 +00:00
Daniel Stenberg
18aae32015 When a connection is re-used, it can be flagged for re-use before the name
resolving is completed so we must make sure to survive it and mark the
connection as async (ie not yet connected completely).
2006-10-18 15:10:49 +00:00
Daniel Stenberg
a8996b9e52 use the return code from lseek() to detect problems and bail out if so 2006-10-18 14:47:58 +00:00
Gisle Vanem
94095c61d8 Added ISPRINT() required for src/main.c. 2006-10-18 13:50:23 +00:00
Daniel Stenberg
1cddd744ad Tor's spell fixes 2006-10-18 12:59:02 +00:00
Daniel Stenberg
5b8d5fdf2f cut out matching host names starting with telnet or ftps, since they hardly
ever actually are used
2006-10-18 11:13:39 +00:00
Yang Tse
71c6335293 Move definition of IS*() macros to setup_once.h 2006-10-18 03:41:19 +00:00
Dan Fandrich
8c38ea4ebc Fixed compile error in HAVE_SIGACTION case. 2006-10-17 21:45:37 +00:00
Daniel Stenberg
44d84ac164 Avoid typecasting a signed char to an int when using is*() functions, as that
could very well cause a negate number get passed in and thus cause reading
outside of the array usually used for this purpose.

We avoid this by using the uppercase macro versions introduced just now that
does some extra crazy typecasts to avoid byte codes > 127 to cause negative
int values.
2006-10-17 21:32:56 +00:00
Daniel Stenberg
930f9bd534 clear the struct size not the pointer size, pointed out in bug report
#1579171
2006-10-17 20:34:11 +00:00
Yang Tse
ec956b0334 Explicit typecast for Curl_debug() size argument 2006-10-17 10:04:13 +00:00
Yang Tse
44ffe0dc79 Typo 2006-10-17 09:07:38 +00:00
Daniel Stenberg
e3a61fba52 make the low_speed check set the expire timer so that it has a chance to work
even when using curl_multi_socket() or even using the multi_perform() when
relying on multi_timeout() to be good.
2006-10-17 09:05:44 +00:00
Daniel Stenberg
7a710b4970 Jeff helped me pinpoint that we didn't properly set the expire timer during
c-ares name resolves, but now we do!
2006-10-17 08:06:27 +00:00
Daniel Stenberg
0bb20cc611 fix the name resolve abort timeout calculation (when signals are used) 2006-10-17 08:05:41 +00:00
Yang Tse
433c0c895e Compiler warning fix 2006-10-17 02:31:06 +00:00
Yang Tse
10d1fc0e73 Compiler warning fix 2006-10-15 23:13:12 +00:00
Gisle Vanem
2260c8aa11 Replace ";;" with ";". 2006-10-15 20:28:03 +00:00
Gisle Vanem
97eb62aff8 Rearranged target HAVE_x section. 2006-10-15 19:41:15 +00:00
Yang Tse
1855fc35f2 Declare our own timeval struct if HAVE_STRUCT_TIMEVAL is not defined 2006-10-14 12:02:19 +00:00
Yang Tse
dc3ed35313 Define HAVE_STRUCT_TIMEVAL as appropriate for platforms that lack autotools support 2006-10-14 12:01:44 +00:00
Dan Fandrich
5ccbbe40c2 The tagging of application/x-www-form-urlencoded POST body data sent
to the CURLOPT_DEBUGFUNCTION callback has been fixed (it was erroneously
included as part of the header).  A message was also added to the
command line tool to show when data is being sent, enabled when
--verbose is used.
2006-10-13 21:02:27 +00:00
Daniel Stenberg
86f93a53d6 print the actual (externally known) easy handle and not the internal container
for it
2006-10-13 14:54:36 +00:00
Daniel Stenberg
efe3cb6e1a Added curl_multi_dump() when built with CURLDEBUG - this is not a stable public
function, this is only meant to allow easier tracking of the internal handle's
state and what sockets they use. Only for research and development.
2006-10-13 07:11:26 +00:00
Yang Tse
32ac4edeed Check for struct timeval at configuration time 2006-10-13 01:35:14 +00:00
Daniel Stenberg
ab60a12465 Starting now, adding an easy handle to a multi stack that was already added
to a multi stack will cause CURLM_BAD_EASY_HANDLE to get returned.
2006-10-12 14:30:47 +00:00
Daniel Stenberg
b61c06384a Jeff Pohlmeyer has been working with the hiperfifo.c example source code,
and while doing so it became apparent that the current timeout system for
the socket API really was a bit awkward since it become quite some work to
be sure we have the correct timeout set.

Jeff then provided the new CURLMOPT_TIMERFUNCTION that is yet another
callback the app can set to get to know when the general timeout time
changes and thus for an application like hiperfifo.c it makes everything a
lot easier and nicer. There's a CURLMOPT_TIMERDATA option too of course in
good old libcurl tradition.
2006-10-12 08:36:47 +00:00
Yang Tse
22307ae0ee Inclusion of time header files based on header existance 2006-10-12 03:57:33 +00:00
Yang Tse
e150150d9f Remove redundant __CYGWIN__ symbol check 2006-10-11 16:01:16 +00:00
Daniel Stenberg
1ce7b48057 mark the handle as no longer having a broken pipe when a transfer has failed 2006-10-10 14:23:34 +00:00
Daniel Stenberg
d390039873 minor indent fix 2006-10-09 21:24:50 +00:00
Daniel Stenberg
7d0c58a285 when going to completed due to error, mark the handle as not in a pipeline
anymore
2006-10-09 21:24:34 +00:00
Yang Tse
15e3dfe1d3 Compiler warning fix 2006-10-09 11:21:40 +00:00
Daniel Stenberg
a1de9367ec Bogdan Nicula's second test case (posted Sun, 08 Oct 2006) converted to test
case 535 and it now runs fine. Again a problem with the pipelining code not
taking all possible (error) conditions into account.
2006-10-09 06:58:05 +00:00
Yang Tse
eceb37bde2 Cygwin 1.5.21 needs this hack to pass test 160.
In this way 304 tests out of 304 reported OK.
2006-10-09 00:35:36 +00:00
Daniel Stenberg
1128029599 don't display or act on state changes that doesn't actually change state 2006-10-07 21:04:57 +00:00
Daniel Stenberg
befc30bc55 Bogdan Nicula's hanging test case was converted to test case 533 and the test
now runs fine.
2006-10-06 21:19:57 +00:00
Gunter Knauf
8547ab1663 updated for latest OpenSSL release. 2006-10-06 00:24:25 +00:00
Daniel Stenberg
552b963e6d Dmitriy Sergeyev provided an example source code that crashed CVS libcurl
but that worked nicely in 7.15.5. I converted it into test case 532 and
fixed the problem.
2006-10-04 21:11:08 +00:00
Daniel Stenberg
e2b48366d3 removed more dead code that is unused since the removal of the third party
transfer support
2006-10-02 13:00:54 +00:00
Daniel Stenberg
5e0d9aea32 Support for FTP third party transfers is now dropped 2006-09-30 20:31:11 +00:00
Daniel Stenberg
ae13c93b7d Reported in #1561470 (http://curl.haxx.se/bug/view.cgi?id=1561470), libcurl
would crash if a bad function sequence was used when shutting down after
using the multi interface (i.e using easy_cleanup after multi_cleanup) so
precautions have been added to make sure it doesn't any more - test case 529
was added to verify.
2006-09-28 21:26:06 +00:00
Daniel Stenberg
68e9f75708 As reported in bug: #1566077 the former URL mentioned in the generated cookie
jar has died and we now instead point out our own version of that
2006-09-27 21:00:45 +00:00
Yang Tse
15d8bb2105 Compiler warning fix 2006-09-25 00:54:32 +00:00
Yang Tse
b2ca777a08 Compiler warning fix 2006-09-25 00:16:23 +00:00
Yang Tse
ba01198e6c Compiler warning fix 2006-09-25 00:05:39 +00:00
Yang Tse
6ebd5e1761 Compiler warning fix 2006-09-24 23:55:53 +00:00
Daniel Stenberg
1fa3a5cce9 Cory Nelson made libcurl use the WSAPoll() function if built for Windows
Vista (_WIN32_WINNT >= 0x0600)
2006-09-24 10:41:00 +00:00
Daniel Stenberg
9cd928674f standard curl source code headers 2006-09-23 19:09:39 +00:00
Daniel Stenberg
3ea8a4d220 Dmitriy Sergeyev provided a patch that made the SOCKS[45] code work better as
it now will read the full data sent from servers. The SOCKS-related code was
also moved to the new lib/socks.c source file.
2006-09-23 19:07:20 +00:00
Daniel Stenberg
ab798fe5ba (FTP) a failed upload does not invalidate the control connection 2006-09-21 20:52:58 +00:00
Daniel Stenberg
ec4a16f2e0 Armel Asselin fixed problems when you gave a proxy URL with user name and
empty password or no password at all. Test case 278 and 279 were added to
verify.
2006-09-20 21:49:41 +00:00
Daniel Stenberg
71920d61e6 Michael Wallner's test program again help me track down a problem. This time
it basically was that we didn't remove the current connection from the pipe
list when following a redirect. Also in this commit: several cases of
additional debug code for debug builds helping to check and track down some
signs of run-time trouble.
2006-09-20 12:03:50 +00:00
Daniel Stenberg
2d5fc39d35 Resize the connection cache upwards when adding more handles than what
currently fits in the cache, to make the cache work better especially for
pipelining cases but also for "mere" (persistent) connection re-use.
2006-09-16 21:50:29 +00:00
Daniel Stenberg
c001ed53fa Armel Asselin - When the easy handle is removed from the multi while libcurl
is still trying to resolve the host name, it seems that the ftp struct is not
yet initialized, but the removal action calls Curl_done() which calls
Curl_ftp_done. So we simply return success from there if no ftp pointer is
set.
2006-09-16 20:57:59 +00:00
Daniel Stenberg
39e01e9349 file-local function should be static and not use Curl_ prefix!
Curl_signalPipeClose is now signalPipeClose().
2006-09-15 08:47:55 +00:00
Yang Tse
7d3e719a2c Compiler warning fix 2006-09-13 12:42:12 +00:00
Yang Tse
733a184ce0 Compiler warning fix 2006-09-12 23:51:01 +00:00
Daniel Stenberg
7c5745720a If the current connection doesn't fit to get added to the connection cache,
we certainly MUST NOT kill an active connection... Problem tracked down thanks
to Michael Wallner's excellent test program.
2006-09-11 20:50:58 +00:00
Daniel Stenberg
29dc39fce1 - Fixed my breakage from earlier today so that doing curl_easy_cleanup() on a
handle that is part of a multi handle first removes the handle from the
  stack.

- Added CURLOPT_SSL_SESSIONID_CACHE and --no-sessionid to disable SSL
  session-ID re-use on demand since there obviously are broken servers out
  there that misbehave with session-IDs used.
2006-09-11 17:18:18 +00:00
Daniel Stenberg
5c184cfc0d stupid mistake rectified by Jeff Pohlmeyer 2006-09-11 11:25:47 +00:00
Yang Tse
055022a55f Compiler warning fix 2006-09-10 23:45:54 +00:00
Yang Tse
c30e908034 Compiler warning fix 2006-09-10 23:37:42 +00:00
Daniel Stenberg
8240cea628 Jeff Pohlmeyer presented a *multi_socket()-using program that exposed a
problem with it (SIGSEGV-style). It clearly showed that the existing
  socket-state and state-difference function wasn't good enough so I rewrote
  it and could then re-run Jeff's program without any crash. The previous
  version clearly could miss to tell the application when a handle changed
  from using one socket to using another.

  While I was at it (as I could use this as a means to track this problem
  down), I've now added a 'magic' number to the easy handle struct that is
  inited at curl_easy_init() time and cleared at curl_easy_cleanup() time that
  we can use internally to detect that an easy handle seems to be fine, or at
  least not closed or freed (freeing in debug builds fill the area with 0x13
  bytes but in normal builds we can of course not assume any particular data
  in the freed areas).
2006-09-10 22:15:32 +00:00
Daniel Stenberg
f2a33eb372 Added a useful debug function within #if 0. The function makes it easy to
"dump" a hash table which is useful when tracking problems with data stored
in one of our hashes.
2006-09-10 22:12:24 +00:00
Gisle Vanem
690888cfc1 SIGALARM -> SIGALRM. 2006-09-09 19:13:13 +00:00
Gisle Vanem
fb8d9b6645 #ifdef around alarmfunc() to supress warning. 2006-09-09 19:11:54 +00:00
Gisle Vanem
f7ddb39ee1 iconv-data needs to be fully reallocated (to prevent a double-free). 2006-09-09 18:23:29 +00:00
Gisle Vanem
f1ba12607a Duplicate iconv-data too in curl_easy_duphandle(). 2006-09-09 16:36:05 +00:00
Yang Tse
bb87b65f08 Compiler warning fix 2006-09-09 13:24:42 +00:00
Daniel Stenberg
b0f6e7cee4 Michele Bini fixed how the hostname is put in NTLM packages. As servers
don't expect fully qualified names we need to cut them off at the first dot.
2006-09-09 11:45:27 +00:00
Daniel Stenberg
ed72d4e104 tab => space 2006-09-09 11:45:05 +00:00
Daniel Stenberg
8ec1bfe897 Peter Sylvester cleaned up and fixed the getsockname() uses in ftp.c. Some
of them can be completetly removed though...
2006-09-08 22:17:39 +00:00
Gisle Vanem
1dec17562f signal() returns 'void (*)(int)'. 2006-09-08 13:06:41 +00:00
Gisle Vanem
be1306a6c2 Update comment reflecting structure change. 2006-09-08 12:17:58 +00:00
Gisle Vanem
0a670c578f Compilation fix; 'reqdata' is not a pointer. 'path' is part of SessionHandle. 2006-09-08 12:03:39 +00:00
Yang Tse
dc7c915553 Compilation fix 2006-09-08 05:18:07 +00:00
Daniel Stenberg
b7eeb6e67f Major overhaul introducing http pipelining support and shared connection
cache within the multi handle.
2006-09-07 21:49:20 +00:00
Yang Tse
7e4193b538 Fix compiler warning 2006-09-07 01:18:46 +00:00
Daniel Stenberg
0bb3ac7c31 Jari Sundell's minor cleanup, added comments and some extra error-checkings
for easier future error-tracking.
2006-09-04 22:19:13 +00:00
Daniel Stenberg
466d093a92 - "Dortik" (http://curl.haxx.se/bug/view.cgi?id=1551412) provided a patch that
while not fixing things very nicely, it does make the SOCKS5 proxy
  connection slightly better as it now acknowledges the timeout for connection
  and it no longer segfaults in the case when SOCKS requires authentication
  and you did not specify username:password.
2006-09-03 22:52:42 +00:00
Gisle Vanem
4f4277d9c7 Simplified #ifdef on WIN32; the statement
" !defined(__GNUC__) || defined(__MINGW32__)" implies
CygWin.
2006-09-03 13:52:07 +00:00
Daniel Stenberg
d7168a82e2 Dmitriy Sergeyev found and fixed a multi interface flaw when using asynch
name resolves. It could get stuck in the wrong state.
2006-08-31 12:53:39 +00:00
Gisle Vanem
c9c8ee3796 Added HAVE_SYS_TIME_H for djgpp and HighC. 2006-08-30 16:18:03 +00:00
Gisle Vanem
c7aae10300 Removed "#ifndef__WATCOMC__". Use "#ifdef HAVE_SYS_TIME_H" instead. 2006-08-30 16:17:06 +00:00
Gisle Vanem
4031eb1d91 Avoid Metaware's High-C warning "'=' encountered where '==' may have been intended." 2006-08-29 21:11:55 +00:00
Gisle Vanem
59cf6fd4f0 Watcom lacks <sys/time.h>. 2006-08-29 18:45:55 +00:00
Gisle Vanem
6de9732a88 Added support for Watcom/DOS. 2006-08-29 18:40:36 +00:00
Gisle Vanem
1f7f500922 Updated dependency section. 2006-08-29 18:17:43 +00:00
Gisle Vanem
4b1462ec65 Don't include zlib headers in dependency output. 2006-08-29 18:13:54 +00:00
Gisle Vanem
6ed47f0aad Renamed config.dj -> config.dos. 2006-08-29 16:40:47 +00:00
Gisle Vanem
2d8c7ba9fc Use config.dos instead. Updated generated dependencies. 2006-08-29 16:35:11 +00:00
Gisle Vanem
3b342d18bc Removed. New file is config.dos. 2006-08-29 16:34:40 +00:00
Gisle Vanem
f24ad3800c Renamed config.dj -> config.dos. Added #ifdef-section for djgpp. 2006-08-29 16:33:41 +00:00
Gisle Vanem
e2ff369eba BUFSIZE defined in Metaware's <stdio.h>. Undefine to avoid warning. 2006-08-29 16:27:13 +00:00
Gisle Vanem
9691a78f6b Support other MS-DOS compilers (MSDOS is a djgpp built-in define). 2006-08-29 16:26:41 +00:00
Daniel Stenberg
5acadc9cd7 David McCreedy added CURLOPT_SOCKOPTFUNCTION and CURLOPT_SOCKOPTDATA to
allow applications to set their own socket options.
2006-08-29 14:39:33 +00:00
Daniel Stenberg
2ff609dd43 Armel Asselin reported that the 'running_handles' counter wasn't updated
properly if you removed a "live" handle from a multi handle with
curl_multi_remove_handle().
2006-08-25 13:53:20 +00:00
Daniel Stenberg
bdbd0cf27a David McCreedy fixed a remaining mistake from the August 19 TYPE change. 2006-08-22 21:23:25 +00:00
Daniel Stenberg
d792937686 Peter Sylvester pointed out a flaw in the AllowServerConnect() in the FTP
code when doing pure ipv6 EPRT connections.
2006-08-22 21:21:01 +00:00
Dan Fandrich
77516822f6 Workaround for Cray UNICOS 9.0 to fix ftp. 2006-08-21 22:28:19 +00:00
Daniel Stenberg
cfdcae4bc7 Based on a patch by Armel Asselin, the FTP code no longer re-issues the TYPE
command on subsequent requests on a re-used connection unless it has to.
2006-08-19 21:18:36 +00:00
Daniel Stenberg
74a6921bc4 Armel Asselin fixed a crash in the FTP code when using SINGLECWD mode and
files in the root directory.
2006-08-18 23:17:33 +00:00
Daniel Stenberg
490cccba3c Andrew Biggs pointed out a "Expect: 100-continue" flaw where libcurl didn't
send the whole request at once, even though the Expect: header was disabled
by the application. An effect of this change is also that small (< 1024
bytes) POSTs are now always sent without Expect: header since we deem it
more costly to bother about that than the risk that we send the data in
vain.
2006-08-18 22:54:57 +00:00
Dan Fandrich
839441e236 Minor portability fixes to get things running on UNICOS 9.0 on a Cray Y-MP 2006-08-16 18:48:27 +00:00
Gisle Vanem
455087faae Use gnutls_strerror() for clearer error message. 2006-08-16 17:05:54 +00:00
Gisle Vanem
31def9e217 Use '_LIBICONV_VERSION' instead of variable '_libiconv_version'
to support older iconv versions.
2006-08-15 17:02:24 +00:00
Dan Fandrich
eb26a581f9 Use __minix to detect Minix, which works on both ACK and GCC. 2006-08-11 18:11:42 +00:00
Dan Fandrich
4272af801f Only define the string prototypes in ANSI mode to reduce interference on
systems that prototype them slightly differently.
2006-08-09 16:36:17 +00:00
Gunter Knauf
93943ef949 added build info output. 2006-08-09 14:04:51 +00:00
Gunter Knauf
b184b87714 fixed some web links. 2006-08-09 13:59:39 +00:00
Daniel Stenberg
1eedad27a2 Armel Asselin made the CURLOPT_PREQUOTE option work fine even when
CURLOPT_NOBODY is set true. PREQUOTE is then run roughly at the same place
in the command sequence as it would have run if there would've been a
transfer.
2006-08-08 22:56:46 +00:00
Gunter Knauf
ac02d379ba moved ugly NetWare hack to hostip.h so that hostip.c uses it too. 2006-08-08 22:37:53 +00:00
Daniel Stenberg
a4ebf5b507 Fixed a flaw in the "Expect: 100-continue" treatment. If you did two POSTs
on a persistent connection and allowed the first to use that header, you
could not disable it for the second request.
2006-08-08 21:12:49 +00:00
Dan Fandrich
997a987943 Minix 3 doesn't have MSG_PEEK 2006-08-08 18:47:14 +00:00
Yang Tse
b33f47804d Allow again proper compilation outside of the source tree 2006-08-07 18:06:37 +00:00
Dan Fandrich
c012e2b408 Initial stab at making libcurl compile under Minix 3. 2006-08-04 18:53:47 +00:00
Yang Tse
646a6b604f Minor compatibility fix 2006-08-04 17:35:05 +00:00
Gisle Vanem
cca00a6378 Added version info for iconv. 2006-08-04 16:10:48 +00:00
Gisle Vanem
21aa8f0b45 Added dependency for splay.obj. 2006-08-04 15:57:07 +00:00
Daniel Stenberg
8709f6c4b3 oops, the previous commit was incomplete as we made an unconditional call
to multi_runsingle() without it being really necessary or good
2006-08-04 14:39:19 +00:00
Daniel Stenberg
2ac560e58b even when we get a single connection to deal with, we must still check for
timeout'ed connections and possibly deal with them too
2006-08-04 13:06:36 +00:00
Yang Tse
8f8ba9486d Fix compiler warning 2006-08-04 02:49:04 +00:00
Yang Tse
f55924b3e0 Avoid redundant check. configure script takes care of not defining
HAVE_WINDOWS_H, HAVE_WINSOCK_H, HAVE_WINSOCK2_H, neither
HAVE_WS2TCPIP_H when __CYGWIN__ is defined.
2006-08-04 01:13:24 +00:00
Daniel Stenberg
01a79be2c9 removed running_handles argument from multi_runsingle() since it wasn't really
used anymore since multi->num_alive was introduced
2006-08-03 11:47:42 +00:00
Yang Tse
d211fcd34f Silence compiler warning 'unused parameter running_handles' in function multi_runsingle(). This is done here returning multi->num_alive in the running_handles parameter even when functions that call multi_runsingle() at this moment overwrite the returned value with the one that is valid when those functions curl_multi_perform() and multi_socket() have removed expired timers from the splay. Most probably, parameter 'running_handles' in function multi_runsingle() should be just removed. 2006-08-03 11:41:49 +00:00
Daniel Stenberg
159834171e keep count of the number of "alive" handles in a struct member, as otherwise
*multi_socket*() can't return the proper number
2006-08-02 22:29:29 +00:00
Daniel Stenberg
8a38c72c48 Mark Lentczner fixed how libcurl was not properly doing chunked encoding
if the header "Transfer-Encoding: chunked" was set by the application.
http://curl.haxx.se/bug/view.cgi?id=1531838
2006-08-02 18:18:47 +00:00
Daniel Stenberg
ee642859ef Maciej Karpiuk fixed a crash that would occur if we passed Curl_strerror()
an unknown error number on glibc systems.
http://curl.haxx.se/bug/view.cgi?id=1532289
2006-08-01 09:39:01 +00:00
Daniel Stenberg
9f579f12fc spell-fixed a comment 2006-08-01 09:38:35 +00:00
Yang Tse
9dde0b54a3 Silence warning: empty body in an if-statement 2006-07-31 17:46:28 +00:00
Yang Tse
f1343b2f55 Force compilation failure in case macros sread() or swrite() are not defined. 2006-07-31 17:12:24 +00:00
Yang Tse
962b7985e6 Provide definitions needed for macros sread() and swrite() in config file. 2006-07-31 16:58:10 +00:00
Daniel Stenberg
01b2cf82ec curl_multi_socket() and curl_multi_socket_all() got modified prototypes: they
both now provide the number of running handles back to the calling function.
2006-07-30 22:44:07 +00:00
Yang Tse
c033c4c71c Winsock and Cygwin need address family specification before bind(), this should be harmless for others. 2006-07-29 16:17:36 +00:00
Yang Tse
77b3bc239d First step trying to avoid the multiple header inclusion and recursion nightmare.
Reintroduce checking for HAVE_MSG_NOSIGNAL in configure script, so that we don't depend on header inclusion order for a valid check.
2006-07-28 14:19:02 +00:00
Daniel Stenberg
a88deadd6f Yves Lejeune fixed so that replacing Content-Type: when doing multipart
formposts work exactly the way you want it (and the way you'd assume it
works)
2006-07-27 22:35:09 +00:00
Daniel Stenberg
e6ea8f1199 put back the correct logic, as the change dated July 11th 2006 added bad
behaviour and a socket leak
2006-07-27 22:28:53 +00:00
Daniel Stenberg
6f6b93da02 [Hiper-related work] Added a function called curl_multi_assign() that will
set a private pointer added to the internal libcurl hash table for the
particular socket passed in to this function.
2006-07-26 22:19:42 +00:00
Daniel Stenberg
2527b53019 Dan Nelson added the CURLOPT_FTP_ALTERNATIVE_TO_USER libcurl option and curl
tool option named --ftp-alternative-to-user. It provides a mean to send a
particular command if the normal USER/PASS approach fails.
2006-07-25 22:45:21 +00:00
Daniel Stenberg
78a47826b2 Michael Jerris added magic that builds lib/curllib.vcproj automatically (for
newer MSVC versions)
2006-07-25 22:06:42 +00:00
Yang Tse
ecfaa4f869 Fix warning: no newline at end of file 2006-07-25 18:48:12 +00:00
Daniel Stenberg
f36adcdb73 Georg Horn made the transfer timeout error message include more details 2006-07-25 18:38:51 +00:00
Yang Tse
13616f8f96 Simplify check for NEED_MALLOC_H, and make more explicit that NEED_MALLOC_H shall be defined if <malloc.h> header file must be included even when including <stdlib.h>. 2006-07-25 13:49:49 +00:00
Gisle Vanem
ab486d1e27 Silence iconv() warnings. 2006-07-25 11:35:35 +00:00
Gisle Vanem
4a1a1a75fb Added note for CURLRES_ARES and CURLRES_IPV6. 2006-07-25 10:49:12 +00:00
Gisle Vanem
e4d6ade4b3 Moved functions common to IPv4 and C-ares to hostip.c;
Curl_freeaddrinfo() and Curl_ip2addr().
2006-07-25 10:31:31 +00:00
Gisle Vanem
c82e880f5b Remove comment about c-ares not supporting IPv6. 2006-07-25 10:23:15 +00:00
Gisle Vanem
f2aa3b21e0 Use the proper Curl_freeaddrinfo() for CURLRES_ARES. 2006-07-24 15:58:33 +00:00
Gisle Vanem
385db0e97d Fix typo. 2006-07-24 15:56:40 +00:00
Gisle Vanem
4e58da5222 Ares needs CURLRES_ADDRINFO_COPY. Curl_hostent_relocate() is gone. 2006-07-24 15:48:48 +00:00
Daniel Stenberg
1c6ebb0782 added splay.o 2006-07-23 12:01:06 +00:00
Gisle Vanem
c4ad533300 Constify some arguments in Curl_connecthost() and singleipconnect(). 2006-07-21 06:50:39 +00:00
Gisle Vanem
5cdbd0cf4a Constify arguments to Curl_he2ai() and Curl_addrinfo_copy(). 2006-07-21 06:21:46 +00:00
Gisle Vanem
a55c70d4ae Constify 'hostname' and 'service' to various resolver functions. 2006-07-21 05:51:12 +00:00
Gisle Vanem
02938a010d Changes for combination ENABLE_IPV6 and USE_ARES. 2006-07-21 04:22:44 +00:00
Gisle Vanem
e40641bf7c Use calloc() instead. 2006-07-21 04:19:44 +00:00
Daniel Stenberg
27c0b43897 David McCreedy fixed a build error when building libcurl with HTTP disabled,
problem added with the curl_formget() patch.
2006-07-20 20:04:52 +00:00
Gisle Vanem
d46de5ab8b Avoid warning "comparison of unsigned expression < 0 is always false" 2006-07-20 16:37:05 +00:00
Gisle Vanem
73ebb0edde Avoid warning 'port' might be used uninitialized in this function. 2006-07-20 15:54:01 +00:00
Dan Fandrich
684245d6ce Changes to support building for eCos 1.3.1. This has been tested with
file: URLs only.
2006-07-19 22:27:49 +00:00
Yang Tse
d157c29269 Fix compiler warnings 2006-07-19 21:14:02 +00:00
Yang Tse
483a586d55 Avoid variable declaration shadowing previously declared one 2006-07-19 18:46:56 +00:00
Yang Tse
4ac54f8c2c remove variable declaration shadowing previously declared one 2006-07-19 18:32:38 +00:00
Yang Tse
840aacf7dd Remove variable declaration shadowing previously declared one 2006-07-19 18:19:30 +00:00
Yang Tse
ef82da93fb "*connected" must be set to FALSE if trynextip() fails. 2006-07-17 19:22:28 +00:00
Daniel Stenberg
06d05b18b2 Jari Sundell did some excellent research and bug tracking, figured out that
we did wrong and patched it: When nodes were removed from the splay tree,
and we didn't properly remove it from the splay tree when an easy handle was
removed from a multi stack and thus we could wrongly leave a node in the
splay tree pointing to (bad) memory.
2006-07-17 18:35:58 +00:00
Yang Tse
f72c4e82fd Return NULL if argument is NULL. 2006-07-17 15:25:37 +00:00
Yang Tse
9c83a20a27 Fix compiler warning "enumerated type mixed with another type" 2006-07-17 14:52:31 +00:00
Yang Tse
f3c508f6e8 Update error buffer size used for SSL_strerror() 2006-07-17 05:05:57 +00:00
Daniel Stenberg
3b0a920fad don't use 'new' in the proto 2006-07-15 18:57:51 +00:00
Daniel Stenberg
daef1cf34d David McCreedy fixed a flaw where the CRLF counter wasn't properly cleared
for FTP ASCII transfers.
2006-07-14 18:58:42 +00:00
Yang Tse
d2cefc140a Change the ai_addrlen type of struct addrinfo from size_t to socklen_t, per RFC 3493. 2006-07-14 10:30:44 +00:00
Yang Tse
700cd5805c Oops, missing "u" 2006-07-13 18:57:34 +00:00
Yang Tse
73f407b7ae Fix compiler warning. 2006-07-13 18:44:24 +00:00
Gisle Vanem
4be7dcba48 Remove unneeded stuff. 2006-07-12 13:57:18 +00:00
Yang Tse
f975fd03a1 Read the return value of the swrite() macro and 'print' a message in case of failure. 2006-07-12 07:33:54 +00:00
Yang Tse
8272874704 Place parenthesis surrounding macro parameters so that the use of sread and swrite is more intuitive. 2006-07-12 06:52:40 +00:00
Yang Tse
2278e8f1ba DJGPP/WATT32 does not have functions named recv() send() getnameinfo(). 2006-07-12 05:20:05 +00:00
Yang Tse
58176d1484 Use platform's native types for recv() and send() arguments. 2006-07-12 05:19:00 +00:00
Yang Tse
fe22872d14 include <malloc.h> only if HAVE_MALLOC_H and NEED_MALLOC_H are both defined. 2006-07-11 21:34:23 +00:00
Dan Fandrich
c6fc5a1a26 Moved strdup replacement from src/main.c into src/strdup.c so it's available
in libcurl as well, if necessary.
2006-07-11 17:02:06 +00:00
Gisle Vanem
012d75442a Added comment and CVS id. 2006-07-11 13:12:57 +00:00
Yang Tse
dcc7900e7c Socket must be set to CURL_SOCKET_BAD after closing it. 2006-07-11 00:23:21 +00:00
Yang Tse
34f5e8ad0e DNS cache must use the multi DNS cache if the easy handle's one is not using anyone in curl_multi_add_handle. 2006-07-10 16:14:36 +00:00
Daniel Stenberg
28611704d9 Ates Goral pointed out that libcurl's cookie parser did case insensitive
string comparisons on the path which is incorrect and provided a patch that
fixes this. I edited test case 8 to include details that test for this.
2006-07-08 18:52:08 +00:00
Daniel Stenberg
ca319f63ad Ingmar Runge provided a source snippet that caused a crash. The reason for
the crash was that libcurl internally was a bit confused about who owned the
DNS cache at all times so if you created an easy handle that uses a shared
DNS cache and added that to a multi handle it would crash. Now we keep more
careful internal track of exactly what kind of DNS cache each easy handle
uses: None, Private (allocated for and used only by this single handle),
Shared (points to a cache held by a shared object), Global (points to the
global cache) or Multi (points to the cache within the multi handle that is
automatically shared between all easy handles that are added with private
caches).
2006-07-07 22:58:06 +00:00
Daniel Stenberg
af5e6e7e6d HTTP Pipelining is for GET and HEAD requests only. 2006-07-07 20:45:56 +00:00
Dan Fandrich
70f2b5e877 Fixed building curllib.dsp when running make outside the source tree. 2006-07-07 18:37:14 +00:00
Gisle Vanem
725f734bae Correct the trace for WinCE. 2006-07-07 07:49:16 +00:00
Gisle Vanem
0f32460656 WinCE uses CreateThread(). Hence error is not in 'errno'. 2006-07-07 07:46:40 +00:00
Gisle Vanem
25180cc850 Removed copying 'stderr' since it doesn't have the desired
effect.
2006-07-07 07:41:47 +00:00
Daniel Stenberg
2a0e41cab9 updated after discussions and thinking 2006-07-07 07:22:05 +00:00
Gisle Vanem
2ddb9d57aa Undefine symbols before redefining them. 2006-07-06 13:57:26 +00:00
Gisle Vanem
4f012ad703 Undefine correct symbol. 2006-07-06 13:33:56 +00:00
Yang Tse
a1cd180082 Oops ! 2006-07-05 23:16:28 +00:00
Yang Tse
bc2f0c7dcb Prevent definition of HAVE_WINxxx_H symbols and avoid inclusion of Windows headers when compiled with Cygwin in POSIX emulation mode. 2006-07-05 23:10:37 +00:00
Gisle Vanem
c6ae0ebcbf Cludge fix for djgpp 2.03 or older; it doesn't have snprintf() etc.
So avoid using x_was_used().
2006-07-05 14:23:09 +00:00
Gisle Vanem
c6ec576cbb Add types and qualifiers for getnameifo(), send() and recv().
(Yang Tse forgot about djgpp)
2006-07-05 14:15:21 +00:00
Yang Tse
7e43d06b60 Get qualifier of arg 2 for send() apart into SEND_QUAL_ARG2. 2006-07-04 16:54:10 +00:00
Yang Tse
89f54f3739 Platforms that don't have/run configure need default values in their config files for:
HAVE_GETNAMEINFO, GETNAMEINFO_QUAL_ARG1, GETNAMEINFO_TYPE_ARG1, GETNAMEINFO_TYPE_ARG2, GETNAMEINFO_TYPE_ARG46, GETNAMEINFO_TYPE_ARG7

HAVE_RECV, RECV_TYPE_ARG1, RECV_TYPE_ARG2, RECV_TYPE_ARG3, RECV_TYPE_ARG4, RECV_TYPE_RETV

HAVE_SEND, SEND_TYPE_ARG1, SEND_TYPE_ARG2, SEND_TYPE_ARG3, SEND_TYPE_ARG4, SEND_TYPE_RETV
2006-07-04 16:10:13 +00:00
Daniel Stenberg
8bed45340a Toshiyuki Maezawa fixed a problem where you couldn't override the
Proxy-Connection: header when using a proxy and not doing CONNECT.
2006-07-04 12:01:59 +00:00
Yang Tse
55138753c6 Test HAVE_GETNAMEINFO definition before using GETNAMEINFO_XXX definitions. 2006-07-04 02:27:11 +00:00
Yang Tse
43369b8096 Fix compiler warning. 2006-07-03 18:38:03 +00:00
Daniel Stenberg
a3949c7786 with a very recent yassl, we now can display 'yassl' when the OpenSSL API is
in fact provided by yassl instead
2006-06-29 07:35:02 +00:00
Yang Tse
b01286d280 fix better minor compiler warning 2006-06-28 05:22:47 +00:00
Yang Tse
64f72c22b9 fix minor compiler warning 2006-06-28 04:17:04 +00:00
Yang Tse
856114d05c fix minor compiler warning 2006-06-28 02:45:27 +00:00
Daniel Stenberg
c508ab1aef Added README.pipelining but also extracted the "docs" files to a separate list
to get a better overview
2006-06-24 21:54:22 +00:00
Daniel Stenberg
0793dc922c thoughts and ideas as posted to the list the other day 2006-06-24 21:51:28 +00:00
Daniel Stenberg
37f4877e56 Michael Wallner added curl_formget(), which allows an application to extract
(serialise) a previously built formpost (as with curl_formadd()).
2006-06-24 21:46:41 +00:00
Daniel Stenberg
a8ac6f1dc1 Arve Knudsen found a flaw in curl_multi_fdset() for systems where
curl_socket_t is unsigned (like Windows) that could cause it to wrongly
return a max fd of -1.
2006-06-23 22:07:06 +00:00
Daniel Stenberg
dfe1884c25 Peter Silva introduced CURLOPT_MAX_SEND_SPEED_LARGE and
CURLOPT_MAX_RECV_SPEED_LARGE that limit tha maximum rate libcurl is allowed
to send or receive data. This kind of adds the the command line tool's
option --limit-rate to the library.

The rate limiting logic in the curl app is now removed and is instead
provided by libcurl itself. Transfer rate limiting will now also work for -d
and -F, which it didn't before.
2006-06-22 21:36:53 +00:00
Daniel Stenberg
76cf020750 select_res is not a socket, it should be a plain int 2006-06-15 21:30:32 +00:00
Daniel Stenberg
8df5dcb193 proper use of newlines 2006-06-09 12:07:34 +00:00
Daniel Stenberg
a05ea124b9 oops, serious breakage in the fdset() function 2006-06-09 07:08:34 +00:00
Daniel Stenberg
990e56fb13 Brian Dessent's fixes for cygwin builds 2006-06-08 06:12:30 +00:00
Daniel Stenberg
2bd3033f68 NTLM2 session response support 2006-06-07 14:14:04 +00:00
Daniel Stenberg
a5782defd3 Added config-tpf.h to the release package 2006-05-31 05:17:27 +00:00
Daniel Stenberg
973d63f4f2 one modified proto and one removed proto 2006-05-27 22:26:41 +00:00
Daniel Stenberg
405d98ee63 adapted to the new Curl_splayremovebyaddr() proto 2006-05-27 22:26:16 +00:00
Daniel Stenberg
f81724969d Ifdef'ed out unused function, added lots of comments and renamed a few
variables, simplified the splayprint function, modified
Curl_splayremovebyaddr() to return error code. All in an effort to track down
the reported splay problem, but I've failed to do that so far...
2006-05-27 22:25:55 +00:00
Daniel Stenberg
e877cb7bd7 scar Morales Viv updated the libcurl.framework.make file. 2006-05-26 22:23:54 +00:00
Daniel Stenberg
482b3ba702 long/int cleanup to silence picky compiler warnings 2006-05-26 11:26:42 +00:00
Daniel Stenberg
752acedc0b Olaf Stben fixed a bug that caused Digest authentication with md5-sess to
fail. When using the md5-sess, the result was not Md5 encoded and Base64
transformed.
2006-05-25 23:04:20 +00:00
Daniel Stenberg
606562aa7e Michael Wallner provided a patch that allows "SESS" to be set with
CURLOPT_COOKIELIST, which then makes all session cookies get cleared. (slightly
edited by me, and the re-indent in cookie.c was also done by me)
2006-05-24 22:46:38 +00:00
Daniel Stenberg
7cfd7f3fb1 minor fix to make Curl_splayremove() return a NULL as "removed" in case
nothing matched fine
2006-05-24 16:11:31 +00:00
Daniel Stenberg
b81d41df22 David McCreedy's update 2006-05-23 21:19:36 +00:00
Daniel Stenberg
5d5f5e3be8 make sure the LASTSOCKET check only checks for SSL status if the socket
truly use SSL
2006-05-11 05:17:40 +00:00
Daniel Stenberg
d9e14408f0 silence warning 2006-05-11 05:16:38 +00:00
Daniel Stenberg
c9c5ce2365 David McCreedy provided a fix for CURLINFO_LASTSOCKET that does extended
checks on the to-be-returned socket to make sure it truly seems to be alive
and well. For SSL connection it (only) uses OpenSSL functions.
2006-05-10 22:17:42 +00:00
Daniel Stenberg
3c6d3b69c2 1 - allow DICT with properly URL-escaped words, like using %20 for spaces
2 - properly escape certain letters within a DICT word to comply to the RFC2229
2006-05-10 11:44:31 +00:00
Daniel Stenberg
c811e1ce70 oops, could return an uninitialized variable 2006-05-09 13:02:53 +00:00
Daniel Stenberg
1946058e7b Robson Braga Araujo fixed two problems in the recently added non-blocking SSL
connects. The state machine was not reset properly so that subsequent
connects using the same handle would fail, and there were two memory leaks.
2006-05-09 12:43:49 +00:00
Daniel Stenberg
73daf8ce33 Robson Braga Araujo fixed a memory leak when you added an easy handle to a
multi stack and that easy handle had already been used to do one or more
easy interface transfers, as then the code threw away the previously used
DNS cache without properly freeing it.
2006-05-09 11:33:00 +00:00
Daniel Stenberg
094ceeba14 check more return codes and skip the initial slash in given file names 2006-05-08 22:23:33 +00:00
Daniel Stenberg
3b7359a27a no longer uses errno but Curl_sockerrno() and now acknowledges return codes
from Curl_client_write
2006-05-08 21:00:44 +00:00
Dan Fandrich
df9108e19b Stop sending retransmitted received blocks up to client
Fixed handling of retransmitted blocks on transmit
Properly aligned data to transmit within packet
Replaced calls to strerror() with Curl_strerror()
2006-05-08 19:41:26 +00:00
Daniel Stenberg
6307e783d8 Fixed known bug #28. The TFTP code no longer assumes a packed struct and
thus works reliably on more platforms.
2006-05-08 15:09:50 +00:00
Daniel Stenberg
b9cd73c76d Fix GnuTLS compile warning. Risking breakage with some older version of GnuTLS? 2006-05-07 18:27:36 +00:00
Daniel Stenberg
b62c230ca2 Curl_https_getsock() was OpenSSL-specific and really should not be present
like this in this source file. The quickfix for now is to provide a simple
version for GnuTLS builds. The GnuTLS version of libcurl doesn't yet allow
fully non-blocking connects anyway so this function doesn't get used.
2006-05-05 22:14:40 +00:00
Daniel Stenberg
800193da9b get the Curl_sockerrno proto 2006-05-05 22:07:01 +00:00
Daniel Stenberg
9bece2b313 additional renames of Curl_ourerrno => Curl_sockerrno 2006-05-05 10:24:27 +00:00
Daniel Stenberg
e85e30546c Roland Blom filed bug report #1481217
(http://curl.haxx.se/bug/view.cgi?id=1481217), with follow-ups by Michele Bini
and David Byron. libcurl previously wrongly used GetLastError() on windows to
get error details after socket-related function calls, when it really should
use WSAGetLastError() instead.

When changing to this, the former function Curl_ourerrno() is now instead
called Curl_sockerrno() as it is necessary to only use it to get errno from
socket-related functions as otherwise it won't work as intended on Windows.
2006-05-04 22:39:47 +00:00
Daniel Stenberg
758f6eed51 Mark Eichin submitted bug report #1480821
(http://curl.haxx.se/bug/view.cgi?id=1480821) He found and identified a
problem with how libcurl dealt with GnuTLS and a case where gnutls returned
GNUTLS_E_AGAIN indicating it would block. It would then return an unexpected
return code, making Curl_ssl_send() confuse the upper layer - causing random
28 bytes trash data to get inserted in the transfered stream.

The proper fix was to make the Curl_gtls_send() function return the proper
return codes that the callers would expect. The Curl_ossl_send() function
already did this.
2006-05-04 06:00:40 +00:00
Gisle Vanem
06a7b0561b Added revision ID-tag. 2006-04-26 17:27:36 +00:00
Gisle Vanem
12db20be4e Fixed signed/unsigned convertion errors in Salford-C.
#ifdef around WSAEDISCON in strerror.c.
2006-04-26 17:26:22 +00:00
Gisle Vanem
3cbb1b2b64 Use the HAVE_MALLOC_H and HAVE_PROCESS_H defines
(more logical).
2006-04-26 17:23:28 +00:00
Gisle Vanem
d75e587613 djgpp has <process.h> too. 2006-04-26 17:15:57 +00:00
Gisle Vanem
414c57d138 Added support for Salford-C under Win32 (scc). HAVE_MALLOC_H and
HAVE_PROCESS_H added for all except scc.
2006-04-26 17:11:05 +00:00
Daniel Stenberg
def0db30e7 crlf_conversions needs to be a curl_off_t for ASCII transfers > 4GB on 32bit
systems
2006-04-26 13:08:12 +00:00
Daniel Stenberg
95152aec68 David McCreedy brought line end conversions when doing FTP ASCII
transfers. They are done on non-windows systems and translate CRLF to LF.
2006-04-26 07:40:37 +00:00
Daniel Stenberg
87c5ed8bec Paul Querna fixed libcurl to better deal with deflate content encoding when
the stream (wrongly) lacks a proper zlib header. This seems to be the case on
too many actual server implementations.
2006-04-25 20:49:40 +00:00
Daniel Stenberg
ecc6c1f501 prevent signed/unsigned warnings 2006-04-25 05:32:05 +00:00
Daniel Stenberg
db03d4bdd0 Ale Vesely fixed CURLOPT_INTERFACE when using a hostname 2006-04-21 13:46:19 +00:00
Daniel Stenberg
0ec96e4279 each socket is used by exactly one easy handle, but of course each easy handle
can and will use more than one socket
2006-04-21 13:40:07 +00:00
Gunter Knauf
1e8683d72d removed -fpack-struct because gcc4 seems to know its obsolete and warns... 2006-04-20 10:26:51 +00:00
Daniel Stenberg
f191b143e9 CURL_VERSION_CONV is returned by curl_version_info if libcurl has been built
to allow/support character conversions
2006-04-19 09:03:21 +00:00
Daniel Stenberg
e532b196cc Robson Braga Araujo provided a patch that makes libcurl less eager to close
the control connection when using FTP, for example when you remove an easy
handle from a multi stack.
2006-04-18 23:14:30 +00:00
Daniel Stenberg
38898ba4af corrected the SSL timeout, as Ates Goral's patch did it and that works (opposed
to my previous brain-damaged version)
2006-04-18 22:10:19 +00:00
Daniel Stenberg
48f56d9600 attempt to silence the MIPSPro compiler warning 2006-04-18 10:55:41 +00:00
Daniel Stenberg
17bf5ac2fc avoid a warning about declaring a variable that shadows an earlier declared
one
2006-04-18 10:51:07 +00:00
Daniel Stenberg
343b882d80 there's an curl_easy_unescape too now 2006-04-18 09:23:03 +00:00
Gunter Knauf
19240f08bb added missing symbol export. 2006-04-17 17:06:10 +00:00
Daniel Stenberg
d774730f83 added splay 2006-04-12 18:12:46 +00:00
Gisle Vanem
c2edf42567 Added splay.c. 2006-04-12 14:01:21 +00:00
Gisle Vanem
08f0e55b4f Add "multiif.h" for GETSOCK_WRITESOCK() macro. 2006-04-12 13:54:07 +00:00
Daniel Stenberg
0542002d7a adjusted to the new internal *_getsock() concept for providing info internally
about what sockets to wait for what action on
2006-04-11 07:23:30 +00:00
Daniel Stenberg
c1e307f585 added docs and removed proto 2006-04-11 07:22:55 +00:00
Daniel Stenberg
676597e961 Ates Goral found out that if you specified both CURLOPT_CONNECTTIMEOUT and
CURLOPT_TIMEOUT, the _longer_ time would wrongly be used for the SSL
connection time-out!
2006-04-10 21:49:55 +00:00
Daniel Stenberg
686d90745b First curl_multi_socket() commit. Should primarily be considered as an internal
code rearrange to fit the future better.
2006-04-10 15:00:53 +00:00
Daniel Stenberg
0598547b58 added README.multi_socket 2006-04-10 14:54:12 +00:00
Daniel Stenberg
67c7745f5d state of the multi_socket API works 2006-04-10 14:44:23 +00:00
Daniel Stenberg
e6efecd054 avoid duplicate typedefs, as this type is also defined in our public headers 2006-04-10 13:14:14 +00:00
Daniel Stenberg
a21a77d230 CURLE_FTP_USER_PASSWORD_INCORRECT is not returned by libcurl anymore! 2006-04-09 22:41:22 +00:00
Gisle Vanem
e4a4b562c4 readint_le() not needed in USE_WINDOWS_SSPI code. 2006-04-08 11:04:53 +00:00
Gisle Vanem
35b4a755f9 curl_easy_unescape() takes 4 arguments. 2006-04-08 11:01:40 +00:00
Daniel Stenberg
5a4b43848a First commit of David McCreedy's EBCDIC and TPF changes. 2006-04-07 21:50:47 +00:00
Daniel Stenberg
4d33cf739d added typedefed function pointers and typecast the NULL assignments in an
attempt to silence picky compilers when assigning data pointers to a function
pointer variable
2006-04-07 11:47:21 +00:00
Daniel Stenberg
34e7daf989 attempt to avoid warnings in picky environments by storing options as
unsigned chars
2006-04-07 11:46:16 +00:00
Daniel Stenberg
be285cde3f Michele Bini modified the NTLM code to work for his "weird IIS case"
(http://curl.haxx.se/mail/lib-2006-02/0154.html) by adding the NTLM hash
function in addition to the LM one and making some other adjustments in the
order the different parts of the data block are sent in the Type-2 reply.
Inspiration for this work was taken from the Firefox NTLM implementation.

I edited the existing 21(!) NTLM test cases to run fine with these news. Due
to the fact that we now properly include the host name in the Type-2 message
the test cases now only compare parts of that chunk.
2006-04-05 12:35:48 +00:00
Daniel Stenberg
bcc62cc9e3 #1451929 (http://curl.haxx.se/bug/view.cgi?id=1451929) detailed a bug that
occurred when asking libcurl to follow HTTP redirects and the original URL had
more than one question mark (?). Added test case 276 to verify.
2006-03-28 08:03:25 +00:00
Gunter Knauf
d74725ce67 minor Makefile fix - let's go 2006;
avoid kiling hugehelp.c when not built from CVS.
2006-03-27 14:34:19 +00:00
Daniel Stenberg
3dad55d7a8 Tor Arntsen figured out that TFTP was broken on a lot of systems since we
called bind() with a too big argument in the 3rd parameter and at least
Tru64, AIX and IRIX seem to be very picky about it.
2006-03-26 08:52:43 +00:00
Daniel Stenberg
598ffeea89 David McCreedy added CURLINFO_FTP_ENTRY_PATH to export the FTP entry path 2006-03-21 22:30:03 +00:00
Daniel Stenberg
83367f67de Xavier Bouchoux made the SSL connection non-blocking for the multi interface
(when using OpenSSL).
2006-03-21 21:54:44 +00:00
Daniel Stenberg
6421d69bff David McCreedy fixed libcurl to no longer ignore AUTH failures and now it
reacts properly according to the CURLOPT_FTP_SSL setting.
2006-03-20 22:51:08 +00:00
Dan Fandrich
a63f9887b9 Fixed a bug whereby a received file whose length was a multiple of
512 bytes could have random garbage appended.  Also, stop processing TFTP
packets which are too short to be legal.
2006-03-20 22:15:22 +00:00
Daniel Stenberg
5975229919 fixed tftp packet overflow risk 2006-03-20 07:32:50 +00:00
Daniel Stenberg
d494d62953 David McCreedy found a use of the wrong variable when display the error
text from OpenSSL.
2006-03-13 23:34:25 +00:00
Daniel Stenberg
7206181385 David McCreedy found a missing return code assignment 2006-03-13 23:33:46 +00:00
Daniel Stenberg
f70f11fc70 Peter Heuchert's correction for the clear control connection case 2006-03-08 15:46:21 +00:00
Daniel Stenberg
cffebd7fd6 Markus Koetter filed debian bug report #355715 which identified a problem
with the multi interface and multi-part formposts. The fix from February
22nd could make the Curl_done() function get called twice on the same
connection and it was not designed for that and thus tried to call free() on
an already freed memory area!
2006-03-07 23:11:41 +00:00
Daniel Stenberg
b8c8e7349f Peter Heuchert made sure the CURLFTPSSL_CONTROL setting for CURLOPT_FTP_SSL
is used properly.
2006-03-07 22:28:08 +00:00
Daniel Stenberg
8bba99ae56 Lots of users on Windows have reported getting the "SSL: couldn't set
callback" error message so I've now made the setting of that callback not be
as critical as before. The function is only used for additional loggging/
trace anyway so a failure just means slightly less data. It should still be
able to proceed and connect fine to the server.
2006-03-06 22:35:51 +00:00
Daniel Stenberg
b5c5f57613 build fix for Interix 2006-03-04 22:39:31 +00:00
Daniel Stenberg
7d68101f83 Prevent uploading to a URL that has no file name part. 2006-03-03 13:09:30 +00:00
Gisle Vanem
dc4fbd2e97 Small fix. 2006-02-26 18:20:43 +00:00
Gisle Vanem
60b029869f Use getprotobyname() to retrieve protocol number for TCP
(sorry, I don't know how to add this to the configure process).
2006-02-26 17:08:33 +00:00
Dan Fandrich
a39ac3d94a Added user ID support to SOCKS4. 2006-02-24 21:35:48 +00:00
Daniel Stenberg
4486d336a6 argh, forgot the check for a connection before we call Curl_done 2006-02-23 21:29:48 +00:00
Dan Fandrich
45e4b811b0 Fixed a few more comment typos. 2006-02-23 18:39:22 +00:00
Daniel Stenberg
0e6a1a4420 Peter Su's SOCKS4 fix 2006-02-23 14:42:47 +00:00
Daniel Stenberg
6fdbb01194 Lots of work and analysis by "xbx___" in bug #1431750
(http://curl.haxx.se/bug/view.cgi?id=1431750) helped me identify and fix two
different but related bugs:

1) Removing an easy handle from a multi handle before the transfer is done
   could leave a connection in the connection cache for that handle that is
   in a state that isn't suitable for re-use. A subsequent re-use could then
   read from a NULL pointer and segfault.

2) When an easy handle was removed from the multi handle, there could be an
   outstanding c-ares DNS name resolve request. When the response arrived,
   it caused havoc since the connection struct it "belonged" to could've
   been freed already.

Now Curl_done() is called when an easy handle is removed from a multi handle
pre-maturely (that is, before the transfer was complteted). Curl_done() also
makes sure to cancel all (if any) outstanding c-ares requests.
2006-02-23 12:20:48 +00:00
Dan Fandrich
75c9430559 Fixed some spelling errors in comments, and extraneous \n in failf logs. 2006-02-22 19:09:33 +00:00
Daniel Stenberg
a15d107dde Peter Su added support for SOCKS4 proxies. Enable this by setting the proxy
type to the already provided type CURLPROXY_SOCKS4.
I added a --socks4 option that works like the current --socks5 option but
instead use the socks4 protocol.
2006-02-21 07:46:41 +00:00
Daniel Stenberg
29e446e508 Shmulik Regev fixed an issue with multi-pass authentication and compressed
content when libcurl didn't honor the internal ignorebody flag.
2006-02-19 23:16:48 +00:00
Daniel Stenberg
10beb36b1c Ulf Hrnhammar fixed a format string (printf style) problem in the Negotiate
code. It should however not be the cause of any troubles. He also fixed a
few similar problems in the HTTP test server code.
2006-02-18 22:27:01 +00:00
Yang Tse
a65a888866 Fix spacing. 2006-02-17 15:58:21 +00:00
Daniel Stenberg
92009181af Shmulik Regev provided a fix for the DNS cache when using short life times,
as previously it could be holding on to old cached entries longer than
requested.
2006-02-16 23:42:32 +00:00
Daniel Stenberg
ad6511c313 Added some clarifying comments 2006-02-16 10:02:11 +00:00
Daniel Stenberg
87bcb6f377 Karl M added the CURLOPT_CONNECT_ONLY and CURLINFO_LASTSOCKET options that
an app can use to let libcurl only connect to a remote host and then extract
the socket from libcurl. libcurl will then not attempt to do any transfer at
all after the connect is done.
2006-02-11 22:35:16 +00:00
Daniel Stenberg
12f5c67bf5 Philippe Vaucher provided a brilliant piece of test code that show a problem
with re-used FTP connections. If the second request on the same connection was
set not to fetch a "body", libcurl could get confused and consider it an
attempt to use a dead connection and would go acting mighty strange.
2006-02-07 23:09:04 +00:00
Gisle Vanem
5994b62930 Squelch the "warning: 'port' might be used uninitialized in this function".
(occurs w/o ENABLE_IPV6).
2006-01-30 18:57:02 +00:00
Daniel Stenberg
2fbf94b0f3 Added CURLOPT_LOCALPORT and CURLOPT_LOCALPORTRANGE to libcurl. Set with the
curl tool with --local-port. Plain and simply set the range of ports to bind
the local end of connections to. Implemented on to popular demand.

Not extensively tested. Please let me know how it works.
2006-01-30 08:24:07 +00:00
Daniel Stenberg
32bc30e210 Based on an error report by Philippe Vaucher, we no longer count a retried
connection setup as a follow-redirect. It turns out 1) this fails when a FTP
connection is re-setup and 2) it does make the max-redirs counter behave
wrong. This fix was not verified since the reporter vanished, but I believe
this is the right fix nonetheless.
2006-01-30 08:20:52 +00:00
Daniel Stenberg
8d4eb2bc1f updated source header 2006-01-26 10:39:25 +00:00
Daniel Stenberg
67bf4f28ff Michal Marek provided a patch for FTP that makes libcurl continue to try PASV
even after EPSV returned a positive response code, if libcurl failed to
connect to the port number the EPSV response said. Obviously some people are
going through protocol-sensitive firewalls (or similar) that don't understand
EPSV and then they don't allow the second connection unless PASV was
used. This also called for a minor fix of test case 238.
2006-01-24 14:40:43 +00:00
Daniel Stenberg
fcfd6d9504 Duane Cathey was one of our friends who reported that curl -P [IP]
(CURLOPT_FTPPORT) didn't work for ipv6-enabed curls if the IP wasn't a
"native" IP while it works fine for ipv6-disabled builds!

In the process of fixing this, I removed the support for LPRT since I can't
think of many reasons to keep doing it and asking on the mailing list didn't
reveal anyone else that could either. The code that sends EPRT and PORT is
now also a lot simpler than before (IMHO).
2006-01-19 23:52:03 +00:00
Daniel Stenberg
c31451cf13 Jon Turner pointed out that doing -P [hostname] with curl (built ipv4-only)
didn't work.
2006-01-19 22:02:46 +00:00
Daniel Stenberg
67a83c1b34 David Shaw finally removed all traces of Gopher and we are now officially
not supporting it. It hasn't been functioning for years anyway, so this is
just finally stating what already was true. And a cleanup at the same time.
2006-01-16 22:14:37 +00:00
Daniel Stenberg
4c35a40858 Bryan Henderson turned the 'initialized' variable for curl_global_init()
into a counter, and thus you can now do multiple curl_global_init() and you
are then supposed to do the same amount of calls to curl_global_cleanup().
Bryan also updated the docs accordingly.
2006-01-15 23:55:53 +00:00
Daniel Stenberg
d9bd5de0b1 Fixed FTP_SKIP_PASV_IP and FTP_USE_EPSV to "do right" when used on FTP thru
HTTP proxy.
2006-01-12 22:18:38 +00:00
Daniel Stenberg
31c7aa0ba4 Michael Jahn fixed ftp over CONNECT 2006-01-12 12:40:04 +00:00
Daniel Stenberg
4431338691 When using a bad path over FTP, as in when libcurl couldn't CWD into all
given subdirs, libcurl would still "remember" the full path as if it is the
current directory libcurl is in so that the next curl_easy_perform() would
get really confused if it tried the same path again - as it would not issue
any CWD commands at all, assuming it is already in the "proper" dir.

Starting now, a failed CWD command sets a flag that prevents the path to be
"remembered" after returning.
2006-01-10 23:03:22 +00:00
Daniel Stenberg
bda1e9aeab Made the copyright year match the latest modification's year. 2006-01-09 13:17:14 +00:00
Daniel Stenberg
f4cc8153ae Mike Jean fixed so that the second CONNECT when doing FTP over a HTTP proxy
actually used a new connection and not sent the second request on the first
socket!
2006-01-07 22:24:16 +00:00
Gisle Vanem
4dcb930247 Include <sys/ioctl.h> before redefining ioctl(). 2006-01-02 18:35:58 +00:00
Marty Kuhrt
0040a60559 fix questionable compare 2005-12-30 00:35:21 +00:00
Marty Kuhrt
cc34342790 fix questionable compare compiler error (unsigned can't be < 0) 2005-12-30 00:20:46 +00:00
Marty Kuhrt
b11dec5dd5 putting back into dist 2005-12-30 00:07:25 +00:00
Daniel Stenberg
0e3ebd9841 Kirill Vasiliev fixed the 'release-ssl-dll' target to properly build a
static libcurl using openssl as dll.
2005-12-23 23:40:40 +00:00
Daniel Stenberg
7d1e3ebeed explain tld_check_name() 2005-12-20 22:46:12 +00:00
Gisle Vanem
7b51aafa86 Changes for PellesC compiler under Win32. A bit limited, but
we just love swedish products...
2005-12-20 22:20:04 +00:00
Dan Fandrich
178afd81a9 Fixed lcc compiler warnings. 2005-12-19 19:47:14 +00:00
Yang Tse
0ad3e046a4 Fix spacing. When defining, define to 1. 2005-12-18 16:50:33 +00:00
Yang Tse
d6c5d24af3 Cleanup windows header includes. Where aplicable, inclusion of
windows.h winsock.h winsock2.h ws2tcpip.h is done in setup.h
2005-12-18 15:36:14 +00:00
Yang Tse
23b34744d9 Cleanup 2005-12-17 21:20:35 +00:00
Yang Tse
bc8590aa12 Windows related cleanup 2005-12-17 20:37:53 +00:00
Yang Tse
336e3b8baf Change multiple header inclusion prevention definition to __LIB_CURL_SETUP_H 2005-12-17 06:04:35 +00:00
Yang Tse
e105d5c28f 'Fix' windows builds 2005-12-16 20:55:07 +00:00
Daniel Stenberg
6dbfce1031 Jean Jacques Drouin pointed out that you could only have a user name or
password of 127 bytes or less embedded in a URL, where actually the code
uses a 255 byte buffer for it! Modified now to use the full buffer size.
2005-12-16 14:52:16 +00:00
Dan Fandrich
e2df946eee Fixed some compiler warnings on lcc. 2005-12-13 18:54:31 +00:00
Yang Tse
d14588120f Undo last 'fix', since it was not the proper one. 2005-12-13 13:50:22 +00:00
Yang Tse
947f9deed5 Fix compiler warning 2005-12-12 18:40:18 +00:00
Yang Tse
b15f3bb969 Undo last changes 2005-12-11 23:37:58 +00:00
Daniel Stenberg
998e8cba19 Dov Murik made defining HTTP_ONLY also disable TFTP 2005-12-11 23:14:25 +00:00
Yang Tse
e3f523ab2a Avoid generation of additional warnings 2005-12-11 18:29:18 +00:00
Yang Tse
36485e56ed Fix compiler warning and compatibility issue with the type of the parameter used in getnameinfo() to receive the length of the sockaddr struct. 2005-12-11 12:03:01 +00:00
Yang Tse
1cc98ab50f Unset HAVE_STRUCT_SOCKADDR_STORAGE when using msvc 6.0 with no PSDK 2005-12-09 15:19:07 +00:00
Dan Fandrich
df03d5a8b2 Replaced nonstandard u_char and u_int types 2005-12-08 22:59:58 +00:00
Yang Tse
6a0ed81e67 Fix compiler warning 2005-12-08 20:38:04 +00:00
Yang Tse
c94f3e8188 Fix compiler warning 2005-12-08 19:47:33 +00:00
Dan Fandrich
1e5f6cc1dc Fixed a lingering omission of gzip support. 2005-12-08 18:59:19 +00:00
Daniel Stenberg
f49df54a36 7.15.1 with the now to be announced security flaw fixed 2005-12-06 23:05:51 +00:00
Dan Fandrich
8c6f654b26 Added a run-time check to warn if TFTP is going to fail due to portability
issues in the code.
2005-12-05 20:07:05 +00:00
Daniel Stenberg
083c5e17e1 Yang Tse fixed: Openssl 0.9.9 makes 'const' the SSL_METHOD parameter in
SSL_CTX_new and others, and also makes functions SSLv23_client_method,
TLSv1_client_method, etc return a 'const' SSL_METHOD pointer. Previous
versions do not use the 'const' qualifier.
2005-12-05 15:14:04 +00:00
Daniel Stenberg
272231fb09 Another Yang Tse warning cleanup raid! 2005-12-05 14:10:48 +00:00
Gisle Vanem
67b4d9b232 Recent OpenSSL returns a 'const' in '*_client_method()'. So avoid
'assignment discards qualifiers from pointer target type' warning.
2005-12-04 18:47:36 +00:00
Daniel Stenberg
9c312637d1 Yang Tse's fix to only provide the proto if there is such a function and
we didn't find any proto
2005-12-02 23:22:45 +00:00
Daniel Stenberg
feacad7f68 Yang Tse fixed the 4th argument in the sendto() calls 2005-12-02 23:22:00 +00:00
Daniel Stenberg
6513303498 Jamie Newton pointed out that libcurl's file:// code would close() a zero
file descriptor if given a non-existing file.
2005-12-01 23:42:03 +00:00
Daniel Stenberg
176d4e85e9 cast the va_arg() assignment to ftp_filemethod properly 2005-11-30 13:09:48 +00:00
Daniel Stenberg
0fd282b078 new experimental "ftp method" code 2005-11-28 23:06:00 +00:00
Daniel Stenberg
b222b2304e Yang Tse's changes to provide an inet_pton() proto for the platforms who
don't have one in order to fix a remaining warning on IRIX 6.2.
2005-11-28 20:21:35 +00:00
Daniel Stenberg
01cbf08064 Yang Tse: fixes the use of Curl_inet_ntop and Curl_inet_pton with no
prototypes on some platforms, ie IRIX 6.2 MIPS C 6.2
2005-11-25 22:20:02 +00:00
Daniel Stenberg
afc2aa2b3f Yang Tse: use static on file-private functions 2005-11-24 20:39:00 +00:00
Daniel Stenberg
d055b269ed Yang Tse: fix compilation errors when SSL is not disabled and HTTP is
disabled
2005-11-24 20:38:20 +00:00
Daniel Stenberg
8a246a4a9f Yang Tse: removes GOPHER protocol when HTTP is disabled 2005-11-24 20:37:13 +00:00
Gisle Vanem
2f684351bf Changes for OpenWatcom 1.4. 2005-11-24 20:33:38 +00:00
Daniel Stenberg
74e5beab9d Doug Kaufman's set of patches to make curl build fine on DJGPP again using
configure.
2005-11-24 10:22:46 +00:00
Daniel Stenberg
05a6013f42 Yang Tse's patch to silence MSVC warnings 2005-11-23 22:59:24 +00:00
Daniel Stenberg
cfff544d67 only enable NTLM if HTTP and NTLM is not disabled, and if NTLM is disabled
we define an empty macro for the ntlm cleanup function
2005-11-23 11:51:31 +00:00
Daniel Stenberg
599d9642ca Yang Tse fixed MSVC 6.0 warnings 2005-11-23 09:10:00 +00:00
Daniel Stenberg
0264faaa4e fix compiler warning 2005-11-18 07:23:50 +00:00
Daniel Stenberg
4022a60ea7 I extended a patch from David Shaw to make libcurl _always_ provide an error
string in the given error buffer to address the flaw mention on 21 sep 2005.
2005-11-17 14:29:54 +00:00
Daniel Stenberg
92c0de518e Quagmire reported that he needed to raise a NTLM buffer for SSPI to work
properly for a case, and so we did. We raised it even for non-SSPI builds
but it should not do any harm. http://curl.haxx.se/bug/view.cgi?id=1356715
2005-11-14 22:10:52 +00:00
Daniel Stenberg
fd870e4e8a Yang Tse: msvc7+ has deprecated the 'DESCRIPTION' section in
module-definition files. this section is not mandatory for msvc60 so it
could be completely removed from libcurl.def.
2005-11-14 07:48:05 +00:00
Daniel Stenberg
d52ed3fff2 Jan Kunder's debian bug report
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=338680 identified a weird
error message for when you try to upload a file and the requested directory
doesn't exist on the target server.
2005-11-14 00:18:12 +00:00
Daniel Stenberg
9ace303528 Yang Tse fixed compiler warnings 2005-11-13 23:53:14 +00:00
Daniel Stenberg
7e81c35cdc to build with old gnutls verions, don't use the *_t types 2005-11-13 23:04:28 +00:00
Gisle Vanem
d4714517c0 Add HAVE_STRUCT_SOCKADDR_STORAGE.
My mistake; WinCE has it's own config-file.
2005-11-13 13:32:19 +00:00
Gisle Vanem
280e4bf4c3 Fix for WIN32. WIN32 does have 'struct sockaddr_storage', but
that's in <winsock2.h>. Hence tftp.c wouldn't compile on WinCE.
2005-11-13 13:20:37 +00:00
Daniel Stenberg
c2862742ab Thanks to this nice summary of poll() implementations:
http://www.greenend.org.uk/rjk/2001/06/poll.html and further tests by Eugene
Kotlyarov, we now know that cygwin's poll returns only POLLHUP on remote
connection closure so we check for that case (too) and re-enable poll for
cygwin builds.
2005-11-13 09:24:06 +00:00
Daniel Stenberg
d58790af17 oops * 2 2005-11-12 22:13:20 +00:00
Daniel Stenberg
9ef7a13403 oops 2005-11-12 22:12:42 +00:00
Daniel Stenberg
a5da1219bb Reversed the logic for sockaddr_storage and made our own Curl_sockaddr_storage
struct instead to use.
2005-11-12 22:10:42 +00:00
Daniel Stenberg
5e3836055f Dima Barsky patched problem #1348930: the GnuTLS code completely ignored
client certificates! (http://curl.haxx.se/bug/view.cgi?id=1348930).
2005-11-11 23:20:07 +00:00
Daniel Stenberg
37a6a0bb3e Moved the sockaddr_storage definition to lib/sockaddr.h and only include that
in files that actually need the struct.
2005-11-11 22:04:11 +00:00
Daniel Stenberg
ae9fbe573e David Lang fixed IPv6 support for TFTP! 2005-11-10 22:25:07 +00:00
Daniel Stenberg
29676f473d David Lang: if there is no sockaddr_storage, make up our own and use that 2005-11-10 22:24:49 +00:00
Daniel Stenberg
cab59b4c32 Removed the use of AI_CANONNAME in the IPv6-enabled resolver functions since
we really have no use for reverse lookups of the address.

I truly hope these are the last reverse lookups we had lingering in the
code!
2005-11-08 14:45:58 +00:00
Daniel Stenberg
175335808b Dmitry Bartsevich discovered some issues in compatibilty of SSPI-enabled
version of libcurl with different Windows versions. Current version of
libcurl imports SSPI functions from secur32.dll. However, under Windows NT
4.0 these functions are located in security.dll, under Windows 9x - in
secur32.dll and Windows 2000 and XP contains both these DLLs (security.dll
just forwards calls to secur32.dll).

Dmitry's patch loads proper library dynamically depending on Windows
version. Function InitSecurityInterface() is used to obtain pointers to all
of SSPI function in one structure.
: ----------------------------------------------------------------------
2005-11-08 14:15:34 +00:00
Gisle Vanem
6b1e54da62 Use an empty '*mod_name'. 2005-11-01 16:27:27 +00:00
Daniel Stenberg
b91421b107 Vilmos Nebehaj improved libcurl's LDAP abilities:
The LDAP code in libcurl can't handle LDAP servers of LDAPv3 nor binary
attributes in LDAP objects. So, I made a quick patch to address these
problems.

The solution is simple: if we connect to an LDAP server, first try LDAPv3
(which is the preferred protocol as of now) and then fall back to LDAPv2.
In case of binary attributes, we first convert them to base64, just like the
openldap client does. It uses ldap_get_values_len() instead of
ldap_get_values() to be able to retrieve binary attributes correctly. I
defined the necessary LDAP macros in lib/ldap.c to be able to compile
libcurl without the presence of libldap
2005-10-31 08:55:01 +00:00
Daniel Stenberg
43b3954fa5 kill trailing whitespace 2005-10-31 08:47:54 +00:00
Daniel Stenberg
966fa848a0 Nis Jorgensen filed bug report #1338648
(http://curl.haxx.se/bug/view.cgi?id=1338648) which really is more of a
feature request, but anyway. It pointed out that --max-redirs did not allow
it to be set to 0, which then would return an error code on the first
Location: found. Based on Nis' patch, now libcurl supports CURLOPT_MAXREDIRS
set to 0, or -1 for infinity. Added test case 274 to verify.
2005-10-27 22:05:38 +00:00
Gisle Vanem
bd72c5eacf Added option '-zc' puts const data in code-segment.
Added CURL_DISABLE_TFTP; tftp.c doesn't compile as-is.
2005-10-27 12:45:31 +00:00
Daniel Stenberg
9e0882ba98 close the existing socket when trying next IP, as otherwise we leak one!
bug #1326306
2005-10-25 13:15:11 +00:00
Daniel Stenberg
c890149c8c Dima Barsky reported a problem with GnuTLS-enabled libcurl in bug report
#1334338 (http://curl.haxx.se/bug/view.cgi?id=1334338). When reading an SSL
  stream from a server and the server requests a "rehandshake", the current
  code simply returns this as an error. I have no good way to test this, but
  I've added a crude attempt of dealing with this situation slightly better -
  it makes a blocking handshake if this happens. Done like this because fixing
  this the "proper" way (that would handshake asynchronously) will require
  quite some work and I really need a good way to test this to do such a
  change.
2005-10-22 21:05:07 +00:00
Daniel Stenberg
1a1ab2e2e8 "Ofer" reported a problem when libcurl re-used a connection and failed to do
it, it could then accidentally actually crash. Presumably, this concerns FTP
connections.  http://curl.haxx.se/bug/view.cgi?id=1330310
2005-10-21 21:00:44 +00:00
Daniel Stenberg
715b706caa Temprimus improved the MSVC makefile so that the static debug SSL libs are
linked to the executable and not to the libcurld.lib
http://curl.haxx.se/bug/view.cgi?id=1326676
2005-10-21 19:32:12 +00:00
Daniel Stenberg
bfa9c42c25 Bradford Bruce made the windows resolver code properly return
CURLE_COULDNT_RESOLVE_PROXY and CURLE_COULDNT_RESOLVE_HOST on resolving
errors (as documented).
2005-10-21 19:21:19 +00:00
Daniel Stenberg
be9c873a6e Dave Dribin made libcurl understand and handle cases when the server
(wrongly) sends *two* WWW-Authenticate headers for Digest. While this should
never happen in a sane world, libcurl previously got into an infinite loop
when this occurred. Dave added test 273 to verify this.
2005-10-20 20:07:32 +00:00
Daniel Stenberg
021e786c71 Added a dump_addrinfo() function to ease debugging of resolved names. Define
DEBUG_ADDRINFO to enable.
2005-10-20 19:40:02 +00:00
Daniel Stenberg
0c6bb8cb66 Temprimus improved the MSVC makefile: "makes a build option available so if
you set rtlibcfg=static for the make, then it would build with /MT. The
default behaviour is /MD (the original)."
http://curl.haxx.se/bug/view.cgi?id=1326665
2005-10-20 19:07:33 +00:00
Daniel Stenberg
51369753bb Reported by 'TemPRImus' in bug 1326665: use the "Multi-Threaded" options even
when building the static library. http://curl.haxx.se/bug/view.cgi?id=1326665
2005-10-14 13:22:49 +00:00
Daniel Stenberg
943aea6267 Make sure that the user and domain strings fit in the target buffer before we
copy them there.
2005-10-13 07:57:51 +00:00
Daniel Stenberg
b2be6799f2 pass a NULL pointer in the service argument (the second) if the port number
was 0 as it seems at least some AIX versions don't like a "0" string there
2005-10-10 18:28:05 +00:00
Gisle Vanem
ea2618fc6f Added tftp.obj. 2005-10-06 18:47:05 +00:00
Daniel Stenberg
3beb2f6b5d CURL_TIMECOND_IFMODSINCE actually requires that the remote document has been
modded since the given time, so we should compare <= and not just <.
2005-10-05 06:09:20 +00:00
Daniel Stenberg
db83a0ebbc Michael Wallner reported that the date parser had wrong offset stored for
the MEST and CEST time zones.
2005-10-04 18:15:33 +00:00
Gisle Vanem
06c3bec65d Avoid gcc warning "dereferencing type-punned pointer
will break strict-aliasing rules".
2005-10-02 18:22:45 +00:00
Gisle Vanem
e8c3bb45ba Fix for building with MS Visual-C and single-threaded
runtime libs.
2005-10-02 16:52:07 +00:00
Daniel Stenberg
e43217e664 Starting now, the verbose text that goes like "About to connect() to" will
now contain the word "proxy" is the hostname is in fact a proxy. This will
help users detect situations when they mistakenly use a proxy.
2005-09-29 11:37:52 +00:00
Daniel Stenberg
b4c53e2cfd An anonymous submitter filed bug #1299181
(http://curl.haxx.se/bug/view.cgi?id=1299181) that identified a silly problem
with Content-Range: headers with the 'bytes' keyword written in a different
case than all lowercase! It would cause a segfault!
2005-09-27 09:13:39 +00:00
Daniel Stenberg
a2902de67c TJ Saunders of the proftpd project identified and pointed out problems with
the modified FTPS negotiation change of August 19 2005. Thus, we revert the
change back to pre-7.14.1 status.
2005-09-27 08:46:54 +00:00
Daniel Stenberg
bd5a622400 stricter type usage for time variables to avoid picky compiler warnings 2005-09-21 11:28:40 +00:00
Daniel Stenberg
b6f0aa4394 return an error string for the missing URL case 2005-09-21 06:38:33 +00:00
Daniel Stenberg
58d628c9f8 Uses __stdcall instead of SEC_ENTRY since it seems (at least) mingw doesn't
define SEC_ENTRY and thus fails unless this is done!
2005-09-20 08:29:56 +00:00
Daniel Stenberg
1cf798ad14 typecasts added in an attempt to please the picky compilers 2005-09-20 06:51:23 +00:00
Daniel Stenberg
3fe5311967 Dmitry Bartsevich made the SSPI support work on Windows 9x as well 2005-09-19 21:45:16 +00:00
Daniel Stenberg
e7093b3ca8 keep 'socktype' in the connectdata struct and make sure we use that for all
protocol sockets even if the resolved address may say otherwise
2005-09-16 21:30:08 +00:00
Daniel Stenberg
97a6d7b1a8 minor changes, the biggest one being using Curl_select() 2005-09-15 20:21:27 +00:00
Daniel Stenberg
0b8ccd0ae7 oops, return error if an error did occur! 2005-09-14 15:04:01 +00:00
Daniel Stenberg
0e7d93858d added tftp.c 2005-09-07 14:42:15 +00:00
Gisle Vanem
9889a811db Fix warning about missing initializers. 2005-09-06 15:58:09 +00:00
Gisle Vanem
9e38d882b9 Fix for bind() on Winsock; AF_UNSPEC (0) is illegal.
Should we do this for all targets?
2005-09-06 15:43:14 +00:00
Daniel Stenberg
e8b77477c7 sockets are curl_socket_t to build cleaner 2005-09-06 10:39:01 +00:00
Daniel Stenberg
64298e528d Use SOCK_DGRAM for TFTP. Consider setting this up at one central place, we
have this check done on far too many places by now...
2005-09-06 10:37:57 +00:00
Gunter Knauf
4f1465e7c7 minor Makefile fixes. 2005-09-06 00:39:41 +00:00
Daniel Stenberg
a3d776187a check that bind() returns success 2005-09-04 18:33:20 +00:00
Daniel Stenberg
7e845e7cfd Added FTP_SKIP_PASV_IP and --ftp-skip-pasv-ip 2005-09-04 05:16:06 +00:00
Daniel Stenberg
56d9624b56 John Kelly added TFTP support to libcurl. A bunch of new error codes was
added. TODO: add them to docs. add TFTP server to test suite. add TFTP to
list of protocols whereever those are mentioned.
2005-09-02 15:11:08 +00:00
Daniel Stenberg
2fe3c22108 use it as 'struct addrinfo' so perhaps it builds on mingw again 2005-08-31 06:04:48 +00:00
Daniel Stenberg
64414df27e Use the more correct BUILDING_LIBCURL define instead of CURLLIB_EXPORTS.
Kevin Lussier pointed this out!
2005-08-29 20:56:20 +00:00
Daniel Stenberg
87bbd13899 Igor Polyakov fixed a rather nasty problem with the threaded name resolver
for Windows, that could lead to an Access Violation when the multi interface
was used due to an issue with how the resolver thread was and was not
terminated.
2005-08-29 14:23:53 +00:00
Daniel Stenberg
5effe8f336 Simon Josefson brought GNU GSS support 2005-08-29 08:42:45 +00:00
Daniel Stenberg
9853acba66 Moved the GnuTLS related TODO items from lib/TODO.gnutls to the proper
docs/TODO
2005-08-29 06:59:44 +00:00
Daniel Stenberg
a4773fcbbb Toby Peterson added CURLOPT_IGNORE_CONTENT_LENGTH to the library, accessible
from the command line tool with --ignore-content-length. This will make it
easier to download files from Apache 1.x (and similar) servers that are
still having problems serving files larger than 2 or 4 GB. When this option
is enabled, curl will simply have to wait for the server to close the
connection to signal end of transfer. I wrote test case 269 that runs a
simple test that this works.
2005-08-24 10:57:28 +00:00
Daniel Stenberg
432dfe2b8f Fixed CA cert verification using GnuTLS with the default bundle, which
previously failed due to GnuTLS not allowing x509 v1 CA certs by default.
2005-08-24 07:40:13 +00:00
Gunter Knauf
f14195f786 enabled statically linked builds. 2005-08-22 02:39:05 +00:00
Daniel Stenberg
710ee3b0e0 Norbert Novotny had problems with FTPS and he helped me work out a patch
that made curl run fine in his end. The key was to make sure we do the
SSL/TLS negotiation immediately after the TCP connect is done and not after
a few other commands have been sent like we did previously. I don't consider
this change necessary to obey the standards, I think this server is pickier
than what the specs allow it to be, but I can't see how this modified
libcurl code can add any problems to those who are interpreting the
standards more liberally.
2005-08-19 14:41:09 +00:00
Gunter Knauf
2a94387fc3 minor Makefile fixes. 2005-08-18 16:39:29 +00:00
Daniel Stenberg
90e1a6905a remove the typecast to long from time_t, since we now store it as curl_off_t 2005-08-17 09:11:27 +00:00
Daniel Stenberg
a676c18502 - Jeff Pohlmeyer found out that if you ask libcurl to load a cookiefile (with
CURLOPT_COOKIEFILE), add a cookie (with CURLOPT_COOKIELIST), tell it to
  write the result to a given cookie jar and then never actually call
  curl_easy_perform() - the given file(s) to read was never read but the
  output file was written and thus it caused a "funny" result.

- While doing some tests for the bug above, I noticed that Firefox generates
  large numbers (for the expire time) in the cookies.txt file and libcurl
  didn't treat them properly. Now it does.
2005-08-17 08:55:43 +00:00
Gunter Knauf
362912ff83 added curl_mvsnprintf to the export list; I appened to the end cause of the numbering ... 2005-08-16 20:12:58 +00:00
Gunter Knauf
46ff13f243 added curl_mvsnprintf to the export list. 2005-08-16 20:11:25 +00:00
Daniel Stenberg
35110eca73 James Bursa identified a libcurl HTTP bug and a good way to repeat it. If a
site responds with bad HTTP response that doesn't contain any header at all,
only a response body, and the write callback returns 0 to abort the
transfer, it didn't have any real effect but the write callback would be
called once more anyway.
2005-08-13 21:28:46 +00:00
Daniel Stenberg
84c4d96e71 removed old debug left-over infof() call 2005-08-11 21:41:11 +00:00
Daniel Stenberg
6d14a80608 Added comment about strtoimax() 2005-08-11 20:42:02 +00:00
Daniel Stenberg
20b17d6b04 the debug callback was called with CURLINFO_TEXT with the data size one
too big
2005-08-10 22:57:14 +00:00
Gunter Knauf
0ae6ff9f72 some minor Makefile fixes for SSL. 2005-08-10 19:19:25 +00:00
Daniel Stenberg
6c157a404b Christopher R. Palmer fixed the offsets used for date parsings when the time
zone name of a daylight savings time was used. For example, PDT vs PDS. This
flaw was introduced with the new date parser (11 sep 2004 - 7.12.2).
Fortunately, no web server or cookie string etc should be using such time
zone names thus limiting the effect of this bug.
2005-08-09 21:59:31 +00:00
Daniel Stenberg
493d6033aa Jon Grubbs filed bug report #1249962 which identified a problem with NTLM on a
HTTP proxy if an FTP URL was given. libcurl now properly switches to pure HTTP
internally when an HTTP proxy is used, even for FTP URLs. The problem would
also occur with other multi-pass auth methods.
2005-08-07 22:59:06 +00:00
Daniel Stenberg
aeb04136f7 Don't prevent FTPS:// through a http proxy, as we cannot know if it works or
not!
2005-08-07 21:39:44 +00:00
Daniel Stenberg
e358a24a75 reset the numcookies counter too (I missed it in the previous commit) 2005-07-28 21:53:09 +00:00
Daniel Stenberg
ec3f269d1f now strdups the cookielist inpointer before passed on, as the cookie function
modifies it
2005-07-28 21:50:34 +00:00
Daniel Stenberg
1c388a52a5 curl standard indent/format 2005-07-28 21:49:58 +00:00
Daniel Stenberg
726b9e2240 If any of the options CURLOPT_HTTPGET, CURLOPT_POST and CURLOPT_HTTPPOST is
set to 1, CURLOPT_NOBODY will now automatically be set to 0.
2005-07-27 22:29:50 +00:00
Daniel Stenberg
2236ba0d20 Peteris Krumins added CURLOPT_COOKIELIST and CURLINFO_COOKIELIST, which is a
simple interface to extracting and setting cookies in libcurl's internal
"cookie jar". See the new cookie_interface.c example code.
2005-07-27 22:17:14 +00:00
Daniel Stenberg
463c0f7096 disabling HTTP should also nullify this function call 2005-07-27 21:44:43 +00:00
Dan Fandrich
6e87cf5b30 Fixed some typos in output messages. 2005-07-21 22:18:35 +00:00
Daniel Stenberg
4922904991 Simplified the code within curl_easy_perform() that calls Curl_perform().
Pointed out by Bjorn Reese.
2005-07-17 12:44:11 +00:00
Daniel Stenberg
16bbd13af7 Diego Casorran patches to make (lib)curl build fine on Amiga again 2005-07-13 18:06:40 +00:00
Daniel Stenberg
465e19dbe9 Adrian Schuur added trailer support in the chunked encoding stream. The
trailer is then sent to the normal header callback/stream.
2005-07-12 18:15:34 +00:00
Daniel Stenberg
c3a826fdce correction for the 407 with response-body case 2005-07-05 22:07:34 +00:00
Gisle Vanem
c5d6a42abf Update copyright. 2005-07-05 18:07:55 +00:00
Daniel Stenberg
d49c144297 Gisle Vanem came up with a nice little work-around for bug #1230118. It
seems the Windows (MSVC) libc time functions may return data one hour off if
TZ is not set and automatic DST adjustment is enabled. This made
curl_getdate() return wrong value, and it also concerned internal cookie
expirations etc.
2005-07-05 14:57:41 +00:00
Daniel Stenberg
20005a83d2 Andrew Bushnell provided enough info for me to tell that we badly needed to
fix the CONNECT authentication code with multi-pass auth methods (such as
NTLM) as it didn't previously properly ignore response-bodies - in fact it
stopped reading after all response headers had been received. This could
lead to libcurl sending the next request and reading the body from the first
request as response to the second request. (I also renamed the function,
which wasn't strictly necessary but...)

The best fix would to once and for all make the CONNECT code use the
ordinary request sending/receiving code, treating it as any ordinary request
instead of the special-purpose function we have now. It should make it
better for multi-interface too. And possibly lead to less code...

Added test case 265 for this. It doesn't work as a _really_ good test case
since the test proxy is too stupid, but the test case helps when running the
debugger to verify.
2005-07-03 22:25:15 +00:00
Daniel Stenberg
701de67b79 use %p to printf pointers since %x doesn't work properly on tru64 for this
(and besides, we should be using the same %-code for all pointers)
2005-06-30 13:30:23 +00:00
Daniel Stenberg
883479f01e enable memory debugging on tru64 with ipv6 support by doing a little different
defining, since the system headers themselves redefine getaddrinfo
2005-06-30 13:28:58 +00:00
Daniel Stenberg
3b60bb7259 David Shaw's fix that unifies proxy string treatment so that a proxy given
with CURLOPT_PROXY can use a http:// prefix and user + password. The user
and password fields are now also URL decoded properly.

Test case 264 added to verify.
2005-06-22 22:24:10 +00:00
Gisle Vanem
bb0aba34fa Ensure thread handle is closed too. 2005-06-14 14:47:21 +00:00
Daniel Stenberg
300b4a9158 Todd Kulesza reported a flaw in the proxy option, since a numerical IPv6
address was not possible to use. It is now, but requires it written
RFC2732-style, within brackets - which incidently is how you enter numerical
IPv6 addresses in URLs. Test case 263 added to verify.
2005-05-31 13:03:26 +00:00
Daniel Stenberg
a7846189cd Eric Cooper reported about a problem with HTTP servers that responds with
binary zeroes within the headers. They confused libcurl to do wrong so the
downloaded headers become incomplete. The fix is now verified with test case
262.
2005-05-29 22:30:48 +00:00
Daniel Stenberg
4762995d1f avoid the sensitive word as it looks bad in some people's eyes 2005-05-27 11:39:07 +00:00
Daniel Stenberg
d1235ff058 provide the proper copyright texts for these 2005-05-26 20:56:25 +00:00
Daniel Stenberg
e7012a515c Now allow TYPE responses to be any 2xx code, and log if it isn't 200. 2005-05-24 09:39:56 +00:00
Daniel Stenberg
eff36caea8 additional fix for the malformed URL fix of yday 2005-05-19 07:21:18 +00:00
Daniel Stenberg
4a091bbd8a Bug report #1204435 identified a problem with malformed URLs like
"http://somehost?data" as it added a slash too much in the request ("GET
/?data/"...). Added test case 260 to verify.
2005-05-18 20:01:01 +00:00
Daniel Stenberg
dd7b6aef39 The configure check for strerror_r() failed to detect the proper API at
times, like on my HP-UX 10.20 tests. And then lib/strerror.c badly assumed
the glibc version if the posix define wasn't set (since it _had_ found a
strerror_r).
2005-05-18 13:24:23 +00:00
Daniel Stenberg
ede9fb4fcc check if getsockname() returns failure before using the address it provides 2005-05-17 09:18:17 +00:00
Daniel Stenberg
723aef71e8 reduced typecasts, from two to one 2005-05-17 09:15:21 +00:00
Daniel Stenberg
944af98be6 fix warning about redefined symbol 2005-05-14 21:15:36 +00:00
Gisle Vanem
95fe8372e8 Updated generated dependencies. 2005-05-14 06:04:21 +00:00
Gisle Vanem
ecdcb0ef67 Some patches for (a stricter/smarter) gcc 4.0 and
warnings like:
  'x' may be used uninitialized in this function.
2005-05-14 06:00:40 +00:00
Gisle Vanem
6a04a03eb5 'ssize_t' seems to be a gcc 4.x built-in. 2005-05-14 05:59:26 +00:00
Gisle Vanem
0c96056a94 Change for systems with >1 ways of setting (non-)blocking
mode. (djgpp/Watt-32 has 3 ways). Should rewrite this using
"#elif ..", but maybe there is still broken cpp around?
2005-05-14 05:58:52 +00:00
Daniel Stenberg
3f23e8443e oops, found by bug reported in bug report #1200661 2005-05-12 13:44:25 +00:00
Daniel Stenberg
a00f9b093c spell 2005-05-12 12:53:02 +00:00
Daniel Stenberg
5f538ce3f8 typecast to fix warning on 64bit systems 2005-05-12 08:51:30 +00:00
Daniel Stenberg
5d9fc28fa7 Modified the default HTTP headers used by libcurl:
A) Normal non-proxy HTTP:

 - no more "Pragma: no-cache" (this only makes sense to proxies)

B) Non-CONNECT HTTP request over proxy:

 - "Pragma: no-cache" is used (like before)
 - "Proxy-Connection: Keep-alive" (for older style 1.0-proxies)

C) CONNECT HTTP request over proxy:

 - "Host: [name]:[port]"
 - "Proxy-Connection: Keep-alive"
2005-05-11 09:52:59 +00:00
Daniel Stenberg
a90e33ad71 Hm, this doesn't feel right. The error bits returned from Curl_select() can
be returned at times when we want to ignore them. Test case 160 fails on Linux,
so I modify the comparison to check for _only_ the error bit set...
2005-05-10 23:02:37 +00:00
Daniel Stenberg
62ab21ce7d me stupid, errno is not set for mere select()-exceptions 2005-05-10 22:48:26 +00:00
Daniel Stenberg
cc8e8db1e5 include protos to fix warnings 2005-05-10 22:46:24 +00:00
Daniel Stenberg
b19cba2016 If Curl_select() returns with the error bit set, bail out. 2005-05-10 22:44:08 +00:00
Daniel Stenberg
708ed6fded silence compiler warnings 2005-05-08 22:45:01 +00:00
Daniel Stenberg
5c30fa50d6 fix warnings about unused variables for non-debug builds 2005-05-07 20:41:16 +00:00
Daniel Stenberg
fc33c424d9 fix 2005-05-07 20:28:39 +00:00
Daniel Stenberg
9c5f79c56a DEBUGF() is a new conveniant macro to add infof() calls (or similar) for
debug builds only. Made the ftp code use it on several places.
2005-05-07 13:57:07 +00:00
Daniel Stenberg
274842ec41 use calloc instead of malloc to save a call to memset() 2005-05-05 06:04:00 +00:00
Daniel Stenberg
2179e6e797 prevent memory leak when built SSL disabled 2005-05-04 14:52:51 +00:00
Daniel Stenberg
44985e8884 improved failf() error messages 2005-05-02 22:53:55 +00:00
Daniel Stenberg
11bdba0007 corrected copyright year 2005-05-02 14:33:07 +00:00
Daniel Stenberg
a31ddd363b Now configure checks for struct sockaddr_storage and the ftp code tries
to survive without it if not found. AIX 4.3 targetted adjustment.
2005-05-02 11:56:15 +00:00
Daniel Stenberg
41e6292e7b there cannot be chunked problem when no_body (HEAD) is true since without
body there is nothing chunked-encoded!
2005-04-30 23:07:38 +00:00
Daniel Stenberg
ae1d6f29d9 singleipconnect() returns a socket descriptor, not a CURLcode (but perhaps
we should make it do that...)
2005-04-30 15:16:39 +00:00
Daniel Stenberg
6b1220b61d Cory Nelson's work on nuking compiler warnings when building on x64 with
VS2005.
2005-04-26 13:08:49 +00:00
Daniel Stenberg
9d7330d879 Since Windows doesn't have/use the POSIX prototype for send() and recv(), we
typecast the third argument in the macros to avoid compiler warnings.
2005-04-26 13:08:18 +00:00
Daniel Stenberg
26a5954fa0 adding a bunch of comments for each #endif 2005-04-26 10:55:52 +00:00
Daniel Stenberg
01165e08e0 Fred New reported a bug where we used Basic auth and user name and password in
.netrc, and when following a Location: the subsequent requests didn't properly
use the auth as found in the netrc file. Added test case 257 to verify my fix.
2005-04-25 21:39:48 +00:00
Daniel Stenberg
a8ff0a21bf Based on feedback from Cory Nelson, I added some preprocessor magic in
*/setup.h and */config-win32.h to build fine with VS2005 on x64.
2005-04-24 22:25:04 +00:00
Daniel Stenberg
200ac588cc Dave Dribin: set CURL_STATICLIB when it builds static library variants. 2005-04-22 21:16:22 +00:00
Daniel Stenberg
543fbe14ee Fixed the CN extraction 2005-04-22 20:56:26 +00:00
Daniel Stenberg
76c7c694c5 modified this year 2005-04-22 20:48:07 +00:00
Gunter Knauf
8f6c2f87c8 changes for building with IPV6 and LDAP. 2005-04-20 23:41:25 +00:00
Daniel Stenberg
f30e8b11eb prevent compiler warning 2005-04-19 23:38:57 +00:00
Daniel Stenberg
8bd6d6a4de added typecast when converting from long to unsigned short, to prevent compiler warning 2005-04-19 23:37:45 +00:00
Daniel Stenberg
5f0366c2cb only define _REENTRANT if not already defined, and only in setup.h 2005-04-19 23:19:23 +00:00
Daniel Stenberg
63d109f7be Olivier reported that even though he used CURLOPT_PORT, libcurl clearly still
used the default port. He was right. I fixed the problem and added the test
cases 521, 522 and 523 to verify the fix.
2005-04-18 19:41:04 +00:00
Daniel Stenberg
c904b6b5bf Toshiyuki Maezawa reported that when doing a POST with a read callback,
libcurl didn't properly send an Expect: 100-continue header. It does now.
2005-04-18 17:14:58 +00:00
Daniel Stenberg
e9d068b913 oops, only negative numbers are errors 2005-04-13 21:17:05 +00:00
Daniel Stenberg
316adac511 don't bail out just because the ca file has a problem, it might be OK 2005-04-13 12:38:01 +00:00
Daniel Stenberg
4e26b2a65b fix compiler warning 2005-04-13 06:52:03 +00:00
Daniel Stenberg
c13a3d7b84 Provides an unconditional strlcat() proto even if strlcat() was found by
configure. An attempt to fix warnings when we build and the strlcat() function
is provided by one if the libs (gss or krb4) since then we have no protos
for it in a system header.
2005-04-12 07:56:57 +00:00
Daniel Stenberg
f09e479fd6 Blah, revert my removal of the extra check since the problem is there for real.
Archived thread of the help-gnutls mailing list regarding this problem:

http://lists.gnu.org/archive/html/help-gnutls/2005-04/msg00000.html

(and I _am_ sorry for my confused behaviour on this problem.)
2005-04-09 22:33:14 +00:00
Daniel Stenberg
80fe93bc33 OK, I must've been halucinating or something because I no longer see the
bug I thought I saw before when I changed this...!
2005-04-09 21:38:14 +00:00
Daniel Stenberg
fb3c85ab2f fixed the 304 response-with-content-length problem reported by Cory Nelson 2005-04-08 16:59:13 +00:00
Daniel Stenberg
2fc70e2c5d re-arrange some code to prevent warnings on unreachable code 2005-04-08 09:25:48 +00:00
Marty Kuhrt
37a547842b cast the call to Curl_inet_ntop for DECC compiler squawk 2005-04-08 05:01:40 +00:00
Daniel Stenberg
b9f1d43921 Unfortunately, if a ca file name is set the function fails for whatever reason
(missing file, bad file, etc), gnutls will no longer handshake properly but it
just loops forever. Therefore, we must return error if we get an error when
setting the CA cert file name. This is not the same behaviour as with OpenSSL.

Question/report posted to the help-gnutls mailing list, April 8 2005.
2005-04-07 22:47:43 +00:00
Daniel Stenberg
bec6423c02 one down 2005-04-07 22:14:22 +00:00
Daniel Stenberg
14d9b56937 cut 'n paste error 2005-04-07 21:12:09 +00:00
Daniel Stenberg
1c3766eb46 GnuTLS updates 2005-04-07 21:10:31 +00:00
Daniel Stenberg
2085f133d6 added new files 2005-04-07 20:56:04 +00:00
Daniel Stenberg
2a045dfceb fixed to build after the GnuTLS fixes 2005-04-07 20:36:48 +00:00
Daniel Stenberg
6e61939382 GnuTLS support added. There's now a "generic" SSL layer that we use all over
internally, with code provided by sslgen.c. All SSL-layer-specific code is
then written in ssluse.c (for OpenSSL) and gtls.c (for GnuTLS).

As far as possible, internals should not need to know what SSL layer that is
in use. Building with GnuTLS currently makes two test cases fail.

TODO.gnutls contains a few known outstanding issues for the GnuTLS support.

GnuTLS support is enabled with configure --with-gnutls
2005-04-07 15:27:13 +00:00
Daniel Stenberg
758d9fe852 too late hacking error 2005-04-05 21:14:59 +00:00
Daniel Stenberg
ee44eec3e1 Christophe Legry's fix to grok time-conditoned uploads 2005-04-05 20:59:12 +00:00
Daniel Stenberg
9b3c2b6ae2 kill warnings 2005-04-04 21:23:04 +00:00
Daniel Stenberg
833b6df969 Marcelo Juchem's improvements 2005-04-04 13:21:03 +00:00
Gisle Vanem
0b45431139 hostthre.c: destroy_thread_data() made public. Called
from url.c: Curl_disconnect().
2005-04-04 12:30:03 +00:00
Daniel Stenberg
74816fed6c Hardeep Singh reported a problem doing HTTP POST with Digest. (It was actually
also affecting NTLM and Negotiate.) It turned out that if the server responded
with 100 Continue before the initial 401 response, libcurl didn't take care of
the response properly. Test case 245 and 246 added to verify this.
2005-04-03 22:46:25 +00:00
Daniel Stenberg
f96fadc074 fixed bad comment, pointed out by Marcelo Juchem 2005-03-31 20:34:24 +00:00
Daniel Stenberg
ab4086bc24 Updated the copyright year since changes have been this year. 2005-03-31 07:02:02 +00:00
Daniel Stenberg
158588640a Don't close the connection if we're in a known negotiation mode and we won't
send any data anyway. Probably the bug Tom Moers noticed.
2005-03-29 12:28:25 +00:00
Daniel Stenberg
371ef80dc3 When doing FTP-SSL, advance to the next state properly when the response to
AUTH has been received successfully.
2005-03-29 11:43:02 +00:00
Daniel Stenberg
84b4e9ff7c Fixed the FTP response reader function to properly deal with responses split
up in several chunks when read.
2005-03-29 11:35:25 +00:00
Daniel Stenberg
8a076d1dba Based on Augustus Saunders' comments and findings, the HTTP output auth
function was fixed to use the proper proxy authentication when multiple ones
were added as accepted. test 239 and test 243 were added to repeat the
problems and verify the fixes.
2005-03-28 22:19:31 +00:00
Dan Fandrich
6c6dda1b74 Fixed typo. 2005-03-22 01:24:27 +00:00
Daniel Stenberg
8817779f23 Modified the VALID_SOCK() macro to become VERIFY_SOCK() instead. It is slighly
more involved, but should hopefully not generate any compiler warnings on
win32 systems (that can't check the socket based on the numeric).
2005-03-21 22:34:07 +00:00
Daniel Stenberg
c85a77e0b1 removed a (fairly useless) debug output just to compile without warning 2005-03-20 12:46:11 +00:00
Daniel Stenberg
38f07ce0fb fix compiler warning 2005-03-19 00:44:55 +00:00
Daniel Stenberg
5840c8cb70 fix by Kyrre Kristiansen 2005-03-18 10:16:49 +00:00
Dan Fandrich
38f797ccd6 Use the proper macro to do uClibc detection. 2005-03-17 20:32:59 +00:00
Daniel Stenberg
553c5a7501 include inet_pton.h 2005-03-17 19:12:15 +00:00
Daniel Stenberg
8b80ac2877 use Curl_inet_pton(), not inet_pton(). 2005-03-17 07:40:15 +00:00
Dan Fandrich
f5cdac38bd Removed references to config-vms.h from the makefiles. 2005-03-16 23:09:39 +00:00
Dan Fandrich
760565dcad Removed old VMS config files (on behalf of Marty Kuhrt). The VMS build
scripts use the version in packages/vms/
2005-03-16 22:27:05 +00:00
Daniel Stenberg
61133545f6 - Tru64 and some IRIX boxes seem to not like test 237 as it is. Their
inet_addr() functions seems to use &255 on all numericals in a ipv4 dotted
  address which makes a different failure... Now I've modified the ipv4
  resolve code to use inet_pton() instead in an attempt to make these systems
  better detect this as a bad IP address rather than creating a toally bogus
  address that is then passed on and used.
2005-03-16 22:01:39 +00:00
Dan Fandrich
bf87d13f5b Fixed some compiler warnings I should have noticed before. 2005-03-16 02:25:12 +00:00
Dan Fandrich
efaf688650 Fixed ftp support with uClibc due to differing inet_ntoa_r() behaviour. 2005-03-15 21:00:46 +00:00
Daniel Stenberg
a357f77c4c nonsense change for(;;) => while(1) just to prevent gcc from warning on
never executed code when -Wunreachable-code is used
2005-03-15 07:48:45 +00:00
Daniel Stenberg
d5bdd2b2f9 prevent compiler warning 2005-03-15 07:47:59 +00:00
Daniel Stenberg
ec4e653c6f hushing up more warnings 2005-03-14 15:51:10 +00:00
Daniel Stenberg
3916d1e6cb silence compiler warnings for mingw win32 builds --enable-debug 2005-03-14 15:43:23 +00:00
Gisle Vanem
76c24a0d82 Avoid "unused variable" warnings. 2005-03-14 09:37:08 +00:00
Daniel Stenberg
de8947f92f security.h is removed 2005-03-14 07:46:42 +00:00
Daniel Stenberg
34865ffb4a include security.h with lowercase s to work on cross-compiled mingw 2005-03-14 00:01:30 +00:00
Daniel Stenberg
62970da675 Removed security.h since it shadows an include file mingw needs when building
for SSPI support. The contents of the file has been moved into the krb4.h file.
2005-03-14 00:00:45 +00:00
Gisle Vanem
88a4dc2795 Swap <security.h> and <sspi.h> (needed for MingW). 2005-03-12 17:31:15 +00:00
Daniel Stenberg
84bc23b92f curl_version_info() returns the feature bit CURL_VERSION_SSPI 2005-03-11 15:10:36 +00:00
Dan Fandrich
fb9ae9d0e2 Fixed some compiler warnings. 2005-03-11 05:49:04 +00:00
Dan Fandrich
205f8b266c Fixed LDAP library file name bug (KNOWN_BUGS #1). configure now auto-detects
the correct dynamic library names by default, and provides override switches
--with-ldap-lib, --with-lber-lib and --without-lber-lib.  Added
CURL_DISABLE_LDAP to platform-specific config files to disable LDAP
support on those platforms that probably don't have dynamic OpenLDAP
libraries available to avoid compile errors.
2005-03-11 05:28:07 +00:00
Daniel Stenberg
d1d35ba85f Christopher R. Palmer made it possible to build libcurl with the
USE_WINDOWS_SSPI on Windows, and then libcurl will be built to use the native
way to do NTLM. SSPI also allows libcurl to pass on the current user and its
password in the request.
2005-03-10 23:15:29 +00:00
Daniel Stenberg
0472629222 As reported by 'nodak sodak' we should check for a NULL pointer before
referencing the proxy name pointer.
2005-03-09 22:13:52 +00:00
Daniel Stenberg
b7ffc6bb45 remove old printf() debug leftover 2005-03-08 22:21:59 +00:00
Daniel Stenberg
8a96aec567 mktime() returns a time_t. time_t is often 32 bits, even on many architectures
that feature 64 bit 'long'.

Some systems have 64 bit time_t and deal with years beyond 2038. However, even
some of the systems with 64 bit time_t returns -1 for dates beyond 03:14:07
UTC, January 19, 2038. (Such as AIX 5100-06)
2005-03-08 16:31:56 +00:00
Daniel Stenberg
702664e959 Dominick Meglio reported that using CURLOPT_FILETIME when transferring a FTP
file got a Last-Modified: header written to the data stream, corrupting the
actual data. This was because some conditions from the previous FTP code was
not properly brought into the new FTP code. I fixed and I added test case 520
to verify. (This bug was introduced in 7.13.1)
2005-03-08 08:09:14 +00:00
Daniel Stenberg
aa47ac4c06 Added test case 235 that makes a resumed upload of a file that isn't present
on the remote side. This then converts the operation to an ordinary STOR
upload. This was requested/pointed out by Ignacio Vazquez-Abrams.

It also proved (and I fixed) a bug in the newly rewritten ftp code (and
present in the 7.13.1 release) when trying to resume an upload and the servers
returns an error to the SIZE command. libcurl then loops and sends SIZE
commands infinitely.
2005-03-04 23:52:06 +00:00
Dan Fandrich
b01151e81c Reduced the length of data read from the random entropy file. 2005-03-04 22:36:56 +00:00
Dan Fandrich
67bd6f9ccd Don't try to read the whole of the random file because when /dev/urandom is
used, it slows initialization too much reading an infinitely long file!
2005-03-04 20:10:29 +00:00
Daniel Stenberg
6f752c64bc Dave Dribin made it possible to set CURLOPT_COOKIEFILE to "" to activate
the cookie "engine" without having to provide an empty or non-existing file.
2005-03-04 00:26:50 +00:00
Daniel Stenberg
ccb7950c4c killed trailing whitespace 2005-03-04 00:24:52 +00:00
Daniel Stenberg
750e771376 killed trailing whitespace 2005-03-04 00:14:45 +00:00
Dan Fandrich
0ddab51ad8 Fix for a base64 decode heap buffer overflow vulnerability. 2005-02-28 23:54:17 +00:00
Dan Fandrich
9798432f56 Fixed some compiler warnings. Fixed a low incidence memory leak in the test server. 2005-02-24 18:54:23 +00:00
Daniel Stenberg
f8b4ba80e0 krb4 fixed 2005-02-22 12:20:30 +00:00
Daniel Stenberg
527f70e540 Curl_base64_decode() now returns an allocated buffer 2005-02-22 12:10:30 +00:00
Daniel Stenberg
19f66c7575 Thanks for the notification iDEFENCE. We are the "initial vendor" and we sure
got no notification, no mail, no nothing.

You didn't even bother to mail us when you went public with this. Cool.

NTLM buffer overflow fix, as reported here:

http://www.securityfocus.com/archive/1/391042
2005-02-22 07:44:14 +00:00
Daniel Stenberg
5ba188ab2d Ralph Mitchell reported a flaw when you used a proxy with auth, and you
requested data from a host and then followed a redirect to another
host. libcurl then didn't use the proxy-auth properly in the second request,
due to the host-only check for original host name wrongly being extended to
the proxy auth as well. Added test case 233 to verify the flaw and that the
fix removed the problem.
2005-02-18 23:53:07 +00:00
Daniel Stenberg
176981b529 close the socket properly when returning error due to failing localbind
Bug report #1124588 by David
2005-02-17 14:45:03 +00:00
Daniel Stenberg
ac022b2e30 Christopher R. Palmer reported a problem with HTTP-POSTing using "anyauth"
that picks NTLM. Thanks to David Byron letting me test NTLM against his
servers, I could quickly repeat and fix the problem. It turned out to be:

When libcurl POSTs without knowing/using an authentication and it gets back a
list of types from which it picks NTLM, it needs to either continue sending
its data if it keeps the connection alive, or not send the data but close the
connection. Then do the first step in the NTLM auth. libcurl didn't send the
data nor close the connection but simply read the response-body and then sent
the first negotiation step. Which then failed miserably of course. The fixed
version forces a connection if there is more than 2000 bytes left to send.
2005-02-16 14:31:23 +00:00
Daniel Stenberg
0a3065a2f2 Rename Curl_pretransfersec() to *_second_connect() since it does not just
do pretransfer stuff like Curl_pretransfer().
2005-02-14 09:30:40 +00:00
Daniel Stenberg
b98faaa8c0 Fixed bad krb4 code. It always tried to use krb4 if built enabled. 2005-02-11 22:50:57 +00:00
Daniel Stenberg
e7cefd684b Removed all uses of strftime() since it uses the localised version of the
week day names and month names and servers don't like that.
2005-02-11 00:03:49 +00:00
Daniel Stenberg
17d61e4f29 typecast assign to ftpport from int to prevent warnings 2005-02-10 07:45:26 +00:00
Daniel Stenberg
446b9467da init fix for non-SSL builds 2005-02-10 07:45:08 +00:00
Daniel Stenberg
8c83422fe2 David Byron identified the lack of SSL_pending() use, and this is my take
at fixing this issue.
2005-02-09 23:09:12 +00:00
Daniel Stenberg
61a1e3cd01 better error checking and SSL init by David Byron 2005-02-09 23:04:51 +00:00
Daniel Stenberg
89cac6f25c prevent a compiler warning 2005-02-09 22:47:57 +00:00
Gisle Vanem
32d76a5b57 Set 'bits.close' in case of malloc fail.
Don't free 'lud_dn' twice in case curl_unescape()
fails.
2005-02-09 14:28:35 +00:00
Gisle Vanem
f5394cccb1 Use CURL_SOCKET_BAD. 2005-02-09 14:01:15 +00:00
Gisle Vanem
64dd9c7656 Handle CURLE_LOGIN_DENIED in strerror.c.
For ftp only?
2005-02-09 13:59:40 +00:00
Daniel Stenberg
16ae0c6466 FD_SET can be big macro, use braces 2005-02-09 13:47:35 +00:00
Daniel Stenberg
6a2e21ec8c FTP code turned into state machine. Not completely yet, but a good start.
The tag 'before_ftp_statemachine' was set just before this commit in case
of future need.
2005-02-09 13:06:40 +00:00
Gisle Vanem
120f17ce04 Replace LF with CRLF. Ref RFC-2229, sec 2.3:
"Each command line must be terminated by a CRLF".
2005-02-09 11:50:41 +00:00
Daniel Stenberg
41def21f91 ares_gethostbyname wants a 'ares_host_callback' in the 4th argument 2005-02-08 19:03:27 +00:00
Gisle Vanem
d118312922 Curl_addrinfo?_callback() and addrinfo_callback() now returns
CURLE_OK or CURLE_OUT_OF_MEMORY.
Add typecast in hostares.c.
2005-02-08 12:36:13 +00:00
Gisle Vanem
82b93e4945 Don't free too much in freedirs() if realloc() fails. 2005-02-08 12:32:28 +00:00
Daniel Stenberg
e36fb1ecda Curl_wait_for_resolv() no longer disconnects on failure, but leaves that
operation to the caller. Disconnecting has the disadvantage that the conn
pointer gets completely invalidated and this is not handled on lots of places
in the code.
2005-02-08 07:36:57 +00:00
Dan Fandrich
e4a1788614 Fix for a bug report that compressed files that are exactly 64 KiB long
produce a zlib error.
2005-02-07 19:12:37 +00:00
Gisle Vanem
7b23eff9cf Preserve previous status in Curl_http_done(). 2005-02-06 12:43:40 +00:00
Daniel Stenberg
29350b363b Eric Vergnaud found a use of an uninitialized variable 2005-02-04 23:43:44 +00:00
Daniel Stenberg
83c470a443 David Byron pointed out that this -1 on the buffer size is pointless since
the buffer is already BUFSIZE +1 one big to fit the extra trailing zero. This
change is reported to fix David's weird SSL problem...
2005-02-04 13:42:41 +00:00
Daniel Stenberg
686d767053 if the DO operation returns failure, bail out and close down nicely to
prevent memory leakage
2005-01-30 22:54:06 +00:00
Daniel Stenberg
e6034ea299 Use calloc() to save us the memset() call and terminate conn->host.name
properly, to avoid reading uninited variables when using file:// (valgrind)
2005-01-30 12:42:15 +00:00
Daniel Stenberg
9a820d7a98 include "url.h" for the Curl_safefree() proto 2005-01-29 22:38:45 +00:00
Daniel Stenberg
8dbaf534c8 Using the multi interface, and doing a requsted a re-used connection that
gets closed just after the request has been sent failed and did not re-issue
a request on a fresh reconnect like the easy interface did. Now it does!
(define CURL_MULTIEASY, run test case 160)
2005-01-29 22:31:06 +00:00
Daniel Stenberg
91f483c591 Define CURL_MULTIEASY when building this, to use my new curl_easy_perform()
that uses the multi interface to run the request. It is a great testbed for
the multi interface and I believe we shall do it this way for real in the
future when we have a successor to curl_multi_fdset().
2005-01-29 22:26:38 +00:00
Daniel Stenberg
c4ff5eb0ca conn->ip_addr MUST NOT be used on re-used connections 2005-01-29 13:07:16 +00:00
Daniel Stenberg
59b45a90cc multi interface: when a request is denied due to "Maximum redirects followed"
libcurl leaked the last Location: URL.
2005-01-29 12:01:20 +00:00
Daniel Stenberg
f661475962 Connect failures with the multi interface was often returned as "connect()
timed out" even though the reason was different. Fixed this problem by not
setting this timeout to zero when using multi.
2005-01-28 23:21:24 +00:00
Daniel Stenberg
4551e7ce49 KNOWN_BUGS #17 fixed. A DNS cache entry may not remain locked between two
curl_easy_perform() invokes. It was previously unlocked at disconnect, which
could mean that it remained locked between multiple transfers. The DNS cache
may not live as long as the connection cache does, as they are separate.

To deal with the lack of DNS (host address) data availability in re-used
connections, libcurl now keeps a copy of the IP adress as a string, to be able
to show it even on subsequent requests on the same connection.
2005-01-28 22:14:48 +00:00
Daniel Stenberg
064bc3ecbc Stephen More pointed out that CURLOPT_FTPPORT and the -P option didn't work
when built ipv6-enabled. I've now made a fix for it. Writing test cases for
custom port strings turned too tricky so unfortunately there's none.
2005-01-28 08:26:36 +00:00
Daniel Stenberg
177dbc7be0 Ian Ford asked about support for the FTP command ACCT, and I discovered it is
present in RFC959... so now (lib)curl supports it as well. --ftp-account and
CURLOPT_FTP_ACCOUNT set the account string. (The server may ask for an account
string after PASS have been sent away. The client responds with "ACCT [account
string]".) Added test case 228 and 229 to verify the functionality. Updated
the test FTP server to support ACCT somewhat.
2005-01-25 22:13:12 +00:00
Daniel Stenberg
043d70fcdf Use plain structs and not typedef'ed ones in the hash and linked-list code. 2005-01-25 00:06:29 +00:00
Daniel Stenberg
7e42cb61f7 FTP third transfer support overhaul. See CHANGES for details. 2005-01-21 09:32:32 +00:00
Daniel Stenberg
3050ae57c0 Stephan Bergmann made libcurl return CURLE_URL_MALFORMAT if an FTP URL
contains %0a or %0d in the user, password or CWD parts. (A future fix would
include doing it for %00 as well - see KNOWN_BUGS for details.) Test case 225
and 226 were added to verify this
2005-01-19 21:56:02 +00:00
Gisle Vanem
06ad5be3af Don't copy 'stderr' for Win-CE in IPv6 code. Don't call
GetCurrentProcess() twice; use a local variable.
2005-01-19 10:20:55 +00:00
Daniel Stenberg
a0c8b9bc68 Stephan Bergmann pointed out two flaws in libcurl built with HTTP disabled:
1) the proxy environment variables are still read and used to set HTTP proxy

2) you couldn't disable http proxy with CURLOPT_PROXY (since the option was
   disabled)
2005-01-19 09:36:44 +00:00
Daniel Stenberg
b1080f7c9a Cody Jones' enhanced version of Samuel Daz Garca's MSVC makefile patch. 2005-01-18 10:17:34 +00:00
Daniel Stenberg
e0bea7d541 Alex aka WindEagle pointed out that when doing "curl -v dictionary.com", curl
assumed this used the DICT protocol. While guessing protocols will remain
fuzzy, I've now made sure that the host names must start with "[protocol]."
for them to be a valid guessable name. I also removed "https" as a prefix that
indicates HTTPS, since we hardly ever see any host names using that.
2005-01-16 08:51:52 +00:00
Gisle Vanem
f5b8a26d9a errrno can by freak accident become EINTR on DOS or
Windows (unrelated to select). select() can never set errno
to EINTR on Windows.
2005-01-15 09:26:07 +00:00
Daniel Stenberg
4d1f3d3cd0 Added README.hostip 2005-01-14 13:43:29 +00:00
Daniel Stenberg
0e26355348 Inspired by Martijn Koster's patch and example source at
http://www.greenhills.co.uk/mak/gentoo/curl-eintr-bug.c, I now made the
select() and poll() calls properly loop if they return -1 and errno is
EINTR. glibc docs for this is found here:
http://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html

This last link says BSD doesn't have this "effect". Will there be a problem
if we do this unconditionally?
S: ----------------------------------------------------------------------
2005-01-13 21:51:48 +00:00
Gisle Vanem
7c1bba315b Added '-bd' option; target is a DLL.
Added dependencies.
2005-01-12 15:32:26 +00:00
Daniel Stenberg
c5b2e85b47 Dan Torop cleaned up a few no longer used variables from David Phillips'
select() overhaul fix.
2005-01-11 20:22:44 +00:00
Daniel Stenberg
e3fa7d021e Renamed easy.h and multi.h to easyif.h and multiif.h to make sure they don't
shadow our public headers with the former names.
2005-01-11 15:25:29 +00:00
Gisle Vanem
a1813e2b2d ".\lib\easy.h" shadows for <curl/easy.h> in Watcom.
Force including ../include/curl/easy.h.
2005-01-11 14:59:24 +00:00
Gisle Vanem
bb9e5565f2 ".\lib\multi.h" shadows for <curl/multi.h> in Watcom.
Force including ../include/curl/multi.h.
2005-01-11 14:32:09 +00:00
Daniel Stenberg
29102befa6 Cyrill Osterwalder posted a detailed analysis about a bug that occurs when
using a custom Host: header and curl fails to send a request on a re-used
persistent connection and thus creates a new connection and resends it. It
then sent two Host: headers. Cyrill's analysis was posted here:
http://curl.haxx.se/mail/archive-2005-01/0022.html
2005-01-11 14:00:45 +00:00
Daniel Stenberg
9d1145598a Bruce Mitchener identified (bug report #1099640) the never-ending SOCKS5
problem with the version byte and the check for bad versions. Bruce has lots
of clues on this, and based on his suggestion I've now removed the check of
that byte since it seems to be able to contain 1 or 5.
2005-01-10 23:32:14 +00:00
Daniel Stenberg
065e466f1a Use Curl_easy_addmulti() to clear associations from easy handles to multi
handles. Include multi.h to get proto.
2005-01-10 11:42:20 +00:00
Daniel Stenberg
21bb852750 Pavel Orehov reported memory problems with the multi interface in bug report
#1098843. In short, a shared DNS cache was setup for a multi handle and when
the shared cache was deleted before the individual easy handles, the latter
cleanups caused read/writes to already freed memory.
2005-01-10 10:07:07 +00:00
Daniel Stenberg
83bab78bda Hzhijun reported a memory leak in the SSL certificate code, that leaked the
remote certificate name when it didn't match the used host name.
2005-01-10 09:48:39 +00:00
Gisle Vanem
9fd33c0b96 New file. 2005-01-08 16:06:37 +00:00
Gisle Vanem
3c09f2d2bd Added Makefile.Watcom to EXTRA_DIST. 2005-01-08 16:03:45 +00:00
Gisle Vanem
316e74be74 Removed _WIN32_WINNT to support IPv6 under Win-2K. 2005-01-04 16:00:14 +00:00
Daniel Stenberg
ad9648a215 reverted the bad naming of the implib names 2005-01-02 21:15:29 +00:00
Daniel Stenberg
1576f3319e Alex Neblett's minor update 2005-01-02 19:19:32 +00:00
Daniel Stenberg
67abd4cd47 Rune Kleveland fixed a minor memory leak for received cookies with the (rare)
version attribute set.
2004-12-22 22:33:31 +00:00
Daniel Stenberg
58f4af7973 Marcin Konicki provided two configure fixes and a source fix to make curl
build out-of-the-box on BeOS.
2004-12-22 22:28:10 +00:00
Dan Fandrich
99befd3a15 C ensures that static variables are initialized to 0 2004-12-22 20:12:15 +00:00
Daniel Stenberg
444f6427b8 oops, variables first then code 2004-12-21 14:33:37 +00:00
Daniel Stenberg
a173e07eec Prevent failf() from using the va_list variable more than once.
See bug report #1088962 and  Single Unix Specification:
http://www.opengroup.org/onlinepubs/007908799/xsh/vfprintf.html
2004-12-21 14:22:10 +00:00
Daniel Stenberg
f4c5314890 include sys/types.h before sys/select.h 2004-12-21 10:11:07 +00:00
Dan Fandrich
80d301257c Make some more arrays of pointers const. 2004-12-20 18:23:43 +00:00
Gisle Vanem
13ee90bbd4 OpenSSL updates; get CA_BUNDLE from env. Assume no
Kerberos, have <pkcs12.h>, <engine.h> and built-in engines.
2004-12-19 11:52:31 +00:00
Gisle Vanem
754d6c3abd Remove 'data' initialiser. 2004-12-19 11:39:34 +00:00
Daniel Stenberg
3d647b9a98 if the pkcs12.h header exists, include it already in urldata.h to work around
a precedence problem with the zlib header. See CHANGES for details.
2004-12-19 09:37:32 +00:00
Daniel Stenberg
8ad47a13e5 Samuel Listopad added support for PKCS12 formatted certificates. 2004-12-18 10:42:48 +00:00
Dan Fandrich
a07dcfd850 Renamed a variable to avoid conflict with a C++ reserved word. 2004-12-17 20:18:53 +00:00
Gisle Vanem
321511a5be Watcom has strtoll(). 2004-12-17 19:57:50 +00:00
Gisle Vanem
c5297b9fd9 Watcom uses 'i64' suffix. 2004-12-17 18:33:09 +00:00
Gisle Vanem
7e00076586 <windows.h> required for Watcom. 2004-12-17 18:32:41 +00:00
Gisle Vanem
41e776f9db Fix calling convention of wlap32.dll function. Watcom
uses fastcall by default, so force cdecl.
2004-12-17 17:54:21 +00:00
Gisle Vanem
5c2d4a6bdd Watcom has 'struct timeval'. 2004-12-17 17:49:10 +00:00
Gisle Vanem
5e2e87cc8d getdate.c is gone. 2004-12-17 12:28:04 +00:00
Gisle Vanem
b1bdba7db5 Print true netrc name (.netrc/_netrc). 2004-12-17 12:26:18 +00:00
Daniel Stenberg
e3d342df96 avoid an extra malloc 2004-12-17 10:09:32 +00:00
Daniel Stenberg
ccf65be0a4 fixed minor memory leak when running out of memory 2004-12-17 09:00:19 +00:00
Daniel Stenberg
7dfef13224 oops, add missing return keyword 2004-12-17 08:58:48 +00:00
Daniel Stenberg
6e1e9caa32 Based on Gisle Vanem's patch: make sure the directory re-use works even when
a URL-encoded path is used.
2004-12-16 22:20:33 +00:00
Gisle Vanem
f71725de6e Must include <io.h> and <sys/stat.h> before redefining
stat(), fstat() and lseek().
2004-12-16 21:27:29 +00:00
Dan Fandrich
26fe6da93b Renamed a struct member to avoid conflict with a C++ reserved word. 2004-12-16 21:27:23 +00:00
Daniel Stenberg
8d4ac69175 reduced the number of sub-blocks 2004-12-16 18:18:23 +00:00
Daniel Stenberg
4f5a6a33b4 moved the lseek() and stat() magic defines to setup.h and now take advantage
of struct_stat in formdata.c as well, to support formpost uploads of large
files on Windows too
2004-12-16 18:09:27 +00:00
Daniel Stenberg
494c40fd98 NULL the fp pointer after it has been fclosed() 2004-12-16 13:55:19 +00:00
Daniel Stenberg
d3b414724b Dinar in bug report #1086121, found a file handle leak when a multipart
formpost (including a file upload part) was aborted before the whole file was
sent.
2004-12-16 09:52:36 +00:00
Daniel Stenberg
95b84adb9b precaution to prevent double typedefs of the bool 2004-12-15 14:05:07 +00:00
Dan Fandrich
a28b32aa45 Make some arrays of pointers const, too. 2004-12-15 02:32:04 +00:00
Dan Fandrich
1ba47e7af9 Add 'const' to immutable arrays. 2004-12-15 01:38:25 +00:00
Daniel Stenberg
553082e24a prevent compiler warning when built without engine support 2004-12-14 22:06:25 +00:00
Daniel Stenberg
0d0d5e7ee3 Harshal Pradhan fixed changing username/password on a persitent HTTP
connection.
2004-12-14 21:22:51 +00:00
Dan Fandrich
f23d923fd3 Only declare static variables if they're needed. Fixed some compile warnings. 2004-12-14 20:44:36 +00:00
Dan Fandrich
10d6d8b2ae Header files are in openssl/ only if USE_OPENSSL is set. 2004-12-14 20:25:23 +00:00
Dan Fandrich
358e08b95d Removed fputc() prototype since it's already in stdio.h 2004-12-14 20:17:58 +00:00
Gisle Vanem
7d3f5d7ac1 urldata.h: Removed engine_list.
ssluse.*: Added SSL_strerror(). Curl_SSL_engines_list() now returns a slist
which must be freed by caller.
2004-12-14 14:20:21 +00:00
Daniel Stenberg
07f107ae20 Moved the engine stuff from the root-level of the SessionHandle struct to the
UrlState sub-struct. Also made the engine_list exist for non-ssl builds to
make curl build.
2004-12-14 09:36:22 +00:00
Gisle Vanem
1dc15ec1bc Set 'data->state.os_errno = error' in some places.
Needed elsewhere too?
2004-12-13 17:52:55 +00:00
Gisle Vanem
bdb0620529 Added handling of CURLINFO_SSL_ENGINES;
Added Curl_SSL_engines_list(), cleanup SSL in url.c
(no HAVE_OPENSSL_x etc.).
2004-12-13 16:43:00 +00:00
Gisle Vanem
be9ea07e87 Handle new type CURLINFO_SLIST.
Handle new info list CURLINFO_SSL_ENGINES.
2004-12-13 16:37:27 +00:00
Daniel Stenberg
344c6a3725 Gisle's fix for resuming large file:// files on windows - slightly edited
by me.
2004-12-13 10:25:26 +00:00
Daniel Stenberg
fec571f5b0 modified to use the current error code name, not the obsolete one 2004-12-11 22:18:11 +00:00
Daniel Stenberg
1b8ac7c6b5 provide an error string when resuming fails - and use the proper error code,
not the former one
2004-12-11 18:55:51 +00:00
Daniel Stenberg
bd2db87237 fixed error message 2004-12-11 18:55:23 +00:00
Daniel Stenberg
df3ca59116 Dan Fandrich:
Here's a stab at a consolidation of the SSL detection heuristics into
configure. Source files aren't changed by this patch, except for setup.h and
the various config*.h files.  Within the configure script, OPENSSL_ENABLED is
used to determine if SSL is being used or not, and outside configure,
USE_SSLEAY means the same thing; this could be even further unified some day.

Now, when SSL is not detected, configure skips the various checks that are
dependent on SSL, speeding up the configure process and avoiding complications
with cross compiles.  I also updated all the architecture- specific config
files I could see, but I couldn't test them.
2004-12-11 18:47:22 +00:00
Daniel Stenberg
357fdb60b6 Dan Fandrich: added some missing files. "I can't try them so they might still
be broken, but at least they'll be less broken than they are now."
2004-12-10 21:58:11 +00:00
Daniel Stenberg
8a4eb8ed45 move the port number extraction to after the extraction of user name/password,
as suggested by Kai Sommerfeld
2004-12-10 15:11:11 +00:00
Daniel Stenberg
c0c885a1f3 don't try the rewind if no http struct is allocated yet 2004-12-10 14:45:35 +00:00
Daniel Stenberg
1be1d3cfb8 Matt Veenstra updated to 7.12.3. Starting now, we'll update the version number
in this file automatically on releases using the maketgz script.
2004-12-08 23:09:23 +00:00
Daniel Stenberg
b970469df9 Matt Veenstra:
- removal of getdate.c
- Added hostares.c, hostasyn.c, hostip4.c, hostip6.c, hostsync.c,
hostthre.c, inet_ntop.c, nwlib.c, parsedate.c, sterror.c, strtoofft.c

I have tested the build on 10.3, and will build on 10.2.8 in the next days.
2004-12-08 23:02:55 +00:00
Daniel Stenberg
80a324386b Rene Bernhardt found and fixed a buffer overrun in the NTLM code, where
libcurl always and unconditionally overwrote a stack-based array with 3 zero
bytes. I edited the fix to make it less likely to occur again (and added
a comment explaining the reason to the buffer size).
2004-12-07 23:09:41 +00:00
Daniel Stenberg
c78ee11c41 CURLFTPSSL_ALL should make sure that the transfer fails if the data connection
isn't set to encrypted properly
2004-12-07 10:00:20 +00:00
Daniel Stenberg
4435e3b269 Fixed so that the final error message is sent to the verbose info "stream"
even if no errorbuffer is set.
2004-12-06 23:04:30 +00:00
Daniel Stenberg
b96a0dba90 Gisle Vanem's fix for better info messages when failing to connect using
the multi interface
2004-12-06 22:45:45 +00:00
Gisle Vanem
30dfc00a54 'crypto_engine' not used. 2004-12-06 16:36:50 +00:00
Gisle Vanem
fe5979cfdb Replace MINGW32 with built-in __MINGW32__. 2004-12-06 14:43:04 +00:00
Daniel Stenberg
ac269a8f68 Dan Fandrich added the --disable-cookies option to configure to build
libcurl without cookie support. This is mainly useful if you want to build a
minimalistic libcurl with no cookies support at all. Like for embedded
systems or similar.
2004-12-05 23:59:32 +00:00
Daniel Stenberg
35944744f8 Richard Atterer fixed libcurl's way of dealing with the EPSV
response. Previously, libcurl would re-resolve the host name with the new
port number and attempt to connect to that, while it should use the IP from
the control channel. This bug made it hard to EPSV from an FTP server with
multiple IP addresses!
2004-12-05 23:33:33 +00:00
Daniel Stenberg
2c27e4ee76 Bug report #1078066: when a chunked transfer was pre-maturely closed exactly
at a chunk boundary it was not considered an error and thus went unnoticed.
Added test case 207 to verify.
2004-12-03 09:31:25 +00:00
Daniel Stenberg
6ac9e67bd7 made the intended one hour default timeout in the CONNECT loop actually work 2004-12-02 23:30:13 +00:00
Daniel Stenberg
8726a6b6ed comment cleanup 2004-12-02 22:52:14 +00:00
Daniel Stenberg
15360e5e51 prevent an initial "(nil)" to get sent in the initial request when doing
CONNECT to a proxy with digest
2004-12-02 17:08:37 +00:00
Gisle Vanem
bfa74c2649 alarm() works unreliable on djgpp 2.03. Don't use it. 2004-11-30 14:59:24 +00:00
Daniel Stenberg
c28e15c682 Dan Fandrich's fix for libz 1.1 and "extra field" usage in a gzip stream 2004-11-30 09:44:54 +00:00
Daniel Stenberg
0966ddafaa As reported in Mandrake's bug tracker bug 12285
(http://qa.mandrakesoft.com/show_bug.cgi?id=12285), when connecting to an
IPv6 host with FTP, --disable-epsv (or --disable-eprt) effectively disables
the ability to transfer a file. Now, when connected to an FTP server with
IPv6, these FTP commands can't be disabled even if asked to with the
available libcurl options.
2004-11-29 21:25:07 +00:00
Daniel Stenberg
5ae34aa8e1 killed trailing whitespace 2004-11-29 12:11:46 +00:00
Daniel Stenberg
c0d448f778 if gmtime() returns NULL, this returns -1 to bail out nicely 2004-11-29 08:10:10 +00:00
Daniel Stenberg
a4752673bb typecast the coversion from long to int 2004-11-27 09:27:48 +00:00
Gisle Vanem
d85bc18178 I changed my mind. Remove ioctl() macro in setup.h instead. 2004-11-26 16:08:15 +00:00
Gisle Vanem
af114358c8 Renamed urldata.h members 'ioctl*' to 'ioctrl*' due to
clash with djgpp ioctl() macro in setup.h.
2004-11-26 14:57:01 +00:00
Daniel Stenberg
ffe17a8197 As reported in Mandrake's bug tracker bug 12289
(http://qa.mandrakesoft.com/show_bug.cgi?id=12289), curl would print a newline
to "finish" the progress meter after each redirect and not only after a
completed transfer.
2004-11-26 14:33:13 +00:00
Daniel Stenberg
2459e1e268 removed no longer used variable 2004-11-26 08:52:18 +00:00
Daniel Stenberg
bf51f05a50 FTP improvements:
If EPSV, EPRT or LPRT is tried and doesn't work, it will not be retried on
the same server again even if a following request is made using a persistent
connection.

If a second request is made to a server, requesting a file from the same
directory as the previous request operated on, libcurl will no longer make
that long series of CWD commands just to end up on the same spot. Note that
this is only for *exactly* the same dir. There is still room for improvements
to optimize the CWD-sending when the dirs are only slightly different.

Added test 210, 211 and 212 to verify these changes. Had to improve the
test script too and added a new primitive to the test file format.
2004-11-25 22:21:49 +00:00
Daniel Stenberg
5d94ff5974 made the code fit within 80 cols 2004-11-25 16:49:14 +00:00
Daniel Stenberg
7b3fba1ad5 added missing new error string 2004-11-24 18:25:33 +00:00
Daniel Stenberg
3e1caa6185 HTTP "auth done right". See lib/README.httpauth 2004-11-24 16:11:35 +00:00
Daniel Stenberg
8e34e75100 Curl_select's timeout arg is an int 2004-11-22 13:28:44 +00:00
Daniel Stenberg
1729918777 Dan Fandrich fix to compile with libc5 2004-11-20 08:57:56 +00:00
Gisle Vanem
cef290c6b4 Enable >2GB files for MingW. 2004-11-19 15:15:52 +00:00
Gisle Vanem
539e34b5df Suppress signed vs. unsigned warnings on Win32 2004-11-19 14:38:02 +00:00
Daniel Stenberg
765683403f Curl_select() now uses curl_socket_t on socket arguments 2004-11-19 14:03:19 +00:00
Gisle Vanem
2b403db811 Winsock sockets are not in range 0..FD_SETSIZE.
Shouldn't Curl_select() use curl_socket_t ?
2004-11-19 13:46:58 +00:00
Daniel Stenberg
03e7b7c95f add select.obj 2004-11-19 13:45:46 +00:00
Daniel Stenberg
1a05a90f1c David Phillips' FD_SETSIZE fix 2004-11-19 08:52:33 +00:00
Daniel Stenberg
dcea109bb5 Dan Fandrich fix: eliminates some pedantic CodeWarrior compiler warnings and
errors.
2004-11-18 14:04:40 +00:00
Daniel Stenberg
7d0d19708a Added README.httpauth to the dist 2004-11-16 14:24:54 +00:00
Daniel Stenberg
09f14efade saved for the future 2004-11-16 14:02:24 +00:00
Daniel Stenberg
5931d43a36 clean up start time and t_startsingle use so that redirect_time works properly 2004-11-15 11:27:03 +00:00
Gisle Vanem
c3ecd552f5 Borland doesn't have <sys/utime.h> nor utime(). 2004-11-14 13:49:09 +00:00
Gisle Vanem
56f0227c92 Static lib is libcurl.lib and import lib libcurl_imp.lib.
Added implib command. Cleanup
2004-11-14 13:48:15 +00:00
Daniel Stenberg
dcb5a4df01 Dan fixed the CURL_DISABLE_VERBOSE_STRINGS stuff for older gcc versions since
they don't support C99 varargs macros.
2004-11-13 21:57:33 +00:00
Gisle Vanem
61599ceb7b Renamed import lib to "libcurl_imp.lib".
Some cleanup and making it more readable.
2004-11-13 14:17:41 +00:00
Gisle Vanem
98a8103a3b Netware target (hosted on Linux gcc) doesn't support
or need __declspec.
2004-11-12 11:45:05 +00:00
Daniel Stenberg
94043b1150 Dan Fandrich added the --disable-crypto-auth option to configure to allow
libcurl to build without Digest support. (I figure it should also explicitly
disable Negotiate and NTLM.)
2004-11-12 09:18:14 +00:00
Daniel Stenberg
8e2f57c82e Dan Fandrich: make --disable-dict actually disable dict 2004-11-11 23:13:06 +00:00
Daniel Stenberg
59c063dfd3 Fix behaviour when passing NULL to CURLOPT_POSTFIELDS and CURLOPT_HTTPPOST. 2004-11-11 23:11:04 +00:00
Daniel Stenberg
710e370c34 Dan Fandrich added --disable-verbose 2004-11-11 16:34:24 +00:00
Daniel Stenberg
cd73a733c7 dates from 2038 or later now return 0x7fffffff when 32 bit time_t is used 2004-11-11 09:26:09 +00:00
Gisle Vanem
865e495188 Handle drive-letter on MS-DOS. 2004-11-09 14:57:11 +00:00
Gisle Vanem
377e43fbb9 Changes for removing libcurl.def file on Win32.
Added "CURL_EXTERN" to memdebug.h functions.
Cleaned up Makefile.vc6.
2004-11-09 14:00:56 +00:00
Gisle Vanem
592686bee9 Change OS name. Fix header guard. 2004-11-08 14:21:24 +00:00
Gisle Vanem
f471a293ea Un-do changes for WinCE; cdecl decoration is not needed.
Confirmed by Paul Nolan.
2004-11-08 14:20:14 +00:00
Daniel Stenberg
c688166066 check for and require tld.h to be present before libidn usage is activated
in the build, since libidn 0.3.X didn't have the header and we don't support
that old libidn versions anyway.

This was mentioned on the list by Jean-Philippe Barrette-LaPierre and in bug
report #1062264.
2004-11-08 07:47:08 +00:00
Daniel Stenberg
6b49fd7483 Tim Sneddon's VMS fix for huge HTTP POSTs 2004-11-05 14:43:35 +00:00
Daniel Stenberg
f10985fc50 removed errno, added EAGAIN 2004-11-05 08:22:46 +00:00
Daniel Stenberg
edeac97773 it has a sys/stat.h file, according to Paul Nolan 2004-11-05 08:19:34 +00:00
Daniel Stenberg
d3be5b2725 delete trailing whitespace 2004-11-04 16:14:33 +00:00
Daniel Stenberg
4cd5220d27 use ifdef not if 2004-11-02 14:02:29 +00:00
Daniel Stenberg
24d47a6e07 Paul Nolan fix to make libcurl build nicely on Windows CE 2004-11-02 10:12:22 +00:00
Daniel Stenberg
8bfcae65ef Dan Fandrich's gzip handling fix 2004-10-27 21:46:11 +00:00
Daniel Stenberg
7167cde020 Testing to define _REENTRANT unconditionally in here. 2004-10-26 13:31:55 +00:00
Daniel Stenberg
a00e7f0f5e Tomas Pospisek filed bug report #1053287 that proved -C - and --fail on a
file that was already completely downloaded caused an error, while it
doesn't if you don't use --fail! I added test case 194 to verify the fix.
Grrr. CURLOPT_FAILONERROR is now added to the list stuff to remove in
libcurl v8 due to all the kludges needed to support it.
2004-10-25 11:28:40 +00:00
Daniel Stenberg
beb61ef429 Mohun Biswas found out that formposting a zero-byte file didn't work very
good. I fixed.
2004-10-24 22:31:40 +00:00
Daniel Stenberg
2730842559 Dan Fandrich's better ifdef for include fix 2004-10-21 08:22:07 +00:00
Daniel Stenberg
38b1d96750 Alexander Krasnostavsky made it possible to make FTP 3rd party transfers with
both source and destination being the same host. It can be useful if you want
to move a file on a server or similar.
2004-10-19 18:26:35 +00:00
Daniel Stenberg
f4bef25b5e CURLINFO_NUM_CONNECTS and more 2004-10-19 15:30:08 +00:00
Gisle Vanem
ebf7d22503 djgpp has locale.h and setlocale(). 2004-10-19 10:14:06 +00:00
Daniel Stenberg
21d5aead47 Alexander Krasnostavsky made the CURLOPT_FTP_CREATE_MISSING_DIRS option work
fine even for third party transfers.
2004-10-16 14:06:54 +00:00
Daniel Stenberg
f40c9b83df libcurl leaked memory for cookies with the "max-age" field set. 2004-10-16 13:54:40 +00:00
Gisle Vanem
e356420123 Added Traian Nicolescu's patches for threaded resolver on
Windows. Plugged some potential handle and memory leaks.

Refs.
  http://curl.haxx.se/mail/lib-2004-10/0134.html
  http://curl.haxx.se/mail/lib-2004-10/0157.html
2004-10-16 12:59:05 +00:00
Daniel Stenberg
e8f85cba0f Eric Vergnaud pointed out that libcurl didn't treat ?-letters in the user name
and password fields properly in URLs, like
ftp://us?er:pass?word@site.com/. Added test 191 to verify the fix.
2004-10-14 13:44:54 +00:00
Gisle Vanem
9deb76ce3e Set errno = ENOMEM on faild countcheck(). 2004-10-13 19:11:46 +00:00
Daniel Stenberg
411e9b0c45 #include "strerror.h" to get the strerror proto 2004-10-12 12:49:38 +00:00
Daniel Stenberg
557b6cfd3f add proper error message when send() fails 2004-10-12 07:24:19 +00:00
Daniel Stenberg
84bf03b365 removed trailing whitespace 2004-10-11 17:26:24 +00:00
Daniel Stenberg
34342bcd19 SO_NOSIGPIPE 2004-10-11 17:23:41 +00:00
Daniel Stenberg
5322a86313 another lame attempt to avoid the "warning: will never be executed" warning
by gcc 3.4
2004-10-10 14:36:22 +00:00
Gisle Vanem
1dc50e21c4 MSVC uses 'i64' suffix for 64-bit sizes. 2004-10-10 14:08:05 +00:00
Daniel Stenberg
a7913a62a9 If long is 8 bytes we can use strtol() to get 64 bit numbers and won't need
our strtoll() replacement function.
2004-10-10 03:39:59 +00:00
Daniel Stenberg
6d1b37b3da Prevent a longjmp warning by moving the rc assign within Curl_resolv().
Andy Cedilnik reported. Warning on HP-UX?
2004-10-10 03:32:01 +00:00
Daniel Stenberg
34750cc738 Use LL suffix for long long constants if the compiler supports it, to prevent
warnings.
2004-10-10 03:28:51 +00:00
Daniel Stenberg
eb5d3b5a7c killed trailing whitespace 2004-10-08 09:39:37 +00:00
Daniel Stenberg
7663775971 if basename was found, check for a prototype and if none was found, provide
our own in the formdata.c file to prevent warnings on systems without it
2004-10-08 08:18:08 +00:00
Daniel Stenberg
fe46572f2b prevent warning with comparison between signed and unsigned 2004-10-08 08:16:02 +00:00
Daniel Stenberg
62f97f1817 use curl_strnequal(), not strncasecmp() 2004-10-07 22:56:24 +00:00
Daniel Stenberg
c274e51654 use tld_strerror() only if previously detected, since otherwise we can't
work with libidn < 0.5.6
2004-10-07 07:41:44 +00:00
Gisle Vanem
071218a201 Fixed tld_check_name(). idna_to_unicode_lzlz() should never fail,
but return FALSE if 'uc_name == NULL' just in case.
2004-10-06 18:55:58 +00:00
Gisle Vanem
f0d6cc23ae USE_LIBIDN: Added Top-level-domain (TLD) check for host->name.
Only print a warning if check fails.
2004-10-06 18:40:10 +00:00
Daniel Stenberg
9a2aed7d7a Chih-Chung Chang reported that if you use CURLOPT_RESUME_FROM and enabled
CURLOPT_FOLLOWLOCATION, libcurl reported error if a redirect happened even if
the new URL would provide the resumed file. Test case 188 added to verify the
fix (together with existing test 99).
2004-10-06 13:37:12 +00:00
Daniel Stenberg
49b2896a3b avoid warnings on systems with this member set const 2004-10-06 07:52:20 +00:00
Daniel Stenberg
39af394a1c removed tabs and trailing whitespace from source 2004-10-06 07:50:18 +00:00
Daniel Stenberg
6c5ea2af27 untabify 2004-10-06 06:58:42 +00:00
Gisle Vanem
93e084e097 djgpp has basename() 2004-10-05 13:48:50 +00:00
Daniel Stenberg
1a61bcecfc minor edit to re-use a variable and to hopefully avoid a (moot) warning
about code that won't be reached
2004-10-05 11:03:59 +00:00
Daniel Stenberg
70c3f6a8dd avoid warning for unused variable 2004-10-05 08:42:56 +00:00
Daniel Stenberg
bb999d8213 use idna_strerror() if it is available (only in libidn 0.5.6 or later) 2004-10-05 08:40:26 +00:00
Daniel Stenberg
121197bc87 Only include libgen.h if we have a basename as well.
Mainly meant to deal with the IRIX case which seems to requrie a "-lgen" lib
to find the basename function and thus without the gen lib, it finds the
header but not the function and our replacement function has a prototype
that doesn't match the IRIX one.

A different approach would be to make configure detect and use -lgen for the
systems that require it.
2004-10-05 06:55:09 +00:00
Daniel Stenberg
d5dd8e0fdc let our basename() be static 2004-10-05 06:49:09 +00:00
Daniel Stenberg
95def48071 Made the dns entry remain locked while a connection to the host remains to
allow verbose output during this period. Bertrand Demiddelaer reported and
helped fixing.
2004-10-04 10:36:51 +00:00
Daniel Stenberg
2ee6c33412 set async.done to TRUE last in the addrinfo callback to prevent the risk that
the multi-threaded resolver does wrong
2004-10-03 21:32:24 +00:00
Daniel Stenberg
be7ce435c0 Replaced the use of isspace() with our own version instead since we have most
data as 'char *' and that makes us pass in negative values if there is 8bit
data in the string. Changing to unsigned causes too much warnings or too many
required typecasts to the normal string functions.
2004-10-03 21:02:01 +00:00
Daniel Stenberg
19b284c214 Gisle Vanem provided code that displays an error message when the (libidn
based) IDN conversion fails. This is really due to a missing suitable
function in the libidn API that I hope we can remove once libidn gets a
function like this.
2004-10-02 13:01:44 +00:00
Daniel Stenberg
6b3e3095ea removed weird preprocessor juggling not needed 2004-10-02 12:58:27 +00:00
Daniel Stenberg
fd2aad1d9b someone should hit me 2004-10-01 11:27:14 +00:00
Daniel Stenberg
d239fc5d04 Aleksandar Milivojevic reported a problem in the Redhat bugzilla (see
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=134133) and not to anyone
involved in the curl project! This happens when you try to curl a file from a
proftpd site using SSL. It seems proftpd sends a somewhat unorthodox PASS
response code (232 instead of 230). I relaxed the response code check to deal
with this and similar cases.
2004-10-01 11:22:11 +00:00
Daniel Stenberg
ec4da97a35 fixed the basename() replacement, reported by Gisle 2004-10-01 11:20:38 +00:00
Daniel Stenberg
8e87223195 - Based on Fedor Karpelevitch's formpost path basename patch, file parts in
formposts no longer include the path part. If you _really_ want them, you
  must provide your preferred full file name with CURLFORM_FILENAME.

  Added detection for libgen.h and basename() to configure. My custom
  basename() replacement function for systems without it, might be a bit too
  naive...

  Updated 6 test cases to make them work with the stripped paths.
2004-10-01 06:36:11 +00:00
Daniel Stenberg
be1cece69b - Larry Campbell added CURLINFO_OS_ERRNO to curl_easy_getinfo() that allows an
app to retrieve the errno variable after a (connect) failure. It will make
  sense to provide this for more failures in a more generic way, but let's
  start like this.
2004-09-30 21:01:23 +00:00
Daniel Stenberg
45be6d6645 killed trailing whitespace 2004-09-30 20:50:34 +00:00
Daniel Stenberg
6af6a2bbe8 Fixed an error message: we use CWD, we don't cd into dirs with FTP 2004-09-29 07:21:23 +00:00
Daniel Stenberg
2576ac1c76 Bertrand Demiddelaer fixed curl_easy_reset() so that it doesn't mistakingly
enable the progress meter.
2004-09-28 22:26:47 +00:00
Daniel Stenberg
1003628103 Only active the engine code if ssl is enabled. This is how the actual engine
member in the struct is used.
2004-09-28 07:11:32 +00:00
Daniel Stenberg
cb80670885 Ben Greear's minor fix to build (better) with cross-compiled(?) mingw 2004-09-26 06:53:53 +00:00
Daniel Stenberg
c189687188 allow setting CURLOPT_SSLENGINE to NULL even if no SSL engine is supported 2004-09-25 21:28:26 +00:00
Daniel Stenberg
7676f40218 jean-claude Chauve fixed an LDAP bug 2004-09-22 08:01:41 +00:00
Daniel Stenberg
2de62cb06f less long => int implicit conversion warnings 2004-09-20 13:21:48 +00:00
Gunter Knauf
be1df3ca0a removed getdate.c hack. 2004-09-19 23:30:34 +00:00
Daniel Stenberg
0d37f8564e kill trailing whitespace and clarify a few errors 2004-09-19 14:28:16 +00:00
Daniel Stenberg
6cd2536048 set an error message when connection fails 2004-09-19 14:27:56 +00:00
Daniel Stenberg
6a06667cc0 Added CURLOPT_FTPSSLAUTH 2004-09-16 21:45:16 +00:00
Daniel Stenberg
25bf23105d Location: problem with bad original URL, identified in bug report #1029478 2004-09-16 21:28:38 +00:00
Daniel Stenberg
d4076c9a8a fixed to use the new file. Can we make this use Makefile.inc somehow? 2004-09-15 08:05:53 +00:00
Daniel Stenberg
f71b3f48a1 Replaced the former date parser with a rewrite. No more yacc/bison needed. 2004-09-15 07:28:04 +00:00
Daniel Stenberg
adbe3eefb6 and moved back the month array to a static one since the ftp code won't need
it anymore
2004-09-13 20:49:27 +00:00
Daniel Stenberg
33f69c0546 removed this file again, we only provide a single public function and that
is already in the public header file
2004-09-13 20:48:24 +00:00
Daniel Stenberg
6c3a87a599 no longer includes getdate.h, there's no need for it 2004-09-13 20:47:31 +00:00
Daniel Stenberg
13cc010e38 getdate.h is not required to include, it adds nothing new 2004-09-13 20:47:15 +00:00
Daniel Stenberg
e99bf99829 revert the change for the new date parser, as the new one can deal with
the old format now
2004-09-13 20:43:12 +00:00
Daniel Stenberg
2e7dcc1e2a support for YYYYMMDD added, which allows us to keep using the lib/ftp.c code
I was previously #ifdef'ing to a different look when this parser is used
2004-09-13 20:40:27 +00:00
Daniel Stenberg
b85a036e4a added more examples/docs in the top comment 2004-09-13 07:57:12 +00:00