/** * @return the value of the NTLM Proxy-Authenticate header. * * @param response the proxy response */ private String getNTLMHeader(final HttpProxyResponse response) { List<String> values = response.getHeaders().get("Proxy-Authenticate"); for (String s : values) { if (s.startsWith("NTLM")) { return s; } } return null; }
/** * @return the value of the NTLM Proxy-Authenticate header. * * @param response the proxy response */ private String getNTLMHeader(final HttpProxyResponse response) { List<String> values = response.getHeaders().get("Proxy-Authenticate"); for (String s : values) { if (s.startsWith("NTLM")) { return s; } } return null; }
/** * Returns the value of the NTLM Proxy-Authenticate header. * * @param response the proxy response */ private String getNTLMHeader(final HttpProxyResponse response) { List<String> values = response.getHeaders().get("Proxy-Authenticate"); for (String s : values) { if (s.startsWith("NTLM")) { return s; } } return null; }
/** * Handle a HTTP response from the proxy server. * * @param response The proxy response. */ @Override public void handleResponse(final HttpProxyResponse response) throws ProxyAuthException { if (!isHandshakeComplete() && ("close".equalsIgnoreCase(StringUtilities.getSingleValuedHeader(response.getHeaders(), "Proxy-Connection")) || "close".equalsIgnoreCase(StringUtilities.getSingleValuedHeader( response.getHeaders(), "Connection")))) { getProxyIoSession().setReconnectionNeeded(true); } if (response.getStatusCode() == 407) { if (authHandler == null) { autoSelectAuthHandler(response); } authHandler.handleResponse(response); } else { throw new ProxyAuthException("Error: unexpected response code " + response.getStatusLine() + " received from proxy."); } } }
/** * Handle a HTTP response from the proxy server. * * @param response The proxy response. */ @Override public void handleResponse(final HttpProxyResponse response) throws ProxyAuthException { if (!isHandshakeComplete() && ("close".equalsIgnoreCase(StringUtilities.getSingleValuedHeader(response.getHeaders(), "Proxy-Connection")) || "close".equalsIgnoreCase(StringUtilities.getSingleValuedHeader( response.getHeaders(), "Connection")))) { getProxyIoSession().setReconnectionNeeded(true); } if (response.getStatusCode() == 407) { if (authHandler == null) { autoSelectAuthHandler(response); } authHandler.handleResponse(response); } else { throw new ProxyAuthException("Error: unexpected response code " + response.getStatusLine() + " received from proxy."); } } }
/** * Handle a HTTP response from the proxy server. * * @param response The proxy response. */ @Override public void handleResponse(final HttpProxyResponse response) throws ProxyAuthException { if (!isHandshakeComplete() && ("close".equalsIgnoreCase(StringUtilities .getSingleValuedHeader(response.getHeaders(), "Proxy-Connection")) || "close" .equalsIgnoreCase(StringUtilities .getSingleValuedHeader(response.getHeaders(), "Connection")))) { getProxyIoSession().setReconnectionNeeded(true); } if (response.getStatusCode() == 407) { if (authHandler == null) { autoSelectAuthHandler(response); } authHandler.handleResponse(response); } else { throw new ProxyAuthException("Error: unexpected response code " + response.getStatusLine() + " received from proxy."); } } }
List<String> values = response.getHeaders().get("Proxy-Authenticate"); String challengeResponse = null;
List<String> values = response.getHeaders().get("Proxy-Authenticate"); ProxyIoSession proxyIoSession = getProxyIoSession();
List<String> values = response.getHeaders().get("Proxy-Authenticate"); String challengeResponse = null;
List<String> values = response.getHeaders().get("Proxy-Authenticate"); ProxyIoSession proxyIoSession = getProxyIoSession();
List<String> values = response.getHeaders().get( "Proxy-Authenticate"); String challengeResponse = null;
throws ProxyAuthException { List<String> values = response.getHeaders().get("Proxy-Authenticate"); ProxyIoSession proxyIoSession = getProxyIoSession();
String contentLengthHeader = StringUtilities.getSingleValuedHeader(parsedResponse.getHeaders(), "Content-Length"); if ("chunked".equalsIgnoreCase(StringUtilities.getSingleValuedHeader(parsedResponse.getHeaders(), "Transfer-Encoding"))) { StringUtilities.addValueToHeader(parsedResponse.getHeaders(), f[0], f[1], false); responseData.put(tmp); responseData.put(CRLF_DELIMITER);
String contentLengthHeader = StringUtilities.getSingleValuedHeader(parsedResponse.getHeaders(), "Content-Length"); if ("chunked".equalsIgnoreCase(StringUtilities.getSingleValuedHeader(parsedResponse.getHeaders(), "Transfer-Encoding"))) { StringUtilities.addValueToHeader(parsedResponse.getHeaders(), f[0], f[1], false); responseData.put(tmp); responseData.put(CRLF_DELIMITER);
.getSingleValuedHeader(parsedResponse.getHeaders(), "Content-Length"); .getSingleValuedHeader(parsedResponse.getHeaders(), "Transfer-Encoding"))) { String[] f = footer.split(":\\s?", 2); StringUtilities.addValueToHeader(parsedResponse .getHeaders(), f[0], f[1], false); responseData.put(tmp); responseData.put(CRLF_DELIMITER);