AW: HTAlert callback problems / questions

Found the bug... I had registered a callback with the request using
                HTRequest_addAfter(req, terminateCallback, NULL, NULL,
HT_ALL, HT_FILTER_LAST, TRUE);
, and in this filter I did a HTEventList_stopLoop... so it really didn't
have a chance to call the authentication filter.....

sorry if I caused confusion...

/oliver

-----Ursprüngliche Nachricht-----
Von: Oliver Steinau 
Gesendet: Montag, 20. August 2001 09:23
An: www-lib@w3.org
Betreff: HTAlert callback problems / questions


(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 07:23:02 UTC