Skip to content

Commit 6552136

Browse files
committed
removed some commented code added some comments
1 parent 60b85cb commit 6552136

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -919,12 +919,6 @@ private boolean sendAsGrizzlyRequest(final Request request,
919919
{
920920
requestPacket.setHeader(Header.ProxyAuthorization, AuthenticatorUtils.computeBasicAuthentication(proxy));
921921
}
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-
}*/
928922

929923
}
930924
}
@@ -1710,7 +1704,7 @@ public boolean handleStatus(final HttpResponsePacket responsePacket,
17101704
}else if(isNTLMSecondHandShake(proxy_auth))
17111705
{
17121706
final Connection c = ctx.getConnection();
1713-
final HttpTransactionContext newContext = httpTransactionContext.copy(); //httpTransactionContext.copy();
1707+
final HttpTransactionContext newContext = httpTransactionContext.copy();
17141708

17151709
httpTransactionContext.future = null;
17161710
httpTransactionContext.provider.setHttpTransactionContext(c, newContext);
@@ -1730,15 +1724,13 @@ public boolean handleStatus(final HttpResponsePacket responsePacket,
17301724

17311725
newContext.invocationStatus = tempInvocationStatus;
17321726

1727+
//NTLM needs the same connection to be used for exchange of tokens
17331728
return exceuteRequest(httpTransactionContext, req, c,
17341729
newContext);
17351730
}
17361731
} catch (Exception e) {
17371732
httpTransactionContext.abort(e);
1738-
} catch (Throwable e) {
1739-
e.printStackTrace();
1740-
httpTransactionContext.abort(e);
1741-
}
1733+
}
17421734
httpTransactionContext.invocationStatus = tempInvocationStatus;
17431735
return false;
17441736
}

0 commit comments

Comments
 (0)