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

4396 Commits

Author SHA1 Message Date
Daniel Stenberg
b0685b3576 remove debug code I accidentally left in here 2008-08-06 09:54:34 +00:00
Gisle Vanem
138c57c76a Removed TRACE() code. 2008-08-06 08:05:09 +00:00
Daniel Stenberg
ed50e3f1b4 - Yehoshua Hershberg found a problem that would make libcurl re-use a
connection with the multi interface even if a previous use of it caused a
  CURLE_PEER_FAILED_VERIFICATION to get returned. I now make sure that failed
  SSL connections properly close the connections.
2008-08-04 22:07:50 +00:00
Daniel Stenberg
3a499099af - Test cases 1051, 1052 and 1055 were added by Daniel Fandrich on July 30 and
proved how PUT and POST with a redirect could lead to a "hang" due to the
  data stream not being rewound properly when it had to in order to get sent
  properly (again) to the subsequent URL. This is now fixed and these test
  cases are no longer disabled.
2008-08-04 22:00:22 +00:00
Daniel Stenberg
8d012181b0 - Test case 1041 (added by Daniel Fandrich April 14th) proved a bug where PUT
with -C - sent garbage in the Content-Range: header. I fixed this problem by
  making sure libcurl always sets the size of the _entire_ upload if an app
  attemps to do resumed uploads since libcurl simply cannot know the size of
  what is currently at the server end. Test 1041 is no longer disabled.
2008-08-03 22:20:58 +00:00
Dan Fandrich
42cabc14d4 Added support for --append on SFTP uploads. Unfortunately, OpenSSH doesn't
support this so it goes untested.
2008-08-01 18:41:14 +00:00
Dan Fandrich
9251dd7b24 User names embedded in proxy URLs without a password were parsed
incorrectly--the host name is treated as part of the user name and the
port number becomes the password.  This can be observed in test 279
(was KNOWN_ISSUE #54).
2008-08-01 02:09:08 +00:00
Dan Fandrich
3615063fbc Added more code under #ifndef CURL_DISABLE_HTTP to fix builds with
--disable-http
2008-08-01 01:39:24 +00:00
Dan Fandrich
09664f1ab8 Refactored create_conn by breaking it up into many smaller functions 2008-08-01 00:55:43 +00:00
Dan Fandrich
bdf1157d55 Made a parameter const 2008-08-01 00:49:29 +00:00
Dan Fandrich
b4a5ce89c2 Fixed a problem with any FTP URL or any URLs containing an IPv6 address
being mangled when passed to proxies when CURLOPT_PORT is also set
(reported by Pramod Sharma).
2008-07-31 22:46:29 +00:00
Dan Fandrich
660516914e Fixed parsing of an IPv6 proxy address to support a scope identifier,
as well as IPv4 addresses in IPv6 format. Also, better handle the case
of a malformatted IPv6 address (avoid empty and NULL strings).
2008-07-31 20:04:00 +00:00
Dan Fandrich
fe1d024351 Fixed a couple of problems in the IPv6 scope code. First, a host name in
an URL in a Location: header didn't have the scope ID removed, so an
invalid host name was used.  Second, when the scope ID was removed, it
also removed any port number that may have existed in the URL.
2008-07-31 02:18:01 +00:00
Daniel Stenberg
5aed78e183 - Phil Blundell added the CURLOPT_SCOPE option, as well as adjusted the URL
parser to allow numerical IPv6-addresses to be specified with the scope
  given, as per RFC4007 - with a percent letter that itself needs to be URL
  escaped. For example, for an address of fe80::1234%1 the HTTP URL is:
  "http://[fe80::1234%251]/"
2008-07-30 21:55:26 +00:00
Daniel Stenberg
ae654266df - PHP's bug report #43158 (http://bugs.php.net/bug.php?id=43158) identifies a
true bug in libcurl built with OpenSSL. It made curl_easy_getinfo() more or
  less always return 0 for CURLINFO_SSL_VERIFYRESULT because the function that
  would set it to something non-zero would return before the assign in almost
  all error cases. The internal variable is now set to non-zero from the start
  of the function only to get cleared later on if things work out fine.
2008-07-30 21:24:59 +00:00
Dan Fandrich
cc0285da7f Factored out Curl_copy_header_value 2008-07-30 20:11:51 +00:00
Yang Tse
5febd06c25 Sync comment with reality. 2008-07-30 08:21:25 +00:00
Yang Tse
537490e391 Undo using the sreadfrom() wrapper to replace recvfrom() in our code. 2008-07-30 05:10:42 +00:00
Dan Fandrich
1c8f689ecb Minor Symbian updates. 2008-07-30 00:10:32 +00:00
Dan Fandrich
7a8b11d716 Fixed --use-ascii to properly convert text files on Symbian OS, MS-DOS
and OS/2.
2008-07-30 00:09:02 +00:00
Dan Fandrich
248c2b9bf5 Eliminate a unnecessary socket creation in Curl_getaddrinfo for an IPv4
address in an IPv6 capable libcurl.
2008-07-29 18:26:35 +00:00
Yang Tse
d785ed2588 ignore *.dist files 2008-07-29 02:05:07 +00:00
Dan Fandrich
bc0ebfcdeb Fixed display of the interface bind address in the trace output when it's
an IPv6 address.
2008-07-28 18:35:34 +00:00
Yang Tse
1ac1212925 setup.h handles definition of _REENTRANT based on NEED_REENTRANT
definition which might be defined in config.h or config-*.h files
2008-07-27 03:16:37 +00:00
Dan Fandrich
432945e422 Eliminate a unnecessary socket creation in Curl_getaddrinfo for an IPv4
address in an IPv6 capable libcurl.
2008-07-27 02:20:34 +00:00
Daniel Stenberg
a96784b98e - David Bau filed bug report #2026240 "CURL_READFUNC_PAUSE leads to buffer
overrun" (http://curl.haxx.se/bug/view.cgi?id=2026240) identifying two
  problems, and providing the fix for them:

  - CURL_READFUNC_PAUSE did in fact not pause the _sending_ of data that it is
    designed for but paused _receiving_ of data!

  - libcurl didn't internally set the read counter to zero when this return
    code was detected, which would potentially lead to junk getting sent to
    the server.
2008-07-26 21:15:47 +00:00
Yang Tse
a7abd5bf70 ignore curllib.vcproj 2008-07-24 15:11:24 +00:00
Yang Tse
f22114aeed minor reordering in OS/400 config/setup files 2008-07-22 00:12:06 +00:00
Yang Tse
0919de4511 Change recvfrom's sixth argument data type to the 'historically standard' 'int'
data type for systems where this sixth argument is prototyped as a void pointer.

Start of thread: http://curl.haxx.se/mail/lib-2008-07/0153.html
2008-07-21 18:24:32 +00:00
Gisle Vanem
3e5292a052 Undefine 'byte' due to dict.c. 2008-07-21 15:39:54 +00:00
Yang Tse
775d9e0615 fix compiler warning: comparison between signed and unsigned 2008-07-21 03:59:23 +00:00
Yang Tse
a20d55fb64 Adjust recvfrom's sixth arg data type definition for NetWare (LIBC) 2008-07-21 03:50:02 +00:00
Yang Tse
1b37baf656 Use the sreadfrom() wrapper to replace recvfrom() in our code. 2008-07-21 03:06:07 +00:00
Yang Tse
bffe69a151 when recvfrom prototype uses a void pointer for arguments 2, 5 or 6 this will
now cause the definition of RECVFROM_TYPE_ARG2_IS_VOID, RECVFROM_TYPE_ARG5_IS_VOID
or RECVFROM_TYPE_ARG6_IS_VOID, as appropriate.
2008-07-21 00:36:55 +00:00
Yang Tse
39f23aec6b RECVFROM_TYPE_ARG2, RECVFROM_TYPE_ARG5 and RECVFROM_TYPE_ARG6 are now defined
to the data type pointed by its respective argument and not the pointer type.
2008-07-17 03:07:54 +00:00
Yang Tse
362422641e fix comment 2008-07-16 19:24:03 +00:00
Yang Tse
a9dc900515 Configure process now checks availability of recvfrom() socket function and
finds out its return type and the types of its arguments. Added definitions
for non-configure systems config files, and introduced macro sreadfrom which
will be used on udp sockets as a recvfrom() wrapper.
2008-07-16 19:16:41 +00:00
Yang Tse
1e7125ae7b add comment for include paths 2008-07-15 05:46:49 +00:00
Yang Tse
0f50cd7623 Move _REENTRANT definition earlier in lib/setup.h 2008-07-14 17:31:39 +00:00
Yang Tse
669c555874 Removed inclusion of remaining system header files from configuration files.
These are included from lib/setup.h or specific source code file.
2008-07-14 16:58:34 +00:00
Yang Tse
1cfb73a129 Inclusion of <extra/stricmp.h> and <extra/strdup.h> is moved to lib/setup.h 2008-07-14 16:10:29 +00:00
Yang Tse
2a585c2fba Remove duplicate file inclusions. These are already done in lib/setup.h
and lib/setup_once.h
2008-07-14 15:58:02 +00:00
Yang Tse
32a83128e6 Remove duplicate file inclusions. These are already done in lib/setup.h 2008-07-14 15:30:26 +00:00
Yang Tse
fe7bb33af8 HTTP_ONLY definition check in lib/setup.h is now done once that configuration
file has been included. In this way if symbol is defined in the config file
it will no longer be ignored.
2008-07-14 12:39:50 +00:00
Yang Tse
da6fa34f02 fix multiple header inclusion prevention definition 2008-07-11 18:59:00 +00:00
Yang Tse
37a358ab93 move multiple header inclusion prevention definition to top of file 2008-07-11 18:52:35 +00:00
Yang Tse
3452c8d693 Added missing multiple header inclusion prevention definition 2008-07-11 18:42:30 +00:00
Daniel Stenberg
57625b6c4c indent and comment cleanup (no code change) 2008-07-11 09:18:30 +00:00
Daniel Stenberg
0d058d2174 - Daniel Fandrich found out we didn't pass on the user-agent properly when
doing "proxy-tunnels" with non-HTTP prototols and that was simply because
  the code assumed the user-agent was only needed for HTTP.
2008-07-11 09:08:27 +00:00
Dan Fandrich
b4b6cfdb1c Changed slightly the SFTP quote commands chmod, chown and chgrp to only
set the attribute that has changed instead of all possible ones. Hopefully,
this will solve the "Permission denied" problem that Nagarajan Sreenivasan
reported when setting some modes, but regardless, it saves a protocol
round trip in the chmod case.
2008-07-11 04:38:11 +00:00
Dan Fandrich
6f3ef94836 Fixed another OOM problem, this time with test 64. 2008-07-10 18:15:22 +00:00
Yang Tse
08ac9866e0 Peter Lamberg filed bug report #2015126: "poll gives WSAEINVAL when POLLPRI
is set in fdset.events" (http://curl.haxx.se/bug/view.cgi?id=2015126) which
exactly pinpointed the problem only triggered on Windows Vista, provided
reference to docs and also a fix. There is much work behind Peter Lamberg's
excellent bug report. Thank You!
2008-07-10 18:01:44 +00:00
Daniel Stenberg
0cd8840dba - Andreas Schuldei improved Phil Blundell's patch for IPv6 using c-ares, and I
edited it slightly. Now you should be able to use IPv6 addresses fine even
  with libcurl built to use c-ares.
2008-07-09 18:39:49 +00:00
Dan Fandrich
d4b253ba3e Fixed an OOM handling problem that cause test 11 to fail the torture test. 2008-07-09 18:33:35 +00:00
Dan Fandrich
60f0b4fffe Fixed test 554 to pass the torture test. 2008-07-08 21:16:18 +00:00
Daniel Stenberg
0e5da5b8bc - Scott Barrett provided a test case for a segfault in the FTP code and the
fix for it. It occured when you did a FTP transfer using
  CURLFTPMETHOD_SINGLECWD and then did another one on the same easy handle but
  switched to CURLFTPMETHOD_NOCWD. Due to the "dir depth" variable not being
  cleared properly.  Scott's test case is now known as test 539 and it
  verifies the fix.
2008-07-07 20:37:07 +00:00
Patrick Monnerat
ddfa4b8896 New options added to OS400 wrapper and ILERPG definitions.
Wrong defines (typos) for QSSL layer fixed.
2008-07-07 10:39:46 +00:00
Yang Tse
7820391cb9 fix compiler warning: empty body in an if-statement 2008-07-05 03:31:41 +00:00
Daniel Stenberg
82412f218f Phil Blundell provided a fix for libcurl's treatment of unexpected 1xx
response codes. Previously libcurl would hang on such occurances. I added
test case 1033 to verify.
2008-07-03 08:47:53 +00:00
Daniel Stenberg
7c648782bc Introcuding a new timestamp for curl_easy_getinfo():
CURLINFO_APPCONNECT_TIME. This is set with the "application layer"
handshake/connection is completed (typically SSL, TLS or SSH). By using this
you can figure out the application layer's own connect time. You can extract
the time stamp using curl's -w option and the new variable named
'time_appconnect'. This feature was sponsored by Lenny Rachitsky at NeuStar.
2008-07-03 06:56:03 +00:00
Dan Fandrich
ee64d14733 Support Open Watcom C on Linux (as well as Windows). 2008-07-02 18:34:00 +00:00
Yang Tse
97333deb3f fallback to gettimeofday when monotonic clock is unavailable at run-time 2008-07-02 03:04:56 +00:00
Daniel Stenberg
ad1145a201 CreateConnection collided with a function using the exact same name in the
INTEGRITY RTOS, so I renamed it to create_conn. It then made sense to also
rename SetupConnection to setup_conn to match it.
2008-07-01 21:53:18 +00:00
Daniel Stenberg
eb60ba23f5 - Stephen Collyer and Tor Arntsen helped identify a flaw in the range code
which output the range using a signed variable where it should rather use
  unsigned.
2008-06-30 13:07:05 +00:00
Daniel Stenberg
69aac49f79 made %llu work for printing unsigned long longs, added the generic curl source
header
2008-06-30 12:58:15 +00:00
Daniel Stenberg
a81a16beac Added README.NSS to describe the current NSS situation. 2008-06-24 08:52:35 +00:00
Daniel Stenberg
d92945bb8a - Eduard Bloch filed the debian bug report #487567
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487567) pointing out that
  libcurl used Content-Range: instead of Range when doing a range request with
  --head (CURLOPT_NOBODY). This is now fixed and test case 1032 was added to
  verify.
2008-06-22 20:38:16 +00:00
Dan Fandrich
90a6a59a2f Stopped using ranges in scanf character sequences (e.g. %[a-z]) since that
is not ANSI C, just a common extension.  This caused problems on
at least Open Watcom C.
2008-06-22 06:57:00 +00:00
Daniel Stenberg
8bae3d9007 Oops, that was an experimental change not meant to be committed! 2008-06-21 21:21:29 +00:00
Daniel Stenberg
98042b858d made Curl_nss_send() take const data to kill compiler warning 2008-06-21 21:19:42 +00:00
Daniel Stenberg
da97f78ae0 - Phil Pellouchoud found a case where libcurl built with NSS failed to
handshake with a SSLv2 server, and it turned out to be because it didn't
  recognize the cipher named "rc4-md5". In our list that cipher was named
  plainly "rc4". I've now added rc4-md5 to work as an alias as Phil reported
  that it made things work for him again.
2008-06-20 11:15:54 +00:00
Daniel Stenberg
2e1a9da5e2 remove leftover proto that isn't used, I made it a macro instead 2008-06-20 10:45:26 +00:00
Daniel Stenberg
422fd933f5 - Hans-Jurgen May pointed out that trying SCP or SFTP over a SOCKS proxy
crashed libcurl. This is now addressed by making sure we use "plain send"
  internally when doing the socks handshake instead of the Curl_write()
  function which is designed to use the "target" protocol. That's then SCP or
  SFTP in this case. I also took the opportunity and cleaned up some ssh-
  related #ifdefs in the code for readability.
2008-06-20 10:43:32 +00:00
Daniel Stenberg
d09b6ecaa5 - Christopher Palow fixed a curl_multi_socket() issue which previous caused
libcurl to not tell the app properly when a socket was closed (when the name
  resolve done by c-ares is done) and then immediately re-created and put to
  use again (for the actual connection). Since the closure will make the
  "watch status" get lost in several event-based systems libcurl will need to
  tell the app about this close/re-create case.
2008-06-19 21:32:51 +00:00
Daniel Stenberg
fb2e71b9bd - Dengminwen found a bug in the connection re-use function when using the
multi interface with pipelining enabled as it would wrongly check for,
  detect and close "dead connections" even though that connection was already
  in use!
2008-06-19 08:31:22 +00:00
Daniel Stenberg
68b67e24f2 Removed the #define of ciphernum since keeping a define updated to be the
number of entries in a provided table is doomed to fail in the long run. Now
we use the NUM_OF_CIPHERS define instead to figure out the amount.
2008-06-19 05:47:27 +00:00
Daniel Stenberg
c1e2341f0a s/strcasecmp/strequal to make it more portable 2008-06-19 05:42:45 +00:00
Daniel Stenberg
e547bfa933 - Rob Crittenden brought a fix for the NSS layer that makes libcurl no longer
always fire up a new connection rather than using the existing one when the
  multi interface is used. Original bug report:
  https://bugzilla.redhat.com/show_bug.cgi?id=450140
2008-06-18 22:01:55 +00:00
Daniel Stenberg
36ddb13d1f removed warning about unused argument by simply removing that argument from
the check_issuer_cert() proto
2008-06-18 21:50:40 +00:00
Daniel Stenberg
74e3def5b3 check_issuer_cert() now builds and there's one warning less. Still one compiler
warning in the code though but we need NSS' base64.h header for that and we
don't currently have a suitable way to include it as our own base64.h header
kind of "blocks" it.
2008-06-18 21:48:51 +00:00
Daniel Stenberg
2597020d22 In checkPendPipeline() we can't be setting the TIMER_CONNECT correctly as that
is for the TCP connect. I changed it to TIMER_PRETRANSFER which seems to be
what was intended here.
2008-06-13 21:16:10 +00:00
Daniel Stenberg
5c56bdf229 fixed bad infof() usage! 2008-06-12 22:00:35 +00:00
Daniel Stenberg
04d5c8fb77 - I did a cleanup of the internal generic SSL layer and how the various SSL
libraries are supported. Starting now, each underlying SSL library support
  code does a set of defines for the 16 functions the generic layer (sslgen.c)
  uses (all these new function defines use the prefix "curlssl_"). This
  greatly simplified the generic layer in readability by involving much less
  #ifdefs and other preprocessor stuff and should make it easier for people to
  make libcurl work with new SSL libraries.

  Hopefully I can later on document these 16 functions somewhat as well.

  I also made most of the internal SSL-dependent functions (using Curl_ssl_
  prefix) #defined to nothing when no SSL support is requested - previously
  they would unnecessarily call mostly empty functions.
2008-06-11 17:01:58 +00:00
Yang Tse
5980b3cbb0 fix compiler warning: conversion from pointer to void' to pointer to int
function(pointer to char,int,int,pointer to void)' is compiler dependent
2008-06-11 15:26:04 +00:00
Daniel Stenberg
3940e69c91 fix warning in GnuTLS build by making sure Curl_gtls_send() takes a const
void *
2008-06-10 21:53:59 +00:00
Daniel Stenberg
0ace5f6553 - I made the OpenSSL code build again with OpenSSL 0.9.6. The CRLFILE
functionality killed it due to its unconditional use of
  X509_STORE_set_flags...
2008-06-10 20:49:17 +00:00
Gunter Knauf
72870e2c57 enable additional CFLAGS from commandline. 2008-06-08 22:29:34 +00:00
Gunter Knauf
d8bc4a0e9a use our *printf functions only. 2008-06-08 15:52:03 +00:00
Daniel Stenberg
a2e45a2211 code style cleanup 2008-06-06 20:57:32 +00:00
Daniel Stenberg
621c2b9015 - Axel Tillequin and Arnaud Ebalard added support for CURLOPT_ISSUERCERT, for
OpenSSL, NSS and GnuTLS-built libcurls.
2008-06-06 20:52:32 +00:00
Daniel Stenberg
3fe8251dfb - Axel Tillequin and Arnaud Ebalard added support for CURLOPT_CRLFILE, for
OpenSSL, NSS and GnuTLS-built libcurls.
2008-06-06 18:40:21 +00:00
Daniel Stenberg
930a45e7a9 - Added CURLINFO_PRIMARY_IP as a new information retrievable with
curl_easy_getinfo. It returns a pointer to a string with the most recently
  used IP address. Modified test case 500 to also verify this feature. The
  implementing of this feature was sponsored by Lenny Rachitsky at NeuStar.
2008-06-06 17:33:35 +00:00
Dan Fandrich
6f0a2608b4 Fixed a problem where telnet data would be lost if an EWOULDBLOCK
condition were encountered.
2008-06-03 18:03:11 +00:00
Yang Tse
4774582dfb Fix problem: 'result' may be used uninitialized.
Issue detected by Guenter Knauf's NetWare autobuild.
2008-05-31 01:37:21 +00:00
Daniel Stenberg
ec4f6e93c2 - Emil Romanus found a problem and helped me repeat it. It occured when using
the curl_multi_socket() API with HTTP pipelining enabled and could lead to
  the pipeline basically stalling for a very long period of time until it took
  off again.
2008-05-28 20:56:19 +00:00
Daniel Stenberg
b49dcfb52b - Jeff Weber reported memory leaks with aborted SCP and SFTP transfers and
provided excellent repeat recipes. I fixed the cases I managed to reproduce
  but Jeff still got some (SCP) problems even after these fixes:
  http://curl.haxx.se/mail/lib-2008-05/0342.html
2008-05-28 20:31:28 +00:00
Daniel Stenberg
f7815fa93c - Bug report #1973352 (http://curl.haxx.se/bug/view.cgi?id=1973352) identified
how the HTTP redirect following code didn't properly follow to a new URL if
  the new url was but a query string such as "Location: ?moo=foo". Test case
  1031 was added to verify this fix.
2008-05-26 20:39:41 +00:00
Daniel Stenberg
b97606f0b0 Andreas Faerber and Scott McCreary made (lib)curl build for the Haiku OS 2008-05-26 15:09:28 +00:00
Yang Tse
c57e748107 David Rosenstrauch reported that header files spnegohelp.h and
openssl/objects.h were needed to compile SPNEGO support.
2008-05-26 03:10:34 +00:00
Yang Tse
d6f8f16068 fix: preprocessor complaining about macro redefinition 2008-05-26 01:59:00 +00:00
Daniel Stenberg
d001f6a396 Dan Fandrich pointed out that this is the way we should increase the number
for 7.18.2 since we have added functions in this release.

http://curl.haxx.se/mail/lib-2008-05/0240.html
2008-05-23 17:56:03 +00:00
Daniel Stenberg
b8abeab6d3 we bump the SO "revision" for next release due to the new functions added 2008-05-22 20:34:47 +00:00
Dan Fandrich
4aa176c127 Fixed some include file problems on Windows reported by David Rosenstrauch 2008-05-22 19:44:10 +00:00
Dan Fandrich
791ad1210e Renamed MSDOS_FILESYSTEM to avoid conflict with MIT GSS 2008-05-21 21:36:42 +00:00
Dan Fandrich
100945694a Removed some duplicated #includes 2008-05-21 21:08:31 +00:00
Yang Tse
d8efc99217 fix: remove need and definition of HAVE_SOCKLEN_T symbol 2008-05-21 14:04:14 +00:00
Yang Tse
0163b5b8be fix: socklen_t definition comment 2008-05-21 13:57:50 +00:00
Patrick Monnerat
24bf52bc69 Adapting last changes to OS400:
_ Updated packages/OS400/curl.inc.in with new definitions.
_ New connect/bind/sendto/recvfrom wrappers to support AF_UNIX sockets.
_ Include files line length shortened below 100 chars.
_ Const parameter in lib/qssl.[ch].
_ Typos in packages/OS400/initscript.sh.
2008-05-20 10:21:50 +00:00
Daniel Stenberg
ae45a462e0 with pipelining disabled, the state should never be set to WAITDO but rather
go straight to DO

we had multiple states for which the internal function returned no socket at
all to wait for, with the effect that libcurl calls the socket callback (when
curl_multi_socket() is used) with REMOVE prematurely (as it would be added
again within very shortly)
2008-05-19 20:58:01 +00:00
Daniel Stenberg
3cb0dd6685 when the multi handle was in DO and DOING states, the HTTP and HTTPS protocol
handler functions didn't return that the socket should be waited for writing,
but instead it was treated as if no socket was needing monitoring so REMOVE
was called prematurely
2008-05-19 20:57:28 +00:00
Dan Fandrich
08aab6a620 Move the CURLDEBUG check after setup.h so it can be set there if necessary. 2008-05-14 23:36:26 +00:00
Daniel Stenberg
514592b892 - Introducing curl_easy_send() and curl_easy_recv(). They can be used to send
and receive data over a connection previously setup with curl_easy_perform()
  and its CURLOPT_CONNECT_ONLY option. The sendrecv.c example was added to
  show how they can be used.
2008-05-12 21:43:24 +00:00
Yang Tse
ed80eb5b0f configure script will now define HAVE_CLOCK_GETTIME_MONOTONIC symbol only
when function clock_gettime() is available and the monotonic timer is
also available. Otherwise, in some cases, librt or libposix4 could be used
for linking even when finally not using the clock_gettime() function due
to lack of the monotonic clock.
2008-05-12 02:04:21 +00:00
Yang Tse
60dd765b3d fix syntax error: missing semicolon 2008-05-10 23:50:55 +00:00
Yang Tse
19479ea021 Internal time differences now use monotonic time source if available.
This also implies the removal of the winmm.lib dependency for WIN32.
2008-05-09 16:31:51 +00:00
Daniel Stenberg
0510759bc4 - Stefan Krause reported a busy-looping case when using the multi interface
and doing CONNECT to a proxy. The app would then busy-loop until the proxy
  completed its response.
2008-05-09 12:59:24 +00:00
Daniel Stenberg
6d5cca5ed0 Removed an unused variable and one do-while loop that wasn't used either.
Added a few comments while at it.
2008-05-09 12:53:42 +00:00
Michal Marek
e2b82b4325 - Make Curl_write and it's callees accept a const pointer, in preparation
of tetetest's patch for curl_easy_send()
2008-05-09 11:27:54 +00:00
Yang Tse
d4e9b141db fix compiler warning: format '%ld' expects type 'long int' 2008-05-08 05:45:01 +00:00
Daniel Stenberg
e481d679b2 - Liam Healy filed the debian bug report #480044
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=480044) identifying a
  segfault when using krb5 ftp, but the krb4 code had the same problem.
2008-05-07 21:02:21 +00:00
Yang Tse
eb68aa38e3 Christopher Palow provided the patch (edited by me) that introduces
the use of microsecond resolution keys for internal splay trees.

http://curl.haxx.se/mail/lib-2008-04/0513.html
2008-05-07 15:41:41 +00:00
Yang Tse
082237e2b5 fix compiler warning: enumerated type mixed with another type 2008-05-06 04:37:06 +00:00
Daniel Stenberg
19da3606f9 minor spell and language fix of a comment 2008-05-03 21:49:16 +00:00
Daniel Stenberg
fc9e0d2249 - Ben Van Hof filed bug report #1945240: "libcurl sometimes sends body twice
when using CURL_AUTH_ANY" (http://curl.haxx.se/bug/view.cgi?id=1945240).
  The problem was that when libcurl rewound a stream meant for upload when it
  would prepare for a second request, it could accidentally continue the
  sending of the rewound data on the first request instead of on the second.
  Ben also provided test case 1030 that verifies this fix.
2008-05-03 21:45:12 +00:00
Daniel Stenberg
21a0f09081 Added comments, check Curl_http_auth_act()'s return code and added a check
that closes the connection somewhat faster when perhapsrewind() has marked
the connection for closure.
2008-05-03 21:44:50 +00:00
Daniel Stenberg
b84b71f524 - Jean-Francois Bertrand reported a libcurl crash with CURLOPT_TCP_NODELAY
since libcurl used getprotobyname() and that isn't thread-safe. We now
  switched to use IPPROTO_TCP unconditionally, but perhaps the proper fix is
  to detect the thread-safe version of the function and use that.
  http://curl.haxx.se/mail/lib-2008-05/0011.html
2008-05-03 13:43:35 +00:00
Daniel Stenberg
3d29bda9f8 - Bart Whiteley provided a patch that made libcurl work properly when an app
uses the CURLOPT_OPENSOCKETFUNCTION callback to create a unix domain socket
  to a http server.
2008-05-01 21:34:34 +00:00
Daniel Stenberg
852989856d - To make it easier for applications that want lots of magic stuff done on
redirections and thus cannot use CURLOPT_FOLLOWLOCATION easily, we now
  introduce the new CURLINFO_REDIRECT_URL option that lets applications
  extract the URL libcurl would've redirected to if it had been told to. This
  then enables the application to continue to that URL as it thinks is
  suitable, without having to re-implement the magic of creating the new URL
  from the Location: header etc. Test 1029 verifies it.
2008-04-30 21:20:08 +00:00
Yang Tse
1eebb90030 improve easy interface resolving timeout handling in c-ares enabled builds 2008-04-29 04:18:02 +00:00
Daniel Stenberg
7a6cff4b3a - Norbert Frese filed bug report #1951588: "Problem with curlftpfs and
libcurl" (http://curl.haxx.se/bug/view.cgi?id=1951588) which seems to be an
  identical report to what Denis Golovan reported in
  http://curl.haxx.se/mail/lib-2008-02/0108.html The FTP code didn't reset the
  user/password pointers properly even though there might've been a new
  struct/cconnection getting used.
2008-04-28 21:29:17 +00:00
Dan Fandrich
3783b455c0 Symbian OS is a.k.a. EPOC32 2008-04-23 18:29:44 +00:00
Dan Fandrich
1960eebc2d Added support for running on Symbian OS. 2008-04-22 22:53:53 +00:00
Yang Tse
95fd093c4a Remove fflush() + fsync() previously introduced accelerated writing of
server input and response request files of the test harness sws server.

Reintroduce, for test # 1001, the <postcheck> small delay. The delay is
needed even with the accelerated writing of server input and response
request files in test harness sws server.

http://curl.haxx.se/mail/lib-2008-04/0385.html
2008-04-22 12:40:05 +00:00
Yang Tse
f48eb36f75 HAVE_FFLUSH and HAVE_FSYNC symbol definitions for WIN32 systems 2008-04-21 19:17:42 +00:00
Dan Fandrich
09777a4fc2 Some trivial changes 2008-04-17 00:45:33 +00:00
Daniel Stenberg
6a33a4456e - Stefan Krause reported a case where the OpenSSL handshake phase wasn't
properly acknowledging the timeout values, like if you pulled the network
  plug in the midst of it.
2008-04-14 15:26:34 +00:00
Daniel Stenberg
e0c2a39ad4 - Andre Guibert de Bruet fixed a second case of not checking the malloc()
return code in the Negotiate code.
2008-04-14 15:22:45 +00:00
Daniel Stenberg
79e06c4147 - Sandor Feldi reported bug #1942022
(http://curl.haxx.se/bug/view.cgi?id=1942022) pointing out a mistake in the
  lib/Makefile.vc[68] makefiles' release-ssl-dll target.
2008-04-14 15:19:05 +00:00
Daniel Stenberg
84eb9fee76 - Andre Guibert de Bruet found and fixed a case where malloc() was called but
was not checked for a NULL return, in the Negotiate code.
2008-04-12 11:50:51 +00:00
Patrick Monnerat
a08b6ae813 Adapt OS400 SSL (qssl.h) to V5R4
Fix qssl.c wrong error message
Upgrade OS400 wrappers and makefiles to 7.18.1
2008-04-07 13:09:17 +00:00
Michal Marek
d0a4b50e19 - Fix the MIT / Heimdal check for good:
Define HAVE_GSSMIT if <gssapi/{gssapi.h,gssapi_generic.h,gssapi_krb5.h}> are
  available, otherwise define HAVE_GSSHEIMDAL if <gssapi.h> is available.

  Only define GSS_C_NT_HOSTBASED_SERVICE to gss_nt_service_name if
  GSS_C_NT_HOSTBASED_SERVICE isn't declared by the gssapi headers. This should
  avoid breakage in case we wrongly recognize Heimdal as MIT again.
2008-04-07 09:26:30 +00:00
Daniel Stenberg
ebaf06a741 - Alexey Simak fixed curl_easy_reset() to reset the max redirect limit properly 2008-04-05 21:13:44 +00:00
Daniel Stenberg
34d837c2dd provide CURL_DEFAULT_PROXY_PORT set to 1080 for the default port libcurl
assumes proxies to use
2008-04-05 21:13:31 +00:00
Daniel Stenberg
7607d5145b - Based on the Debian bug report #474224 that complained about the FTP error
message when libcurl doesn't get a 220 back immediately on connect, I now
  changed it to be more specific on what the problem is. Also worth noticing:
  while the bug report contains an example where the response is:

    421 There are too many connected users, please try again later

  we cannot assume that the error message will always be this readable nor
  that it fits within a particular boundary etc.
2008-04-05 21:02:38 +00:00
Daniel Stenberg
a9c1ca9fc5 - Setting CURLOPT_NOBODY to FALSE will now switch the HTTP request method to
GET simply because previously when you set CURLOPT_NOBODY to TRUE first and
  then FALSE you'd end up in a broken state where a HTTP request would do a
  HEAD by still act a lot like for a GET and hang waiting for the content etc.
2008-04-03 21:44:49 +00:00
Daniel Stenberg
d051dd8087 Scott Barrett added support for CURLOPT_NOBODY over SFTP 2008-04-03 20:56:59 +00:00
Gunter Knauf
3d08b352a2 moved CURL_CA_BUNDLE define to generated config.h. 2008-03-31 12:51:44 +00:00
Michal Marek
d13be06aaa Removed the generated ca-bundle.h file. The verbatim value of $ca and
$capath is known to configure, so it can be defined in config.h instead.
2008-03-31 12:09:43 +00:00
Daniel Stenberg
f1c69192da expanded a comment around some of the new formpost callback usage 2008-03-31 10:16:34 +00:00
Daniel Stenberg
a2314225e0 - Added CURLFORM_STREAM as a supported option to curl_formadd() to allow an
application to provide data for a multipart with the read callback. Note
  that the size needs to be provided with CURLFORM_CONTENTSLENGTH when the
  stream option is used. This feature is verified by the new test case
  554. This feature was sponsored by Xponaut.
2008-03-31 10:02:23 +00:00
Daniel Stenberg
b425e851fb - As found out and reported by Dan Petitt, libcurl didn't show progress/call
the progress callback for the first (potentially huge) piece of body data
  sent together with the POST request headers in the initial send().
2008-03-27 13:07:12 +00:00
Daniel Stenberg
2c9763da3e - Made setting the CURLOPT_SSL_CTX_FUNCTION option return a failure in case
libcurl wasn't built to use OpenSSL as that is a prerequisite for this
  option to function!
2008-03-25 19:19:49 +00:00
Daniel Stenberg
95bd901efe - Fixed the problem with doing a zero byte SCP transfer, verified with test
case 617 (which was added by Daniel Fandrich 5 Mar 2008).
2008-03-22 22:00:21 +00:00
Michal Marek
86cbb23282 - Added --with-ca-path=DIRECTORY configure option to use an openSSL CApath by
default instead of a ca bundle. The configure script will also look for a
  ca path if no ca bundle is found and no option given.

- Fixed detection of previously installed curl-ca-bundle.crt
2008-03-20 08:09:23 +00:00
Dan Fandrich
e9a460411f Fixed an infinite loop when given an invalid SFTP quote command. 2008-03-18 22:59:04 +00:00
Michal Marek
6f3166c15b - Added curl_easy_getinfo typechecker.
- Added macros for curl_share_setopt and curl_multi_setopt to check at least
  the correct number of arguments.
2008-03-18 08:14:37 +00:00
Daniel Stenberg
ad4a9955c5 - Brian Ulm figured out that if you did an SFTP upload with
CURLOPT_FTP_CREATE_MISSING_DIRS to create a directory, and then re-used the
  handle and uploaded another file to another directory that needed to be
  created, the second upload would fail. Another case of a state variable that
  wasn't properly reset between requests.
2008-03-13 21:43:30 +00:00
Daniel Stenberg
553ed99e3b Change the confusing two variables for the expect 100 continue stuff into
a single state variable to make the code easier to follow and understand.
2008-03-13 20:56:13 +00:00
Daniel Stenberg
b9d66dca51 - Dmitry Popov filed bug report #1911069
(http://curl.haxx.se/bug/view.cgi?id=1911069) that identified a race
  condition in the name resolver code when the DNS cache is shared between
  multiple easy handles, each running in simultaneous threads that could cause
  crashes.
2008-03-11 22:55:23 +00:00
Michal Marek
7a8a20416f - Added a type checking macro for curl_easy_setopt(), needs gcc-4.3 and only
works in C mode atm (http://curl.haxx.se/mail/lib-2008-02/0267.html ,
  http://curl.haxx.se/mail/lib-2008-02/0292.html )
2008-03-11 07:37:40 +00:00
Daniel Stenberg
82e095a275 - Brian Ulm reported a crash when doing a second SFTP transfer on a re-used
easy handle if curl_easy_reset() was used between them. I fixed it and Brian
  verified that it cured his problem.

- Brian Ulm reported that if you first tried to download a non-existing SFTP
  file and then fetched an existing one and re-used the handle, libcurl would
  still report the second one as non-existing as well! I fixed it abd Brian
  verified that it cured his problem.
2008-03-09 11:37:48 +00:00
Yang Tse
8e9e33ae52 VS2005 and later dafault size for time_t is 64-bit, unless
_USE_32BIT_TIME_T has been defined to get a 32-bit time_t
2008-03-07 02:49:14 +00:00
Yang Tse
91aeebed26 Regression fix:
select/poll calls will only be retried upon EINTR failures as
it previously was in lib/select.c revision 1.29

In this way Curl_socket_ready() and Curl_poll() will again fail
on any select/poll errors different than EINTR.
2008-03-06 03:48:33 +00:00
Daniel Stenberg
0836893335 Mike Protts brought a patch that makes resumed transfers work with SFTP. 2008-03-04 11:53:15 +00:00
Daniel Stenberg
590f0358d8 - Anatoli Tubman found and fixed a crash with Negotiate authentication used on
a re-used connection where both requests used Negotiate.
2008-03-01 22:32:03 +00:00
Gunter Knauf
8f4fda1d6f fixed commented define for SSPI. 2008-02-28 11:34:08 +00:00
Gunter Knauf
7513d29a48 another small change to the makefiles to simplify rules. 2008-02-27 01:36:01 +00:00
Gunter Knauf
724ad15dad some more minor makefile changes; removed useless dist target. 2008-02-26 21:41:19 +00:00
Gunter Knauf
79aa6c841e fixed install target to create a ca-bundle.crt since we have no longer one in the project. 2008-02-26 21:24:03 +00:00
Gunter Knauf
9682c2037e Added support for server name indication (RFC 4366).
Patch submitted by Kaspar Brand.
2008-02-26 10:30:13 +00:00
Daniel Stenberg
74241e7d85 - Kaspar Brand made GnuTLS-built libcurl properly acknowledge the option that
forces it to prefer SSLv3.
2008-02-25 07:51:39 +00:00
Daniel Stenberg
6982ed4db7 - Sam Listopad provided a patch in feature-request #1900014
http://curl.haxx.se/bug/feature.cgi?id=1900014 that makes libcurl (built to
  use OpenSSL) support a full chain of certificates in a given PKCS12
  certificate.
2008-02-23 12:27:45 +00:00
Daniel Stenberg
e9bb7b7712 - Zmey Petroff found a crash when libcurl accessed a NULL pointer, which
happened if you set the connection cache size to 1 and for example failed to
  login to an FTP site. Bug report #1896698
  (http://curl.haxx.se/bug/view.cgi?id=1896698)
2008-02-21 17:52:16 +00:00
Daniel Stenberg
3bb4602227 assert that the *connp is a non-NULL pointer when Curl_done() is called 2008-02-21 12:28:45 +00:00
Daniel Stenberg
9019fc5671 oops, fixed to build 2008-02-20 10:01:28 +00:00
Daniel Stenberg
53a549000c - Based on initial work done by Gautam Kachroo to address a bug, we now keep
better control at the exact state of the connection's SSL status so that we
  know exactly when it has completed the SSL negotiation or not so that there
  won't be accidental re-uses of connections that are wrongly believed to be
  in SSL-completed-negotiate state.
2008-02-20 09:56:26 +00:00
Daniel Stenberg
55700cb01f - We no longer support setting the CURLOPT_URL option from inside a callback
such as the CURLOPT_SSL_CTX_FUNCTION one treat that as if it was a Location:
  following. The patch that introduced this feature was done for 7.11.0, but
  this code and functionality has been broken since about 7.15.4 (March 2006)
  with the introduction of non-blocking OpenSSL "connects".

  It was a hack to begin with and since it doesn't work and hasn't worked
  correctly for a long time and nobody has even noticed, I consider it a very
  suitable subject for plain removal. And so it was done.
2008-02-20 08:28:02 +00:00
Gunter Knauf
f9a6062081 applied patch to disable SSLv2 by default; discussion:
http://sourceforge.net/tracker/index.php?func=detail&aid=1767276&group_id=976&atid=350976
Submitted by Kaspar Brand.
2008-02-19 23:10:07 +00:00
Yang Tse
7b5c86033a fix compiler warnings: 'statement is unreachable' 2008-02-19 17:25:19 +00:00
Yang Tse
d2125cf501 fix compiler warnings: 'enumerated type mixed with another type' 2008-02-19 15:07:50 +00:00
Daniel Stenberg
0d722204c3 https_getsock() should be static all over (and did some fixed indenting) 2008-02-18 19:53:31 +00:00
Gunter Knauf
e2b50b203d added check symbol for linking with POSIX prelude. 2008-02-18 15:30:11 +00:00
Yang Tse
ab0de23d83 fix compiler warnings:
'enumerated type mixed with another type'

and

  'variable was set but never used'
2008-02-18 13:05:46 +00:00
Daniel Stenberg
fb23b85770 - We're no longer providing a very old ca-bundle in the curl tarball. You can
get a fresh one downloaded and created with 'make ca-bundle' or you can get
  one from here => http://curl.haxx.se/docs/caextract.html if you want a fresh
  new one extracted from Mozilla's recent list of ca certs.

  The configure option --with-ca-bundle now lets you specify what file to use
  as default ca bundle for your build. If not specified, the configure script
  will check a few known standard places for a global ca cert to use.
2008-02-18 11:35:12 +00:00
Daniel Stenberg
ba3e7a8656 rephrased comment 2008-02-17 13:49:01 +00:00
Daniel Stenberg
240bae4eb2 In Curl_done() if premature is TRUE, it means this connection was said to be
DONE before the entire request operation is complete and thus we can't know in
what state it is for re-using, so we're forced to close it. In a perfect world
we can add code that keep track of if we really must close it here or not, but
currently we have no such detail knowledge.

Jerome Muffat-Meridol helped us work this out.
2008-02-17 13:43:32 +00:00
Daniel Stenberg
4180ca7638 don't do the GOT_NOTHING error check if the DONE function was called with
premature set TRUE, which means it was done before the request comleted. It
could then very well not have received any data.
2008-02-17 13:40:35 +00:00
Daniel Stenberg
0e73361a06 added a comment about the ignoring of the Curl_done() return code 2008-02-17 13:38:19 +00:00
Daniel Stenberg
550d6f74b9 oops, that was debug code not meant to be committed like this... 2008-02-16 13:44:23 +00:00
Daniel Stenberg
f7b71c2abe fix warnings about shadowing 2008-02-16 13:41:55 +00:00
Gunter Knauf
0da90b5d91 seems that curently we dont need the imports from (l)ldapx.imp. 2008-02-16 00:44:14 +00:00
Gunter Knauf
3e635a2334 re-ordered the module dependency list;
removed unsused ldap module dependency since the module didnt autounload from protected address space.
2008-02-16 00:15:30 +00:00
Daniel Stenberg
e78652d850 - Made the gnutls code path not even try to get the server cert if no peer
verification is requested. Previously it would even return failure if gnutls
  failed to get the server cert even though no verification was asked for.

- Fix my Curl_timeleft() leftover mistake in the gnutls code
2008-02-15 22:37:00 +00:00
Daniel Stenberg
48918c3047 mention that we explicitly ignore the return code 2008-02-15 21:38:54 +00:00
Yang Tse
dc42d6fb8d log SSH public key authentication failure and reason 2008-02-15 17:00:56 +00:00
Daniel Stenberg
d25aab2704 - Pooyan McSporran found and fixed a flaw where you first would do a normal
http request and then you'd reuse the handle and replace the Accept: header,
  as then libcurl would send two Accept: headers!
2008-02-15 08:56:06 +00:00
Gunter Knauf
cfaf88aab4 fixed version var. 2008-02-15 00:41:54 +00:00
Gunter Knauf
ecc75be6f3 moved info block up before help block so that it can also be displayed before help option; trial to add a version number. 2008-02-15 00:26:26 +00:00
Daniel Stenberg
fcc320ee40 Yang Tse pointed out a few remaining quirks from my timeout refactoring from
Feb 7 that didn't abort properly on timeouts. These are actually old
problems but now they should be fixed.
2008-02-11 22:03:31 +00:00
Gunter Knauf
019f6a1926 open pipe to openssl commandline instead of writing into temp file. 2008-02-11 18:52:45 +00:00
Dan Fandrich
44fba11b34 Fixed unused variable warning. 2008-02-11 18:27:36 +00:00
Gunter Knauf
df07c87b89 added strict to make sure all vars are properly defined;
added -t switch to make text info of CAs optional;
added -q switch to be really quiet.
2008-02-11 15:00:00 +00:00
Yang Tse
736af32b49 Bug report #1888932 (http://curl.haxx.se/bug/view.cgi?id=1888932) points
out and provides test program that demonstrates that libcurl might not set
error description message for error CURLE_COULDNT_RESOLVE_HOST for Windows
threaded name resolver builds. Fixed now.
2008-02-10 04:20:09 +00:00
Gunter Knauf
08e5c0812f added -b switch to provide a backup functionality for existing ca-bundle.crt file. 2008-02-10 01:29:24 +00:00
Gunter Knauf
a8c71961e0 fixed another wrong var in error message. 2008-02-09 15:32:54 +00:00
Gunter Knauf
63d595a047 fixed wrong var in error message. 2008-02-09 15:00:07 +00:00
Daniel Stenberg
4c841a1f0c - Mike Hommey filed and fixed bug report #1889856
(http://curl.haxx.se/bug/view.cgi?id=1889856): When using the gnutls ssl
  layer, cleaning-up and reinitializing curl ends up with https requests
  failing with "ASN1 parser: Element was not found" errors. Obviously a
  regression added in 7.16.3.
2008-02-08 22:02:00 +00:00
Daniel Stenberg
a2bff51ede include mk-ca-bundle.pl in the tarballs 2008-02-08 09:56:23 +00:00
Gunter Knauf
c764331dd9 use argument to specify output filename if present. 2008-02-08 02:38:12 +00:00
Gunter Knauf
586444b6b8 fixed regex to fetch certdata.txt version since it was replaced by CVS (argh!)
added a switch to display certdata.txt version header.
2008-02-08 01:58:11 +00:00
Gunter Knauf
d76a74cc5e added Perl script to create a fresh ca-bundle.crt. 2008-02-08 01:08:25 +00:00
Daniel Stenberg
1b701c746f - Refactored a lot of timeout code into a few functions in an attempt to make
them all use the same (hopefully correct) logic to make it less error-prone
  and easier to introduce library-wide where it should be used.
2008-02-07 22:25:04 +00:00
Daniel Stenberg
15bf168527 ca-bundle.crt documentational updates that more clearly describe the bundle
ca-bundle.crt file as outdated and in need for replacement by anyone who wants
to verify modern peers as the one we have is from year 2000!
2008-02-07 15:43:36 +00:00
Yang Tse
20e9fc73e2 Fix problem in strdup replacement when dealing with absolutely huge strings. 2008-02-06 19:01:13 +00:00
Gunter Knauf
7bd098f670 fixed entry symbols when linked with posix prelude. 2008-02-04 22:40:59 +00:00
Gunter Knauf
4b5c504bd4 added makefile flag to link with NLM POSIX semantics. 2008-02-04 22:29:52 +00:00
Daniel Stenberg
ffae4f6b48 - Dmitry Kurochkin cleaned up the pipelining code and removed the need for and
use of the "is_in_pipeline" struct field.
2008-02-03 12:31:35 +00:00
Daniel Stenberg
a62e155ca4 - Niklas Angebrand made the cookie support in libcurl properly deal with the
"HttpOnly" feature introduced by Microsoft and apparently also supported by
  Firefox: http://msdn2.microsoft.com/en-us/library/ms533046.aspx . HttpOnly
  is now supported when received from servers in HTTP headers, when written to
  cookie jars and when read from existing cookie jars.
2008-01-31 12:21:57 +00:00
Daniel Stenberg
b620e62f0f - Dmitry Kurochkin moved several struct fields from the connectdata struct to
the SingleRequest one to make pipelining better. It is a bit tricky to keep
  them in the right place, to keep things related to the actual request or to
  the actual connection in the right place.
2008-01-31 12:04:33 +00:00
Gunter Knauf
ea3f63281c silent stupid 'del' message when no files to delete found;
added curl.res to clean target.
2008-01-29 23:46:41 +00:00
Daniel Stenberg
1bfbd25027 - Dmitry Kurochkin fixed Curl_done() for pipelining, as it could previously
crash!
2008-01-29 12:58:25 +00:00
Daniel Stenberg
33d68653f0 this was modified this year so we bump the copyright year 2008-01-28 11:56:13 +00:00
Daniel Stenberg
87fdfe770d Dmitry Kurochkin: In "real world" testing I found more bugs in
pipelining. Broken connection is not restored and we get into infinite
loop. It happens because of wrong is_in_pipeline values.
2008-01-27 22:53:09 +00:00
Daniel Stenberg
c6df788866 - Kevin Reed filed bug report #1879375
(http://curl.haxx.se/bug/view.cgi?id=1879375) which describes how libcurl
  got lost in this scenario: proxy tunnel (or HTTPS over proxy), ask to do any
  proxy authentication and the proxy replies with an auth (like NTLM) and then
  closes the connection after that initial informational response.

  libcurl would not properly re-initialize the connection to the proxy and
  continue the auth negotiation like supposed. It does now however, as it will
  now detect if one or more authentication methods were available and asked
  for, and will thus retry the connection and continue from there.

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

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

The default SOCKS5 proxy is again back to sending the IP address to the
proxy.  The new curl command line option for enabling sending host name to a
SOCKS5 proxy is now --socks5-hostname.
2008-01-05 22:04:18 +00:00
Daniel Stenberg
2e42b0a252 Based on Maxim Perenesenko's patch, we now do SOCKS5 operations and let the
proxy do the host name resolving and only if --socks5ip (or
CURLOPT_SOCKS5_RESOLVE_LOCAL) is used we resolve the host name locally and
pass on the IP address only to the proxy.
2008-01-04 23:01:00 +00:00
Gisle Vanem
083d3190e5 'false' and 'true' are not built-ins on most compilers.
Use TRUE/FALSE from setup_once.h.
2008-01-03 15:18:27 +00:00
Daniel Stenberg
d9023c16ab - I fixed two cases of missing return code checks when handling chunked
decoding where a write error (or abort return from a callback) didn't stop
  libcurl's processing.
2008-01-02 22:30:34 +00:00
Daniel Stenberg
a46b40b7fd Richard Atterer brought a patch that added support for SOCKS4a proxies, which
is an inofficial PROXY4 variant that sends the hostname to the proxy instead
of the resolved address (which is already supported by SOCKS5).  --socks4a is
the curl command line option for it and CURLOPT_PROXYTYPE can now be set to
CURLPROXY_SOCKS4A as well.
2008-01-02 21:40:11 +00:00
Daniel Stenberg
04e4d9a0b3 Dmitry Kurochkin mentioned a flaw
(http://curl.haxx.se/mail/lib-2007-12/0252.html) in detect_proxy() which
failed to set the bits.proxy variable properly when an environment variable
told libcurl to use a http proxy.
2007-12-26 23:29:35 +00:00
Gunter Knauf
4e8c4fc80b added missing semicolon fromn last commit. 2007-12-25 13:26:01 +00:00
Daniel Stenberg
fc1d1ea934 Gary Maxwell filed bug report #1856628
(http://curl.haxx.se/bug/view.cgi?id=1856628) and provided a fix for the
(small) memory leak in the SSL session ID caching code. It happened when a
previous entry in the cache was re-used.
2007-12-24 23:45:48 +00:00
Yang Tse
07a1857d59 MSVC 9.0 (VS2008) does not support Windows build targets prior to WinXP,
and makes wrong asumptions of build target when it isn't specified. So,
if no build target has been defined we will target WinXP when building
with MSVC 9.0 (VS2008).
2007-12-18 18:08:19 +00:00
Yang Tse
f4ffa85f60 pollfd struct and WSA_poll fixes for Windows Vista already present in CVS 2007-12-18 10:36:32 +00:00
Daniel Stenberg
bcd7d03b3b Mateusz Loskot pointed out that VC++ 9.0 (2008) has the pollfd struct and
defines in the SDK somehow differently so we have to add a define to the
config-win32.h file to make select.h compile nicely.
2007-12-17 21:19:42 +00:00
Daniel Stenberg
7b1a22147e David Wright filed bug report #1849764
(http://curl.haxx.se/bug/view.cgi?id=1849764) with an included fix. He
identified a problem for re-used connections that previously had sent
Expect: 100-continue and in some situations the subsequent POST (that didn't
use Expect:) still had the internal flag set for its use. David's fix (that
makes the setting of the flag in every single request unconditionally) is
fine and is now used!
2007-12-13 10:00:06 +00:00
Daniel Stenberg
b0b40d9a00 Andrew Moise filed bug report #1847501
(http://curl.haxx.se/bug/view.cgi?id=1847501) and pointed out a memcpy()
that should be memmove() in the convert_lineends() function.
2007-12-09 22:31:53 +00:00
Gisle Vanem
2b314064ae Removed building 'libcurl_wc.lib' as this isn't a static-library
in the common sense. Renamed 'OBJ_DIR' to 'WC_Win32.obj'.
2007-12-09 09:44:05 +00:00
Daniel Stenberg
662bee7193 All static functions that were previously name Curl_* something no longer
use that prefix as we use that prefix only for library-wide internal global
symbols.
2007-12-08 22:50:55 +00:00
Daniel Stenberg
7d3ea12b62 Spacen Jasset reported a problem with doing POST (with data read with a
callback) over a proxy when NTLM is used as auth with the proxy. The bug
also concerned Digest and was limited to using callback only. Spacen worked
with us to provide a useful patch. I added the test case 547 and 548 to
verify two variations of POST over proxy with NTLM.
2007-12-05 21:20:14 +00:00
Yang Tse
8fa599215b Fix compiler warning: variable may be used uninitialized 2007-12-04 00:15:03 +00:00
Daniel Stenberg
5c447f2499 Bug report #1842029 (http://curl.haxx.se/bug/view.cgi?id=1842029) identified
a problem with SSL session caching that prevent it from working, and the
associated fix!
2007-12-03 11:48:09 +00:00
Daniel Stenberg
2be50baf97 Now libcurl (built with OpenSSL) doesn't return error anymore if the remote
SSL-based server doesn't present a certificate when the request is told to
ignore certificate verification anyway.
2007-12-03 11:39:27 +00:00
Daniel Stenberg
1c93e75375 Michal Marek introduced CURLOPT_PROXY_TRANSFER_MODE which is used to control
the appending of the "type=" thing on FTP URLs when they are passed to a
HTTP proxy. Some proxies just don't like that appending (which is done
unconditionally in 7.17.1), and some proxies treat binary/ascii transfers
better with the appending done!
2007-12-02 23:38:23 +00:00
Daniel Stenberg
45a2240ead A bug report on the curl-library list showed a HTTP Digest session going on
with a 700+ letter nonce. Previously libcurl only support 127 letter ones
and now I bumped it to 1023.
2007-11-29 22:14:48 +00:00
Daniel Stenberg
f75ba55b51 Fixed the resumed FTP upload loop to not require that the read callback
returns a full buffer on each invoke.
2007-11-29 22:14:33 +00:00
Daniel Stenberg
46e6115d72 include the libssh2 return code in the output for these failures to ease
debugging
2007-11-29 11:25:10 +00:00
Daniel Stenberg
162c039e9d reqdata doesn't exist anymore and the path moved to the UrlState struct 2007-11-24 23:18:21 +00:00
Daniel Stenberg
13648f8ccd struct HandleData is now called struct SingleRequest, and is only for data that
is inited at the start of the DO action. I removed the Curl_transfer_keeper
struct completely, and I had to move out a few struct members (that had to
be set before DO or used after DONE) to the UrlState struct. The SingleRequest
struct is accessed with SessionHandle->req.

One of the biggest reasons for doing this was the bunch of duplicate struct
members in HandleData and Curl_transfer_keeper since it was really messy to
keep track of two variables with the same name and basically the same purpose!
2007-11-24 23:16:55 +00:00
Daniel Stenberg
cb04619de2 Make the do_complete() function not get called until the DO actually is
compelete, which bascially means when used with the multi interface
2007-11-21 22:37:55 +00:00
Daniel Stenberg
b6575ce0b0 While inspecting the Negotiate code, I noticed how the proxy auth was using
the same state struct as the host auth, so both could never be used at the
same time! I fixed it (without being able to check) to use two separate
structs to allow authentication using Negotiate on host and proxy
simultanouesly.
2007-11-20 23:17:08 +00:00
Daniel Stenberg
86956c2261 white space changes only to clean up indent and source width 2007-11-20 23:02:58 +00:00
Daniel Stenberg
ef6dfdc7fd remove the unconditional enabling of cookies if you set a share to use! 2007-11-20 22:59:10 +00:00
Daniel Stenberg
f3b85ef79d a bunch of new comments 2007-11-20 22:57:24 +00:00
Daniel Stenberg
2f928797cf fix the treatment of the parameter-based precision, as in "%.*s%s" as
previously the second %s would wrongly get the numerical argument that is used
for the variable precision for the first %s...
2007-11-20 10:03:33 +00:00
Daniel Stenberg
0561bffab3 I think this is the right fix for other non-OpenSSL libs, based on the NSS fix
from the other day. It is time to setup the internal SSL libs and treat them
with a "handler" struct similar to how we deal with the protocols these days...
2007-11-19 09:24:24 +00:00
Gunter Knauf
5be00c95a7 removed now obsolete defines;
updated external library versions to latest.
2007-11-18 22:48:39 +00:00
Daniel Stenberg
c80b9c3778 Rob Crittenden fixed SSL connections with NSS done with the multi-interface 2007-11-18 09:45:05 +00:00
Yang Tse
4f05613fbb Fix unsigned integral math check in add_buffer_send() 2007-11-16 01:19:46 +00:00
Daniel Stenberg
22e52ddd6e Ates Goral identified a problem in http.c:add_buffer_send() when a debug
callback was used, as it could wrongly pass on a bad size for the outgoing
HTTP header. The bad size would be a very large value as it was a wrapped
size_t content. This happened when the whole HTTP request failed to get sent
in one single send.  http://curl.haxx.se/mail/lib-2007-11/0165.html
2007-11-15 23:42:21 +00:00
Daniel Stenberg
1125d45397 removed unnecessary check from add_buffer_send() that only was made within
#ifdef CURL_DOES_CONVERSIONS anyway! I turned it into a DEBUGASSERT() instead.
2007-11-15 23:30:59 +00:00
Daniel Stenberg
50feea3eef Rearranged code and changed Curl_readwrite_init() and Curl_pre_readwrite() into
do_init() and do_complete() which now are called first and last in the DO
function. It simplified the flow in multi.c and the functions got more
sensible names!
2007-11-15 21:45:45 +00:00
Daniel Stenberg
4e731a0189 Make the Transfer() function return earlier without doing any initializations
for the cases where there's nothing to do in here, like for SFTP directory
listings that already is complete when this function gets called. The init
stuff clears byte counters which isn't really desired.
2007-11-15 11:03:02 +00:00
Daniel Stenberg
5c8b973d4f use the existing variable instead 2007-11-14 22:44:30 +00:00
Daniel Stenberg
b22e03b2b2 Fix how TFTP connections are treated when re-used, if the SessionHandle has
been used for other protocols in between. I found this when test 2004 started
to fail for me!
2007-11-14 22:41:42 +00:00
Yang Tse
a2926ebe7c Fix a variable potential wrapping in add_buffer() when using absolutely
huge send buffer sizes
2007-11-14 00:48:11 +00:00
Daniel Stenberg
c508d70258 Fixed a remaining problem with doing SFTP directory listings on a re-used
persistent connection. Mentioned by Immanuel Gregoire on the mailing list.
2007-11-12 23:04:44 +00:00
Daniel Stenberg
f5971f54ff comment language 2007-11-12 21:42:20 +00:00
Daniel Stenberg
c5b16d4468 Bug report #1830637 (http://curl.haxx.se/bug/view.cgi?id=1830637), which was
forwarded from the Gentoo bug tracker by Daniel Black and was originally
submitted by Robin Johnson, pointed out that libcurl would do bad memory
references when it failed and bailed out before the handler thing was
setup. My fix is not done like the provided patch does it, but instead I
make sure that there's never any chance for a NULL pointer in that struct
member.
2007-11-12 21:38:43 +00:00
Daniel Stenberg
3c71a1bab7 oops, fixed build when CURL_LIBSSH2_DEBUG is defined 2007-11-12 09:24:05 +00:00
Yang Tse
9a39839a43 Some versions of winsock2.h have pollfd struct and constants 2007-11-10 04:23:15 +00:00
Yang Tse
e87c996fe0 Fix compiler warning: integral size mismatch in argument 2007-11-08 19:28:25 +00:00
Yang Tse
32195c673d Define WIN32 when build target is Win32 API.
This also defines it for WinCE even though it is a subset of WIN32.
2007-11-08 18:13:54 +00:00
Yang Tse
b99a61c5b0 Fix compiler warning: may be used uninitialized 2007-11-08 16:43:01 +00:00
Daniel Stenberg
a29471d0f7 spell! 2007-11-08 10:25:23 +00:00
Daniel Stenberg
ba6f20a244 Bug report #1823487 (http://curl.haxx.se/bug/view.cgi?id=1823487) pointed
out that SFTP requests didn't use persistent connections. Neither did SCP
ones.  I gave the SSH code a good beating and now both SCP and SFTP should
use persistent connections fine. I also did a bunch for indent changes as
well as a bug fix for the "keyboard interactive" auth.
2007-11-08 10:22:49 +00:00
Yang Tse
dee3844f13 MSVC versions prior to VS2005 do not complain about portable C functions 2007-11-07 18:18:42 +00:00
Daniel Stenberg
cbd1a77ec2 if () => if()
while () => while()
and some other minor re-indentings
2007-11-07 09:21:35 +00:00
Dan Fandrich
33f7ac06c3 Improved telnet support by drastically reducing the number of write
callbacks needed to pass a buffer to the user.  Instead one per byte it
is now as little as one per segment.
2007-11-07 05:52:03 +00:00
Gisle Vanem
66e4d391d3 Added prototype for _strtoi64(). 2007-11-06 16:20:54 +00:00
Gisle Vanem
caf880be18 Constified from arguments. 2007-11-06 16:20:04 +00:00
Daniel Stenberg
ad6e28073c removed space after if and while before the parenthesis for better source code
consistency
2007-11-05 09:45:09 +00:00
Daniel Stenberg
b9a7f4e502 Move connection-oriented variables from the SessionHandle struct to the
connectdata struct. This will in theory enable us to do persistent connections
with SCP+SFTP, but currently the state machine always (and wrongly) cleanup
everything in the 'done' action instead of in 'disconnect'. Also did a bunch
of indent fixes, if () => if() and a few other source cleanups like added
comments etc.
2007-11-05 09:30:45 +00:00
Daniel Stenberg
51009a40b4 make sure the code deals with failures on the DO_MORE state properly 2007-11-03 14:44:38 +00:00
Daniel Stenberg
2ec8f77f21 avoid setting up a transfer when the state machine failed previously 2007-11-02 23:34:00 +00:00
Daniel Stenberg
d34fe06fb0 minor re-indent 2007-11-01 21:43:56 +00:00
Gisle Vanem
c56c4a0a47 Add support for LDAP urls. Allthough the OpenWatcom
headers <winlap.h> and <winber.h> defines wrong calling convention.
2007-10-31 10:58:51 +00:00
Gisle Vanem
45064c5778 Added optional use of zlib (USE_ZLIB=1).
Use a response-file for the C-compiler.
2007-10-31 10:20:48 +00:00
Dan Fandrich
59b05ac383 Fixed an OOM problem with file: URLs
Moved Curl_file_connect into the protocol handler struct.
2007-10-30 23:00:40 +00:00
Dan Fandrich
0f77fe55b6 Reverted the const change--what was I thinking? 2007-10-29 20:57:03 +00:00
Dan Fandrich
68ee002ad0 Made some pointers const 2007-10-29 18:32:20 +00:00
Daniel Stenberg
e5f1499f62 let 7.17.1 be version-info 4:1:0 2007-10-29 10:19:07 +00:00
Gisle Vanem
848f40fd65 OpenWatcom cannot use wldap32.lib (wrong calling convention?).
Added generation of dummy ca-bundle.h. Sorted objects.
2007-10-28 12:02:20 +00:00
Dan Fandrich
d3ee83747c Fixed a valgrind uninitialized variable error. 2007-10-26 19:26:41 +00:00
Yang Tse
07dbfa25a0 typecast to prevent compiler warning 2007-10-26 01:12:33 +00:00
Daniel Stenberg
6a17cae4f6 Made libcurl built with NSS possible to ignore the peer verification.
Previously it would fail if the ca bundle wasn't present, even if the code
ignored the verification results.
2007-10-25 21:08:55 +00:00
Daniel Stenberg
4b96ac504c prevent compiler warnings about shadowing and one case of unused variable 2007-10-25 20:54:46 +00:00
Daniel Stenberg
ca67dcbc05 Don't assume there's a sessionhandle around when a connection is disconnected,
so do the data->reqdata.current_conn assignment when we know there is an easy
handle existing! Fixes the valgrind report on test 509.
2007-10-25 09:41:35 +00:00
Daniel Stenberg
9dbc2c827d fix the check 2007-10-25 09:34:16 +00:00
Daniel Stenberg
91e27ce755 Fixed a TFTP memory leak. Enabled test 2003 to verify this. 2007-10-25 07:47:38 +00:00
Daniel Stenberg
8997d258f7 Curl_ftp_disconnect() no longer relies on anything in the reqdata struct. That
was even mentioned to be bad in a comment! Should make test 2000 and 2001 work
fine.

Also, freedirs() now take a ftp_conn struct pointer which saves some extra
unnecessary variable assignments.
2007-10-24 21:14:11 +00:00
Daniel Stenberg
a3f958aaaa added clarifying comment 2007-10-24 21:09:59 +00:00
Yang Tse
08c5e2a194 Windows build targets have socklen_t definition in ws2tcpip.h but some
versions of ws2tcpip.h do not have the definition. It seems that when
the socklen_t definition is missing from ws2tcpip.h the definition for
INET_ADDRSTRLEN is also missing, and that when one definition is present
the other one also is available.
2007-10-24 14:39:07 +00:00
Daniel Stenberg
949ff9715a Bug report #1812190 (http://curl.haxx.se/bug/view.cgi?id=1812190) points out
that libcurl tried to re-use connections a bit too much when using non-SSL
protocols tunneled over a HTTP proxy.
2007-10-23 21:00:51 +00:00
Yang Tse
b9a305983f File is not a protocol that can deal with "persistancy" 2007-10-23 15:16:46 +00:00
Yang Tse
e550df675a Fix compiler warning: subscript has type `char' 2007-10-23 10:14:24 +00:00
Daniel Stenberg
5b358603bd Michal Marek forwarded the bug report
https://bugzilla.novell.com/show_bug.cgi?id=332917 about a HTTP redirect to
FTP that caused memory havoc. His work together with my efforts created two
fixes:

#1 - FTP::file was moved to struct ftp_conn, because is has to be dealt with
     at connection cleanup, at which time the struct HandleData could be
     used by another connection.
     Also, the unused char *urlpath member is removed from struct FTP.

#2 - provide a Curl_reset_reqproto() function that frees
     data->reqdata.proto.* on connection setup if needed (that is if the
     SessionHandle was used by a different connection).
2007-10-22 15:05:35 +00:00
Daniel Stenberg
1056dc9a26 Bug report #1815530 (http://curl.haxx.se/bug/view.cgi?id=1815530) points out
that specifying a proxy with a trailing slash didn't work (unless it also
contained a port number).
2007-10-22 09:25:45 +00:00
Yang Tse
7fe89c5d29 We use this ZERO_NULL to avoid picky compiler warnings,
when assigning a NULL pointer to a function pointer var.
2007-10-20 15:47:16 +00:00
Yang Tse
5c8fc7dce9 Fix compiler warning: conversion from "int" to "unsigned short" may lose significant bits 2007-10-20 15:11:51 +00:00
Patrick Monnerat
8f5909b664 Allow CURLOPT_COPYPOSTFIELDS with explicit data size = 0 2007-10-18 10:54:49 +00:00
Dan Fandrich
bef2e7f2ff Avoid a NULL pointer dereference in an OOM condition. 2007-10-18 01:04:57 +00:00
Yang Tse
0164f0cf81 Fix overflow detection, take four. Avoiding zero size malloc. 2007-10-17 19:29:06 +00:00