_out.write(("Proxy-Authorization: " + authHeader + "\r\n").getBytes());
}
_out.write("\r\n".getBytes());
_out.flush();
_logger.fine("Sent CONNECT, reading Proxy response");
Response response = new Response();
response.read(_in);
_logger.fine("Got proxy response " + response.getStatusLine());
status = response.getStatus();
if (status.equals("407")) {
response.flushContentStream();
oldAuthHeader = authHeader;
String[] challenges = response.getHeaders("Proxy-Authenticate");
if (_proxyAuthCreds == null && _authenticator != null)
_proxyAuthCreds = _authenticator.getProxyCredentials(_httpsProxy, challenges);
if (_proxyAuthCreds == null) {
_response = response;
return;