hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1494747 - in /httpcomponents/httpclient/trunk: RELEASE_NOTES.txt httpclient/src/main/java/org/apache/http/auth/NTUserPrincipal.java httpclient/src/test/java/org/apache/http/auth/TestCredentials.java
Date Wed, 19 Jun 2013 19:39:44 GMT
Author: olegk
Date: Wed Jun 19 19:39:44 2013
New Revision: 1494747

URL: http://svn.apache.org/r1494747
Log:
HTTPCLIENT-1377: User principal for non-NTLM authentication is incorrectly generated when
using user credentials are specified as NTCredentials

Modified:
    httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/NTUserPrincipal.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/auth/TestCredentials.java

Modified: httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/RELEASE_NOTES.txt?rev=1494747&r1=1494746&r2=1494747&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpclient/trunk/RELEASE_NOTES.txt Wed Jun 19 19:39:44 2013
@@ -1,3 +1,12 @@
+Changes since release 4.3 BETA2
+-------------------
+
+* [HTTPCLIENT-1377] User principal for non-NTLM authentication is incorrectly generated when
using 
+  user credentials are specified as NTCredentials
+  Contributed by Gary Gregory <ggregory at apache.org>
+
+
+
 Release 4.3 BETA2
 -------------------
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/NTUserPrincipal.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/NTUserPrincipal.java?rev=1494747&r1=1494746&r2=1494747&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/NTUserPrincipal.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/NTUserPrincipal.java
Wed Jun 19 19:39:44 2013
@@ -62,7 +62,7 @@ public class NTUserPrincipal implements 
         if (this.domain != null && this.domain.length() > 0) {
             final StringBuilder buffer = new StringBuilder();
             buffer.append(this.domain);
-            buffer.append('/');
+            buffer.append('\\');
             buffer.append(this.username);
             this.ntname = buffer.toString();
         } else {

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/auth/TestCredentials.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/auth/TestCredentials.java?rev=1494747&r1=1494746&r2=1494747&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/auth/TestCredentials.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/auth/TestCredentials.java
Wed Jun 19 19:39:44 2013
@@ -70,7 +70,7 @@ public class TestCredentials {
         Assert.assertEquals(new NTUserPrincipal("DOMAIN", "name"),
                 creds1.getUserPrincipal());
         Assert.assertEquals("pwd", creds1.getPassword());
-        Assert.assertEquals("[principal: DOMAIN/name][workstation: LOCALHOST]",
+        Assert.assertEquals("[principal: DOMAIN\\name][workstation: LOCALHOST]",
                 creds1.toString());
         final NTCredentials creds2 = new NTCredentials(
                 "name", null, null, null);
@@ -86,7 +86,7 @@ public class TestCredentials {
         Assert.assertEquals(new NTUserPrincipal("DOMAIN", "name"),
                 creds3.getUserPrincipal());
         Assert.assertEquals("pwd", creds3.getPassword());
-        Assert.assertEquals("[principal: DOMAIN/name][workstation: null]",
+        Assert.assertEquals("[principal: DOMAIN\\name][workstation: null]",
                 creds3.toString());
         final NTCredentials creds4 = new NTCredentials(
             "domain/name");
@@ -94,7 +94,7 @@ public class TestCredentials {
         Assert.assertEquals(new NTUserPrincipal("DOMAIN", "name"),
                 creds4.getUserPrincipal());
         Assert.assertEquals(null, creds4.getPassword());
-        Assert.assertEquals("[principal: DOMAIN/name][workstation: null]",
+        Assert.assertEquals("[principal: DOMAIN\\name][workstation: null]",
                 creds4.toString());
         final NTCredentials creds5 = new NTCredentials(
             "name");



Mime
View raw message