On Wed, 2008-12-10 at 13:35 -0500, Dale Worley wrote:
> 2. Distinguish between Authorization and Proxy-Authorization by
> splitting the method into two (or using an indicator argument).  This
> requires that every calling application decide whether it examines
> Authorization or Proxy-Authorization headers.  (The SIP architecture
> assumes that UAs use the former and proxies use the latter.)  This can
> lead to a UA being demanded for authentication more than once (once for
> proxies and once for UAs), but it appears that existing UAs handle this
> correctly.

Looking at the code more closely, it appears that option 2 has been
installed into the code with rev. 11420, *except* for the method
getDigestAuthorizationData itself -- the applications that call it all
provide an argument declaring themselves to be a proxy or a UA.

If this is correct, the attached diff should complete the work of rev.
11420 and fix XECS-1983.

Dale

Index: sipXtackLib/src/net/HttpMessage.cpp
===================================================================
--- sipXtackLib/src/net/HttpMessage.cpp	(revision 14225)
+++ sipXtackLib/src/net/HttpMessage.cpp	(working copy)
@@ -2929,12 +2929,15 @@
 {
 
    const char* value = NULL;
-   value = getHeaderValue(index, HTTP_PROXY_AUTHORIZATION_FIELD);
-
-   if(!value)
+   if (authorizationEntity == SERVER)
    {
       value = getHeaderValue(index, HTTP_AUTHORIZATION_FIELD);
    }
+   else if (authorizationEntity == PROXY)
+   {
+      value = getHeaderValue(index, HTTP_PROXY_AUTHORIZATION_FIELD);
+   }
+
    if(value)
    {
       NetAttributeTokenizer tokenizer(value);
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to