private void ntlmProxyChallenge(String authenticateHeader,//
            Request request,//
            HttpHeaders requestHeaders,//
            Realm proxyRealm,//
            NettyResponseFuture<?> future) {
        if (authenticateHeader.equals("NTLM")) {
            // server replied bare NTLM => we didn't preemptively sent Type1Msg
            String challengeHeader = NtlmEngine.INSTANCE.generateType1Msg();
            // FIXME we might want to filter current NTLM and add (leave other
            // Authorization headers untouched)
            requestHeaders.set(HttpHeaders.Names.PROXY_AUTHORIZATION, "NTLM " + challengeHeader);
            future.getInProxyAuth().set(false);
        } else {
            String serverChallenge = authenticateHeader.substring("NTLM ".length()).trim();
            String challengeHeader = NtlmEngine.INSTANCE.generateType3Msg(proxyRealm.getPrincipal(), proxyRealm.getPassword(), proxyRealm.getNtlmDomain(),
                    proxyRealm.getNtlmHost(), serverChallenge);
            // FIXME we might want to filter current NTLM and add (leave other
            // Authorization headers untouched)
            requestHeaders.set(HttpHeaders.Names.PROXY_AUTHORIZATION, "NTLM " + challengeHeader);
        }
    }
private void ntlmProxyChallenge(String authenticateHeader,            Request request
            HttpHeaders requestHeaders
            Realm proxyRealm
            NettyResponseFuture<?> future) {
        if (authenticateHeader.equals("NTLM")) {
           
            String challengeHeader = NtlmEngine.INSTANCE.generateType1Msg();
           
           
            requestHeaders.set(HttpHeaders.Names.PROXY_AUTHORIZATION, "NTLM " + challengeHeader);
            future.getInProxyAuth().set(false);
        } else {
            String serverChallenge = authenticateHeader.substring("NTLM ".length()).trim();
            String challengeHeader = NtlmEngine.INSTANCE.generateType3Msg(proxyRealm.getPrincipal(), proxyRealm.getPassword(), proxyRealm.getNtlmDomain(),
                    proxyRealm.getNtlmHost(), serverChallenge);
           
           
            requestHeaders.set(HttpHeaders.Names.PROXY_AUTHORIZATION, "NTLM " + challengeHeader);
        }
    }
private void ntlmproxychallenge(string authenticateheader, request request httpheaders requestheaders realm proxyrealm nettyresponsefuture<?> future) { if (authenticateheader.equals("ntlm")) { string challengeheader = ntlmengine.instance.generatetype1msg(); requestheaders.set(httpheaders.names.proxy_authorization, "ntlm " + challengeheader); future.getinproxyauth().set(false); } else { string serverchallenge = authenticateheader.substring("ntlm ".length()).trim(); string challengeheader = ntlmengine.instance.generatetype3msg(proxyrealm.getprincipal(), proxyrealm.getpassword(), proxyrealm.getntlmdomain(), proxyrealm.getntlmhost(), serverchallenge); requestheaders.set(httpheaders.names.proxy_authorization, "ntlm " + challengeheader); } }