hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1424351 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
Date Thu, 20 Dec 2012 07:14:03 GMT
Author: kwright
Date: Thu Dec 20 07:14:03 2012
New Revision: 1424351

URL: http://svn.apache.org/viewvc?rev=1424351&view=rev
Log:
Fix Type3 message assembly problem, part of HTTPCLIENT-1268.

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java?rev=1424351&r1=1424350&r2=1424351&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
Thu Dec 20 07:14:03 2012
@@ -1222,7 +1222,7 @@ final class NTLMEngineImpl implements NT
                 sessionKeyLen = 0;
 
             // Calculate the layout within the packet
-            int lmRespOffset = 76;  // allocate space for the version
+            int lmRespOffset = 72;  // allocate space for the version
             int ntRespOffset = lmRespOffset + lmRespLen;
             int domainOffset = ntRespOffset + ntRespLen;
             int userOffset = domainOffset + domainLen;
@@ -1273,13 +1273,7 @@ final class NTLMEngineImpl implements NT
             addUShort(sessionKeyLen);
 
             // Session key offset
-            if (sessionKeyLen != 0)
-                addULong(sessionKeyOffset);
-            else
-                addULong(0);
-
-            // Message length
-            addULong(finalLength);
+            addULong(sessionKeyOffset);
 
             // Flags. Currently: WORKSTATION_PRESENT + DOMAIN_PRESENT + UNICODE_ENCODING
+
             // TARGET_DESIRED + NEGOTIATE_128



Mime
View raw message