Sebastiaan van Erk wrote:
Hi,

I'm trying to use preemptive authentication because I have a non-repeatable (dyanimc) request entity. Currently when posting, this goes wrong because I get a 401 Unauthorized but it has already sent some of the data, and when it tries again with the basic authentication credentials the post fails... (I've implemented the writeTo(OutputStream) method on the Entity). I'm wondering by the way how it can even do the request again because isRepeatable on the entity returns false...

I construct my http client as follows:

final HttpParams httpParams = new BasicHttpParams();
HttpClientParams.setAuthenticationPreemptive(httpParams, true);
final DefaultHttpClient httpClient = new DefaultHttpClient(httpParams);

I searched the source for references to the ClientPNames.PREEMPTIVE_AUTHENTICATION constant, but I couldn't find any, so I'm wondering, is preemptive authentication implemented in 4.0 alpha 3 yet?

Sebastiaan,

There is no support for preemptive authentication at the moment. Anyways, you'll be _much_ better off using the 'expect-continue' handshake or making sure your entity is repeatable.

Hope this helps

Oleg


Or am I doing something wrong?

Regards,
Sebastiaan


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

Reply via email to