chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1180029 - /chemistry/dotcmis/trunk/DotCMIS/binding/binding-intf.cs
Date Fri, 07 Oct 2011 13:05:27 GMT
Author: fmui
Date: Fri Oct  7 13:05:26 2011
New Revision: 1180029

URL: http://svn.apache.org/viewvc?rev=1180029&view=rev
Log:
CMIS-436: fixed basic auth

Modified:
    chemistry/dotcmis/trunk/DotCMIS/binding/binding-intf.cs

Modified: chemistry/dotcmis/trunk/DotCMIS/binding/binding-intf.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/binding-intf.cs?rev=1180029&r1=1180028&r2=1180029&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/binding-intf.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/binding-intf.cs Fri Oct  7 13:05:26 2011
@@ -91,7 +91,10 @@ namespace DotCMIS.Binding
             {
                 if (user != null || password != null)
                 {
-                    request.Credentials = new NetworkCredential(user ?? "", password ?? "");
+                    if (request.Headers.GetValues("Authorization") == null)
+                    {
+                        request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes((user
?? "") + ":" + (password ?? ""))));
+                    }
                 }
                 return;
             }



Mime
View raw message