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? Or am I doing something wrong?

Regards,
Sebastiaan
        

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to