Commit Graph

477 Commits

Author SHA1 Message Date
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
Daniel Stenberg 37d8c67530 clarify for what protocols the changes are 2006-08-21 06:39:52 +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
Daniel Stenberg ba9ea943e2 related info 2006-08-16 17:56:49 +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
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
Daniel Stenberg 824b78021c start working towards 7.15.6 2006-08-07 06:48:01 +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 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 4d4151f6c1 David McCreedy added --ftp-ssl-reqd which makes curl *require* SSL for both
control and data connection, as the existing --ftp-ssl option only requests
it.
2006-07-26 23:20:47 +00:00
Daniel Stenberg 518becfe2e curl_multi_assign() and CURLMOPT_SOCKETFUNCTION proto change 2006-07-26 22:25:00 +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 f36adcdb73 Georg Horn made the transfer timeout error message include more details 2006-07-25 18:38:51 +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
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
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 e5cf6a20a7 yassl can be used now 2006-07-07 20:48:51 +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
Daniel Stenberg 2320606262 changed wording on the curl_multi_fdset() problem and moved the -K change from
bugfixes
2006-06-28 11:31:50 +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 72f80b88f7 make -K on a bad file now displays a warning 2006-06-19 21:39:57 +00:00
Daniel Stenberg 4c6c768422 starting the journey towards the next release 2006-06-12 07:24:14 +00:00
Daniel Stenberg 1d3969b215 7.15.4 coming up 2006-06-12 06:53:10 +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 fe105a07e3 two new mirrors and a recount of them 2006-05-31 05:49:37 +00:00
Daniel Stenberg 752acedc0b Olaf Stüben 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 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 77475f2ad0 Andreas Ntaflos reported a bug in libcurl.m4: When configuring my GNU
autotools project, which optionally (default=yes) uses libcurl on a system
without a (usable) libcurl installation, but not specifying
`--without-libcurl', configure determines correctly that no libcurl is
available, however, the LIBCURL variable gets expanded to `LIBCURL = -lcurl'
in the resulting Makefiles.

David Shaw fixed the flaw.
2006-05-09 12:56:35 +00:00
Daniel Stenberg 3680a2f6f5 mention the other TFTP cleanup sweep from yday 2006-05-09 12:44:11 +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 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 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
Daniel Stenberg 6ca627ae74 curl-config got a --checkfor option 2006-05-02 22:48:22 +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 db03d4bdd0 Ale Vesely fixed CURLOPT_INTERFACE when using a hostname 2006-04-21 13:46:19 +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 0f5232280c mention Katie Wang as author of the patch 2006-04-18 22:12:22 +00:00
Daniel Stenberg deeb74b7e4 #1468330 (http://curl.haxx.se/bug/view.cgi?id=1468330) pointed out a bad
typecast in the curl tool leading to a crash with (64bit?) VS2005 (at least)
since the struct timeval field tv_sec is an int while time_t is 64bit.
2006-04-11 10:49:51 +00:00
Daniel Stenberg 7b4ba43dcf mention recent additions 2006-04-10 21:57:45 +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
Daniel Stenberg f17d9bba14 David Byron found a problem multiple -d options when libcurl was built with
--enable-debug, as then curl used free() on memory allocated both with
normal malloc() and with libcurl-provided functions, when the latter MUST be
freed with curl_free() in debug builds.
2006-03-27 21:59:40 +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 15f2647d71 Tor Arntsen fixed the AIX Toolbox RPM spec 2006-03-21 13:34:41 +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
Daniel Stenberg 18081e30e1 mention today's fixes 2006-03-20 22:25:14 +00:00
Daniel Stenberg b8fad99f09 start working towards 7.15.4 2006-03-20 09:03:09 +00:00
Daniel Stenberg 5975229919 fixed tftp packet overflow risk 2006-03-20 07:32:50 +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
Daniel Stenberg d7999f9fcb mention Dan F's out-of-file handles fix from the other day 2006-03-02 11:41:23 +00:00
Daniel Stenberg f13eba4c78 check for and use getprotobyname 2006-03-02 11:37:05 +00:00
Daniel Stenberg b10aa95d28 start over on what might become 7.15.3 2006-02-27 18:14:14 +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
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 Härnhammar 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
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 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 b0bc2f00d2 Kent Boortz improved the configure check for GnuTLS to properly set LIBS
instead of LDFLAGS.
2006-02-11 12:56:52 +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
Daniel Stenberg 8cb695a963 fixed --limit-rate 2006-02-01 23:28:22 +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 f3bc8e6ce1 more mirrors 2006-01-29 13:13:45 +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 03603f392a the second -P fix 2006-01-20 17:50:12 +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 a2f3094eb0 reality sync 2006-01-18 12:17:20 +00:00
Daniel Stenberg 65afc576ea configure no longer warns on "missing" if the current path contains a space 2006-01-18 10:00:36 +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 bebf70667d Andrew Benham fixed a race condition in the test suite that could cause the
test script to kill all processes in the current process group!
2006-01-13 12:16:16 +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 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 2acd1c1642 one more mirror, now fortunately in Japan 2006-01-08 23:28:33 +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
Daniel Stenberg e4d8cb4ee0 buildconf fixes 2006-01-06 22:59:34 +00:00
Daniel Stenberg 2f8c26ba8a not much recent stuff, but still I had this modified locally 2006-01-04 10:04:23 +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
Daniel Stenberg e1269e3156 start working on 7.15.2 2005-12-06 23:36:36 +00:00