/** * Try to force proxy connection to be kept alive. * * @param headers the request headers */ public static void addKeepAliveHeaders(Map<String, List<String>> headers) { StringUtilities.addValueToHeader(headers, "Keep-Alive", HttpProxyConstants.DEFAULT_KEEP_ALIVE_TIME, true); StringUtilities.addValueToHeader(headers, "Proxy-Connection", "keep-Alive", true); }
/** * Try to force proxy connection to be kept alive. * * @param headers the request headers */ public static void addKeepAliveHeaders(Map<String, List<String>> headers) { StringUtilities.addValueToHeader(headers, "Keep-Alive", HttpProxyConstants.DEFAULT_KEEP_ALIVE_TIME, true); StringUtilities.addValueToHeader(headers, "Proxy-Connection", "keep-Alive", true); }
/** * Try to force proxy connection to be kept alive. * * @param headers the request headers */ public static void addKeepAliveHeaders(Map<String, List<String>> headers) { StringUtilities.addValueToHeader(headers, "Keep-Alive", HttpProxyConstants.DEFAULT_KEEP_ALIVE_TIME, true); StringUtilities.addValueToHeader(headers, "Proxy-Connection", "keep-Alive", true); }
StringUtilities.addValueToHeader(headers, args[0], args[1], false);
StringUtilities.addValueToHeader(headers, args[0], args[1], false);
StringUtilities.addValueToHeader(headers, args[0], args[1], false);
workstation, serverFlags, null); StringUtilities.addValueToHeader(headers, "Proxy-Authorization", "NTLM " + new String(Base64.encodeBase64(authenticationPacket)), true); StringUtilities.addValueToHeader(headers, "Proxy-Authorization", "NTLM " + new String(Base64.encodeBase64(negotiationPacket)), true);
workstation, serverFlags, null); StringUtilities.addValueToHeader(headers, "Proxy-Authorization", "NTLM " + new String(Base64.encodeBase64(authenticationPacket)), true); StringUtilities.addValueToHeader(headers, "Proxy-Authorization", "NTLM " + new String(Base64.encodeBase64(negotiationPacket)), true);
/** * {@inheritDoc} */ @Override public void doHandshake(final NextFilter nextFilter) throws ProxyAuthException { logger.debug(" doHandshake()"); if (step > 0) { throw new ProxyAuthException("Authentication request already sent"); } // Send request HttpProxyRequest req = (HttpProxyRequest) request; Map<String, List<String>> headers = req.getHeaders() != null ? req.getHeaders() : new HashMap<String, List<String>>(); String username = req.getProperties().get(HttpProxyConstants.USER_PROPERTY); String password = req.getProperties().get(HttpProxyConstants.PWD_PROPERTY); StringUtilities.addValueToHeader(headers, "Proxy-Authorization", "Basic " + createAuthorization(username, password), true); addKeepAliveHeaders(headers); req.setHeaders(headers); writeRequest(nextFilter, req); step++; }
/** * {@inheritDoc} */ @Override public void doHandshake(final NextFilter nextFilter) throws ProxyAuthException { logger.debug(" doHandshake()"); if (step > 0) { throw new ProxyAuthException("Authentication request already sent"); } // Send request HttpProxyRequest req = (HttpProxyRequest) request; Map<String, List<String>> headers = req.getHeaders() != null ? req.getHeaders() : new HashMap<String, List<String>>(); String username = req.getProperties().get(HttpProxyConstants.USER_PROPERTY); String password = req.getProperties().get(HttpProxyConstants.PWD_PROPERTY); StringUtilities.addValueToHeader(headers, "Proxy-Authorization", "Basic " + createAuthorization(username, password), true); addKeepAliveHeaders(headers); req.setHeaders(headers); writeRequest(nextFilter, req); step++; }
serverFlags, null); StringUtilities.addValueToHeader(headers, "Proxy-Authorization", "NTLM "+ new String(Base64 workstation, domain, null, null); StringUtilities .addValueToHeader( headers, "Proxy-Authorization",
/** * {@inheritDoc} */ @Override public void doHandshake(final NextFilter nextFilter) throws ProxyAuthException { logger.debug(" doHandshake()"); if (step > 0) { throw new ProxyAuthException("Authentication request already sent"); } // Send request HttpProxyRequest req = (HttpProxyRequest) request; Map<String, List<String>> headers = req.getHeaders() != null ? req .getHeaders() : new HashMap<>(); String username = req.getProperties().get( HttpProxyConstants.USER_PROPERTY); String password = req.getProperties().get( HttpProxyConstants.PWD_PROPERTY); StringUtilities.addValueToHeader(headers, "Proxy-Authorization", "Basic " + createAuthorization(username, password), true); addKeepAliveHeaders(headers); req.setHeaders(headers); writeRequest(nextFilter, req); step++; }
StringUtilities.addValueToHeader(headers, "Proxy-Authorization", sb.toString(), true);
StringUtilities.addValueToHeader(headers, "Proxy-Authorization", sb.toString(), true);
StringUtilities.addValueToHeader(headers, "Proxy-Authorization", sb.toString(), true);
StringUtilities.addValueToHeader(parsedResponse.getHeaders(), f[0], f[1], false); responseData.put(tmp); responseData.put(CRLF_DELIMITER);
StringUtilities.addValueToHeader(parsedResponse.getHeaders(), f[0], f[1], false); responseData.put(tmp); responseData.put(CRLF_DELIMITER);
.getCharset().newDecoder()); String[] f = footer.split(":\\s?", 2); StringUtilities.addValueToHeader(parsedResponse .getHeaders(), f[0], f[1], false); responseData.put(tmp);