Hello,

i found an unwanted behavoir related to the WebDav notifications and
authorization.
The problem is that the "SUBSCRIBE"  method is called twice. The first
time without the "Authorization:" header, and only when a HTTP/1.1 401
Unauthorized
response was received then the "Authorization:" header is inserted to
the request.
The same thing happens for every "POLL" and  "UNSUBSCRIBE" method too.

Is this a normal behavoir?  Does somebody know what do i have to
change to have the "Authorization" header included the first time into
the requests?

Thank you.

I am using the following code fragment to create a subscribtion:
                        
                         success = true;
                        HttpURL rootUrl = davManager.getCurrentURL();
                        UsernamePasswordCredentials credentials = new
UsernamePasswordCredentials(rootUrl.getUser(), rootUrl.getPassword());
                        
                        listener = new NotificationListener("", 0, 
                                davManager.getRepositoryHost(), 
                                davManager.getRepositoryPort(), 
                                Protocol.getProtocol("http"), 
                                credentials, 
                                davManager.getProjectRootPath(), 
                                pollInterval, false);
        
                        success = listener.subscribe("Update/newmember", "",
DepthSupport.DEPTH_INFINITY,
                                pollInterval, 100, newMemberSubscriber, 
credentials);
                        
                        success = success?listener.subscribe("Delete", "",
DepthSupport.DEPTH_INFINITY,
                                pollInterval, 100, deleteSubscriber,
credentials):false;

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to