You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Ben T <to...@hotmail.com> on 2011/07/24 03:36:07 UTC

Basic Authorization Header Missing w/ FileBody Entity

I'm using HttpClient 4.1.1 with HttpPost and MultipartEntity 
(BROWSER_COMPATIBLE) where authentication is set through setCredentials. 
  When a FileBody or InputStreamBody is added to the Entity and the 
HttpPost is executed by the HttpClient, the Basic Authorization header 
will not be sent. This is whether or not preemptive authentication is used.

If the Entity only contains a StringBody then the Authorization header 
will be sent.

Trying to use HttpPost.addHeader to force the Authorization string 
appends an extra CRLF which kills the header section.

Am I doing something wrong?

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org