Results 1 to 1 of 1
- 07-20-2011, 08:43 PM #1
Member
- Join Date
- Jul 2011
- Posts
- 1
- Rep Power
- 0
HELP: Apache HttpClient w/ MIME Post File Breaks Basic Authentication
I'm using the Apache HttpClient 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.
What am I missing?
Similar Threads
-
HTTP Basic Authentication
By abhinav04sharma in forum NetworkingReplies: 0Last Post: 02-28-2011, 04:43 AM -
Proxy authentication using HttpClient 4.0.3
By Jsharma in forum Advanced JavaReplies: 0Last Post: 01-21-2011, 03:33 AM -
package org.apache.httpcomponents.httpclient.debian does not ex
By achab in forum New To JavaReplies: 3Last Post: 11-05-2010, 06:55 AM -
login with cookies using Apache httpClient
By MacGyver in forum Advanced JavaReplies: 0Last Post: 05-15-2010, 03:21 PM -
File Templates: line breaks not being used
By TheShanMan in forum IntelliJ IDEAReplies: 0Last Post: 08-31-2009, 08:07 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks