Thanks, Roland. We finally solved our issue by excluding the content
type and transfer encoding headers from the request. I'm not exactly
sure why one works and the other doesn't, but here is the solution:
//Using this fails
Part[] parts = {
new StringPart("login", login),
new StringPart("password", password)
};
//This works
StringPart part1 = new StringPart("login", login);
part1.setContentType(null);
part1.setTransferEncoding(null);
StringPart part2 = new StringPart("password", password);
part2.setContentType(null);
part2.setTransferEncoding(null);
Part[] parts = { part1, part2 };
//create the request entity
MultipartRequestEntity mre = new MultipartRequestEntity(parts,
postMethod.getParams());
postMethod.setRequestEntity(mre);
Thanks,
Dave
-----Original Message-----
From: Roland Weber [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 03, 2007 2:50 AM
To: HttpClient User Discussion
Subject: Re: Multpart Post Problem
Hello Dave,
have a look at the Primer, it explains a lot of the things you should
look for:
http://wiki.apache.org/jakarta-httpclient/ForAbsoluteBeginners
hope that helps,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]