@@ -919,12 +919,6 @@ private boolean sendAsGrizzlyRequest(final Request request,
919
919
{
920
920
requestPacket .setHeader (Header .ProxyAuthorization , AuthenticatorUtils .computeBasicAuthentication (proxy ));
921
921
}
922
- /*if(proxy.getNtlmDomain() != null && proxy.getNtlmDomain().length() > 0)
923
- {
924
- LOGGER.debug("probably ntlm.. not adding header..");
925
- }else if (proxy.getPrincipal() != null && proxy.isBasic()) {
926
- requestPacket.setHeader(Header.ProxyAuthorization, AuthenticatorUtils.computeBasicAuthentication(proxy));
927
- }*/
928
922
929
923
}
930
924
}
@@ -1710,7 +1704,7 @@ public boolean handleStatus(final HttpResponsePacket responsePacket,
1710
1704
}else if (isNTLMSecondHandShake (proxy_auth ))
1711
1705
{
1712
1706
final Connection c = ctx .getConnection ();
1713
- final HttpTransactionContext newContext = httpTransactionContext .copy (); //httpTransactionContext.copy();
1707
+ final HttpTransactionContext newContext = httpTransactionContext .copy ();
1714
1708
1715
1709
httpTransactionContext .future = null ;
1716
1710
httpTransactionContext .provider .setHttpTransactionContext (c , newContext );
@@ -1730,15 +1724,13 @@ public boolean handleStatus(final HttpResponsePacket responsePacket,
1730
1724
1731
1725
newContext .invocationStatus = tempInvocationStatus ;
1732
1726
1727
+ //NTLM needs the same connection to be used for exchange of tokens
1733
1728
return exceuteRequest (httpTransactionContext , req , c ,
1734
1729
newContext );
1735
1730
}
1736
1731
} catch (Exception e ) {
1737
1732
httpTransactionContext .abort (e );
1738
- } catch (Throwable e ) {
1739
- e .printStackTrace ();
1740
- httpTransactionContext .abort (e );
1741
- }
1733
+ }
1742
1734
httpTransactionContext .invocationStatus = tempInvocationStatus ;
1743
1735
return false ;
1744
1736
}
0 commit comments