W3C home > Mailing lists > Public > www-lib@w3.org > July to September 2001

HTAlert callback problems / questions

From: Oliver Steinau <Oliver.Steinau@STencode.de>
Date: Mon, 20 Aug 2001 09:22:46 +0200
Message-ID: <2B88AE35C609DF4F852D31FFA6FD5EE601A38B@CAESAR.STencode.de>
To: <www-lib@w3.org>
(using 5.3.2)
Here's my problem: I'm using libwww under Win2K as a DLL, and I'm
writing a C++-wrapper around it, that itself resides in a different DLL.
And I'm having problems with the authentication callback.
At first I experimented by changing the LoadFile.c example; I just added

        HTAlert_add(authCallback, HT_A_USER_PW);
before the call to HTLoadToFile(), requested a page that requires
authentication, and the callback gets called no problem.
Then I moved the code to my wrapper, requested the same page -- and the
callback is never called!! I have no idea whatsoever as to where there
could be a difference between the two situations. At first I thought
it's because the callback is in a DLL, but I have another callback
        HTAlert_add(replaceCallback, HT_A_CONFIRM);
so that I automatically reply "YES" to replace the given file, and this
callback *IS* called, even in my wrapper DLL (during the same call where
the authentication callback is *NOT* called)... weird.

I remembered James mentioning that he had the same problems with the
"global" filters. But as far as I understand, when I register an
authentication callback (for HT_NO_ACCESS or HT_NO_PROXY_ACCESS), this
is only a notification, so that I have to re-issue the request after
setting the credentials needed. That's why I thought a global filter
would be more efficient, because there you can set the credentials "on
the fly", and they are cached for that realm.

Also, what about FTP? Do I have to set user/password for ftp calls
before I issue the request? It seems I can do that in a global filter
also "on the fly", but how do I do it when I have a per-request
callback?

Any help would be greatly appreciated!

TIA,

/oliver
Received on Monday, 20 August 2001 03:23:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:39 GMT