Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 57280 invoked from network); 1 Oct 2002 20:03:38 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 1 Oct 2002 20:03:38 -0000 Received: (qmail 4719 invoked by uid 97); 1 Oct 2002 20:04:22 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 4603 invoked by uid 97); 1 Oct 2002 20:04:21 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 4505 invoked by uid 98); 1 Oct 2002 20:04:21 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) X-Server-Uuid: 6E802067-ECFC-4FC2-A617-DD5220DD9CBB Message-ID: <7382FCA44E27D411BD4A00508BD68F95053CD373@pigeon.tumbleweed.com> From: "Martin Cooper" To: "'commons-dev@jakarta.apache.org'" Subject: RE: [httpclient] Date: Tue, 1 Oct 2002 13:02:00 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) X-WSS-ID: 1184DFE696903-01-01 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Just a few notes on the new multipart code: * I was a little surprised to see a hard-coded multipart boundary in there. The boundary is usually generated anew for each request, using random values. I'm not completely sure what kinds of problems this might cause. The only one I can think of is that if you *ever* have the boundary in the content, it will *always* fail. If the boundary is randomly generated, then if one attempt to post fails because the content contains the boundary, a second attempt will most likely succeed, because the boundary will be different. * I noticed that the content type for a file part is hardcoded as "application/octet-stream", with no way that I can see to override it. The problem is that it is hardcoded in FilePart, but (a) there isn't a way to add a Part explicitly, and (b) there's no way to tell MultipartPostMethod to use an alternative FilePart implementation. * There is no way to set additional characteristics of parts, such as the character encoding. This is a similar issue to the one above related to file parts, but applies to file and string parts. * The only way to create a file part is from a java.io.File instance. There is no way to use buffered data, or a stream, other than writing it to a File first. * There is no way to create multipart/mixed content. Don't get me wrong - I'm glad to see multipart content in HttpClient! I just wanted to share some review comments, perhaps to be addressed later. -- Martin Cooper > -----Original Message----- > From: Jeff Dever [mailto:jsdever@sympatico.ca] > Sent: Tuesday, October 01, 2002 12:26 PM > To: Jakarta Commons Users List > Subject: Re: [httpclient] > > > Ok, > > I added Matthew's MultiPartPost to commons-httpclient. I > adjusted the formatting > and made a few other minor changes, but it looks very good. > There are still a few > things that need to be done, which have been noted on the bug report: > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13165 > > Just a note about the stability of HttpClient. We have seen > MANY changes since > the 2.0 Alpha release last year. The MultiPartPost files > that Matthew submitted > in January applied with ZERO conflicts. This test shows > that the method > interface has been VERY stable. > > Way to go HttpClient! and thanks to Matthew for the code (and > Mark for bringing it > up again). > > > "Mark R. Diggory" wrote: > > > Please look at these old messages: > > > > http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg01701.html > http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg01702.html > http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg01704.html > > Matthew Albright pretty much supplied everything to make this easily > included into the package back in January of this year. There was no > response to his messages. > > -Mark > > Jeff Dever wrote: > > >>I have a > >>MultipartPost method written for the Commons HttpClient that works with > >>files stored on the file system such that thier references can be handed > >>in and the method "streams" everything, much more effective. I've often > >>wondered why the MultipartPostMethod hasn't been added to the commons > >>httpclient. But that is also the beauty of the commons library as well, > >>you can write your own methods if need be. > >> -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: