Daniel Stenberg | 1 Aug 01:58 2003
Picon

ares portability patch

Hi Greg and friends,

I've pretty much made libcurl capable of using ares for name resolves now, and
things look fine.

Today I looked over the vivisimo.com guys' windows patch of ares, and I
cleaned it up somewhat (a little less #ifdefs). I also took care of David
Remahl's remark to make it build on Mac OS X (by adding a little configure
check for the header in question). I haven't actually tested it on OS X yet,
but I hope someone else will help me do that.

This patch is an attempt to sum up the fixes in one main diff against the
1.1.1 release, and I've just now made it available from here:

	http://curl.haxx.se/dev/ares-1.1.1.diff

31010 bytes, 23 files patched.

--

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

John Barker | 1 Aug 07:12 2003

Issues with libCurl and OpenSSL

Folks,

I've been using libCurl with OpenSSL for a little while now in a 
resident service for Windows platforms. Every so often it requires to 
POST some data to a webserver of ours using SSL. I noticed recently that 
this service was growing in size very slowly, after 5 days it had 
reached a resident size of 120mb from 2mb. Memory leaks!

So I went through some debugging, looked at all my code and ran some 
tests. Found some memory leaks, none of them had recorded filenames - 
thus I was certain they weren't in my code. I commented out where I was 
using libCurl, the memory leaks went away. So I turned on libCurl memory 
debugging, nothing found. Then I turned off USE_SSLEAY when compiling 
libCurl. No memory leaks.

At this point I'm wondering, is there a proper way to clean up libCurl 
to ensure that it frees any SSL resources? I'm just using a 
curl_easy_init() and curl_easy_cleanup() at the moment.

Cheers,
John

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

Daniel Stenberg | 1 Aug 09:55 2003
Picon

Re: building curl 7.10.6 under MSVC 6

On Thu, 31 Jul 2003, David Byron wrote:

> Wish I would have gotten to this before 7.10.6 arrived, but so be it.

Well, I published numerous pre-releases before the public one and I requested
help on the windows build part several times before I did the release. I
expected this, but I don't think it's such a big deal.

> For now, I'm leaving a few intermediate details.  I get the lib directory to
> build all the way through.  In the src directory, I ran into these problems:

> 2. the compiler couldn't find zlib.h.  I think I've got that covered.  See
> the attached patch.

It was not my intension to ship the compressed version of hugehelp.c like
this. In the future, the uncompressed version will be the default one included
in the source archive.

> To be complete, docs/INSTALL needs some new text as well.  I've attached a
> patch that contains my attempt.

Thanks! Both your patches were just applied and committed.

--

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
(Continue reading)

Daniel Stenberg | 1 Aug 10:18 2003
Picon

Re: Issues with libCurl and OpenSSL

On Fri, 1 Aug 2003, John Barker wrote:

> I've been using libCurl with OpenSSL for a little while now in a resident
> service for Windows platforms. Every so often it requires to POST some data
> to a webserver of ours using SSL. I noticed recently that this service was
> growing in size very slowly, after 5 days it had reached a resident size of
> 120mb from 2mb. Memory leaks!

Ough.

> So I went through some debugging, looked at all my code and ran some tests.
> Found some memory leaks, none of them had recorded filenames - thus I was
> certain they weren't in my code. I commented out where I was using libCurl,
> the memory leaks went away. So I turned on libCurl memory debugging, nothing
> found. Then I turned off USE_SSLEAY when compiling libCurl. No memory leaks.

Nice move on the USE_SSLEAY testing.

> At this point I'm wondering, is there a proper way to clean up libCurl to
> ensure that it frees any SSL resources? I'm just using a curl_easy_init()
> and curl_easy_cleanup() at the moment.

curl_easy_cleanup() should of course cleanup most(*) resources libcurl has in
use and if things work correctly it shouldn't leak memory when used this way.

There's also the risk that OpenSSL has a leak in itself that libcurl cannot
affect, even though I'm suspecting an SSL resource left allocated somewhere in
the libcurl code.

libcurl version? OpenSSL version? There was a known memory leak in all libcurl
(Continue reading)

Daniel Stenberg | 1 Aug 15:56 2003
Picon

Re: [REPOST] buildconf for Windows?

On Wed, 30 Jul 2003, Early Ehlinger wrote:

> Sorry for the slow response.

No worries.

> I'm not sure exactly what I'm reading in the attached log, but it looks to
> me like the configure script isn't checking for libws2_32 when it checks for
> socket support.  I assume that's why it's checking for gethostbyname,
> anyways.

No, it checks for gethostbyname to figure out if it needs any particular libs
to use it. Some systems do.

Around line 900 you can see the test program configure generates and compiles
to see if gethostbyname works with no extra libs, and that it fails.

Can you make a stand-alone c program like that and figure out what mingw needs
in order to make it compile?

> If anybody knows how to add libws2_32 to the list of libraries that
> configure checks, I'd be willing to bet we'd be one step closer to
> supporting ./configure && make && make install for MinGW.

I know how.

For an easy test, just change the line in configure.ac (around line 246) that
checks for gethostbyname in the nsl lib, to instead check for it in the
libws2_32. Then run autoconf and re-run configure.

(Continue reading)

Joerg Mueller-Tolk | 1 Aug 15:59 2003
Picon

NTLM with proxy && minor typos

Hi all

Is it possible that the password callback is not called for 
authentification at the proxy?

Unfortunately I told my boss 7.10.6 would be able to authenticate with 
NTLM at a proxy.
How far are we currently from a stable version with does this?

Here are some minor corrections
I hope this is the format Daniel prefers:

In file curl-7.10.6\docs\MANUAL
 <at>  <at>  -243,7 +243,7  <at>  <at> 

   To post to this, you enter a curl command line like:

-        curl -d "user=foobar&pass=12345&id=blablabla&dig=submit"  
(continues)
+        curl -d "user=foobar&pass=12345&id=blablabla&ding=submit"  
(continues)
           http://www.formpost.com/getthis/post.cgi

In file curl-7.10.6/docs/libcurl/curl_easy_setopt.html
 <at>  <at>  -166,6 +166,8  <at>  <at> 
        <B>CURLOPT_PASSWDFUNCTION</B>
            Pass a pointer to a 
<I>curl</I><B>_</B><I>passwd</I><B>_</B><I>callback</I> function that
            will  be called instead of the internal one if libcurl
+           requests  a password.  The function  must  match  this
(Continue reading)

Daniel Stenberg | 1 Aug 16:20 2003
Picon

Re: NTLM with proxy && minor typos

On Fri, 1 Aug 2003, Joerg Mueller-Tolk wrote:

> Is it possible that the password callback is not called for authentification
> at the proxy?

Is it? It is supposed to be called in the same style it gets called for normal
auth.

> Unfortunately I told my boss 7.10.6 would be able to authenticate with NTLM
> at a proxy. How far are we currently from a stable version with does this?

Not that far. Serge Semashko's patch did make it work, but not really done the
nicest way so I'm waiting for his update. The NTLM code itself works for
proxies, it just needs to be used properly.

> In file curl-7.10.6\docs\MANUAL

Applied.

> In file curl-7.10.6/docs/libcurl/curl_easy_setopt.html

I prefer changes to the .3 file, and in this case it also proved that the .3
file is correct and it is the HTLM translation of that file that goes wrong.
:-/ I need to bugfix that manpage-to-HTML conveter program.

--

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
(Continue reading)

Serge Semashko | 1 Aug 20:54 2003
Picon

Re[2]: NTLM with proxy && minor typos

Hello Daniel,

Friday, August 01, 2003, 5:20:20 PM, you wrote:

>> Unfortunately I told my boss 7.10.6 would be able to authenticate with NTLM
>> at a proxy. How far are we currently from a stable version with does this?

DS> Not that far. Serge Semashko's patch did make it work, but not really done the
DS> nicest way so I'm waiting for his update. The NTLM code itself works for
DS> proxies, it just needs to be used properly.

Here is the update to NTLM proxy patch, it adds CURLOPT_PROXYAUTH
option similar to CURLOPT_HTTPAUTH.
It is not complete but I hope it does not break anything. The old code
for proxy basic authentication is still used when only CURLAUTH_BASIC
flag is set in CURLOPT_PROXYAUTH option (it is the default value).
Only NTLM authentication for proxies is supported with the new code
(digest, basic, and the others are still to add).

I successfully managed to access digest authenticated web server
through NTLM proxy with this patch. But it still probably needs more
testing with different proxy/web authentication configurations and
your review just to be sure it does not break anything.
Attachment (ntlm-proxy2.diff): application/octet-stream, 10 KiB
Duncan Wilcox | 1 Aug 21:43 2003
Picon

Re: Issues with libCurl and OpenSSL

> Then I turned off USE_SSLEAY when compiling libCurl. No memory leaks.

There is a memory leak in OpenSSL up to 0.9.6h:

http://www.mail-archive.com/openssl-dev <at> openssl.org/msg15130.html

I'm not sure if this would affect the client side SSL code curl uses, 
it did affect server side SSL code in a project of mine.

Duncan

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

Duncan Wilcox | 1 Aug 22:14 2003
Picon

Re: ares portability patch

> I haven't actually tested it on OS X yet,
> but I hope someone else will help me do that.

Here I'm on 10.2.6 with the latest developer tools update and gcc 3.3 
(also tested with gcc 3.1), the first problem is with the provided 
configure:

checking host system type... configure: error: can not guess host type; 
you must specify one

Getting updated config.guess and config.sub fixes that.

A number of sources have this kind of problem:

ares_expand_name.c:82: error: `INDIR_MASK' undeclared (first use in 
this function)

I'm not sure what the problem is, my system does have 
/usr/include/arpa/nameser.h, but the guard HAVE_... around the #include 
<arpa/nameser.h> is preventing inclusion, maybe there's some configure 
problem (there's no config.h with HAVE_ stuff and no HAVE_ seems to be 
passed on the command line).

Adding a -DHAVE_ARPA_NAMESER_H to the makefile gets it to compile 
correctly.

In adig.c:

adig.c:105: `T_SRV' undeclared here (not in a function)

(Continue reading)


Gmane