Oleg,

Thanks for your reply,

when I execute the test which works fine, that is I just change the ligne

hostConfiguration.setHost("myhost", 443, new Protocol("https", new SSLProtocolSocketFactory(), 443));

by

hostConfiguration.setHost("myhost", 443);

I have some log (see below) which looks similar "Required credentials not available for BASIC <any realm>@myhost:443 ...", but it works! I notice that this time, the mode preemptive works too. the Proxy-Authorization header is submitted at the first request whereas in the failed test, it is never submitted.

I also try to set the REALM without success.

proxyClient.getState().setProxyCredentials(new AuthScope("myproxy", 8080, "MYREALM"), userCredential) ;

thanks again.


DEBUG [org.apache.commons.httpclient.HttpState] enter HttpState.setProxyCredentials(AuthScope, Credentials)
DEBUG [org.apache.commons.httpclient.ConnectMethod] enter ConnectMethod()
DEBUG [org.apache.commons.httpclient.HttpMethodDirector] Preemptively sending default basic credentials DEBUG [org.apache.commons.httpclient.HttpMethodDirector] Authenticating with BASIC <any realm>@myproxy:8080 DEBUG [org.apache.commons.httpclient.HttpState] enter HttpState.getProxyCredentials(AuthScope) DEBUG [org.apache.commons.httpclient.auth.BasicScheme] enter BasicScheme.authenticate(Credentials, HttpMethod) DEBUG [org.apache.commons.httpclient.params.HttpMethodParams] Credential charset not configured, using HTTP element charset DEBUG [org.apache.commons.httpclient.auth.BasicScheme] enter BasicScheme.authenticate(UsernamePasswordCredentials, String) DEBUG [org.apache.commons.httpclient.HttpMethodBase] HttpMethodBase.addRequestHeader(Header) DEBUG [org.apache.commons.httpclient.HttpMethodDirector] Authenticating with BASIC <any realm>@myhost:443 DEBUG [org.apache.commons.httpclient.HttpState] enter HttpState.getCredentials(AuthScope) WARN [org.apache.commons.httpclient.HttpMethodDirector] Required credentials not available for BASIC <any realm>@myhost:443 WARN [org.apache.commons.httpclient.HttpMethodDirector] Preemptive authentication requested but no default credentials available DEBUG [org.apache.commons.httpclient.HttpMethodDirector] Attempt number 1 to process request DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.open() DEBUG [org.apache.commons.httpclient.HttpConnection] Open connection to myproxy:8080 DEBUG [org.apache.commons.httpclient.ConnectMethod] enter ConnectMethod.execute(HttpState, HttpConnection) DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter HttpMethodBase.execute(HttpState, HttpConnection) DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter HttpMethodBase.writeRequest(HttpState, HttpConnection) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.printLine(String) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.writeLine(byte[]) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[]) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[], int, int) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.writeLine() DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[]) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[], int, int)
DEBUG [httpclient.wire.header] >> "CONNECT myhost:443 HTTP/1.1"
DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection) DEBUG [org.apache.commons.httpclient.ConnectMethod] enter ConnectMethod.addRequestHeaders(HttpState, HttpConnection) DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter HttpMethodBase.addUserAgentRequestHeaders(HttpState, HttpConnection) DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter HttpMethodBase.addHostRequestHeader(HttpState, HttpConnection) DEBUG [org.apache.commons.httpclient.HttpMethodBase] Adding Host request header DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter HttpMethodBase.addProxyConnectionHeader(HttpState, HttpConnection) DEBUG [org.apache.commons.httpclient.HttpMethodBase] HttpMethodBase.addRequestHeader(Header) DEBUG [httpclient.wire.header] >> "Proxy-Authorization: Basic UlpKUjcyOTU6QVdBSjY0NzQ=[\r][\n]" DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.print(String) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[]) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[], int, int) DEBUG [httpclient.wire.header] >> "User-Agent: Jakarta Commons-HttpClient/3.0[\r][\n]" DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.print(String) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[]) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[], int, int)
DEBUG [httpclient.wire.header] >> "Host: myhost:443[\r][\n]"
DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.print(String) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[]) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[], int, int)
DEBUG [httpclient.wire.header] >> "Proxy-Connection: Keep-Alive[\r][\n]"
DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.print(String) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[]) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[], int, int) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.writeLine() DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[]) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[], int, int)
DEBUG [httpclient.wire.header] >> "[\r][\n]"
DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.flushRequestOutputStream() DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter HttpMethodBase.readResponse(HttpState, HttpConnection) DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter HttpMethodBase.readStatusLine(HttpState, HttpConnection) DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.readLine() DEBUG [org.apache.commons.httpclient.HttpParser] enter HttpParser.readLine(InputStream, String) DEBUG [org.apache.commons.httpclient.HttpParser] enter HttpParser.readRawLine() DEBUG [httpclient.wire.header] << "HTTP/1.0 200 Connection established[\r][\n]"


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to