hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1787699 - in /httpcomponents/httpclient/branches/4.6.x: RELEASE_NOTES.txt httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java
Date Mon, 20 Mar 2017 09:42:04 GMT
Author: olegk
Date: Mon Mar 20 09:42:04 2017
New Revision: 1787699

URL: http://svn.apache.org/viewvc?rev=1787699&view=rev
Log:
Fix for HTTPCLIENT-1833

Modified:
    httpcomponents/httpclient/branches/4.6.x/RELEASE_NOTES.txt
    httpcomponents/httpclient/branches/4.6.x/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java

Modified: httpcomponents/httpclient/branches/4.6.x/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.6.x/RELEASE_NOTES.txt?rev=1787699&r1=1787698&r2=1787699&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.6.x/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpclient/branches/4.6.x/RELEASE_NOTES.txt Mon Mar 20 09:42:04 2017
@@ -8,6 +8,9 @@ Please note that as of 4.4 HttpClient re
 Changelog:
 -------------------
 
+* [HTTPCLIENT-1833] Fix Windows Negotiate-NTLM handling of proxies.
+  Contributed by Roman Stoffel <roman.stoffel at gamler.info>
+
 * [HTTPCLIENT-1817] Add a "Trust All" TrustStrategy implementation.
   Contributed by Gary Gregory <ggregory at apache.org>
 

Modified: httpcomponents/httpclient/branches/4.6.x/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.6.x/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java?rev=1787699&r1=1787698&r2=1787699&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.6.x/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java
(original)
+++ httpcomponents/httpclient/branches/4.6.x/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java
Mon Mar 20 09:42:04 2017
@@ -241,10 +241,18 @@ public class WindowsNegotiateScheme exte
         final String spn;
         if (this.servicePrincipalName != null) {
             spn = this.servicePrincipalName;
+        } else if(isProxy()){
+            final HttpClientContext clientContext = HttpClientContext.adapt(context);
+            final RouteInfo route = clientContext.getHttpRoute();
+            if (route != null) {
+                spn = "HTTP/" + route.getProxyHost().getHostName();
+            } else {
+                // Should not happen
+                spn = null;
+            }
         } else {
             final HttpClientContext clientContext = HttpClientContext.adapt(context);
-            final HttpHost target = clientContext.getTargetHost();
-            if (target != null) {
+            final HttpHost target = clientContext.getTargetHost();            if (target
!= null) {
                 spn = "HTTP/" + target.getHostName();
             } else {
                 final RouteInfo route = clientContext.getHttpRoute();



Mime
View raw message