common/src/main/java/HTTPClient/DefaultAuthHandler.java
/**
     * @return the info for step 2 if appropriate; null otherwise
     */
@return the info for step 2 if appropriate; null otherwise
@return the info for step 2 if appropriate ; null otherwise
private static AuthorizationInfo ntlm_check_step2(
					      AuthorizationInfo challenge,
					      RoRequest req, RoResponse resp,
					      boolean proxy)
		    throws AuthSchemeNotImplException, IOException
    {
	NVPair[] hdrs = req.getHeaders();
	String auth = null;
	for (int idx=0; idx<hdrs.length; idx++)
	{
	    if (proxy  &&  hdrs[idx].getName().equalsIgnoreCase("Proxy-Authorization")  ||
		!proxy  &&  hdrs[idx].getName().equalsIgnoreCase("Authorization"))
	    {
		auth = hdrs[idx].getValue();
		break;
	    }
	}
	AuthorizationInfo cred = AuthorizationInfo.getAuthorization(challenge,
						    req, resp, false, proxy);
	/* If we received a cookie (i.e. type 2 message) in the challenge
	 * and our previously sent data was a type 1 message, then this must
	 * be step 2 in the handshake.
	 */
	if (challenge.getCookie() != null  &&  cred != null  &&
	    auth != null  &&  auth.startsWith("NTLM TlRMTVNTUAAB"))
	    return ntlm_fixup(cred, req, challenge, null);
	return null;
    }
private static AuthorizationInfo ntlm_check_step2 ( AuthorizationInfo challenge , RoRequest req , RoResponse resp , boolean proxy ) throws AuthSchemeNotImplException , IOException { NVPair [ ] hdrs = req . getHeaders ( ) ; String auth = null ; for ( int idx = 0 ; idx < hdrs . length ; idx ++ ) { if ( proxy && hdrs [ idx ] . getName ( ) . equalsIgnoreCase ( "Proxy-Authorization" ) || ! proxy && hdrs [ idx ] . getName ( ) . equalsIgnoreCase ( "Authorization" ) ) { auth = hdrs [ idx ] . getValue ( ) ; break ; } } AuthorizationInfo cred = AuthorizationInfo . getAuthorization ( challenge , req , resp , false , proxy ) ; /* If we received a cookie (i.e. type 2 message) in the challenge
	 * and our previously sent data was a type 1 message, then this must
	 * be step 2 in the handshake.
	 */ if ( challenge . getCookie ( ) != null && cred != null && auth != null && auth . startsWith ( "NTLM TlRMTVNTUAAB" ) ) return ntlm_fixup ( cred , req , challenge , null ) ; return null ; }
@return the info for step 2 if appropriate; null otherwise
@return the info for step 2 if appropriate ; null otherwise