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 Loïc Péron <lo...@bigfoot.com> on 2005/10/25 17:51:58 UTC
Multipart Post Chunked
Hi,
I investigate the ability to upload unknown length data to a HTTP
server using multipart/form-data POST.
It seems, after a quick look, that the necessary code is in place in
3.0 for chunked POSTs, but that MultipartEntity does not allow for
unknown length Parts.
Can it be implemented in as a simple way as if any Part.length==-1,
then MultipartEntity.length==-1, causing the POST to be chunked? Is
there anything more I overlooked, apart from implementing my own Part?
My use case can be reduced to: build a zip and upload to a server
using form-data POST,
zip containing application data, eventually the whole contents of a
DVD. I dont want to need to build the zip on local storage to be able
to POST it.
--
Loïc Péron
phone:(33) 683 880 177
mailto:loic.peron<at>bigfoot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
Re: Multipart Post Chunked
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2005-10-25 at 17:51 +0200, Loïc Péron wrote:
> Hi,
>
> I investigate the ability to upload unknown length data to a HTTP
> server using multipart/form-data POST.
>
> It seems, after a quick look, that the necessary code is in place in
> 3.0 for chunked POSTs, but that MultipartEntity does not allow for
> unknown length Parts.
>
> Can it be implemented in as a simple way as if any Part.length==-1,
> then MultipartEntity.length==-1, causing the POST to be chunked? Is
> there anything more I overlooked, apart from implementing my own Part?
>
> My use case can be reduced to: build a zip and upload to a server
> using form-data POST,
> zip containing application data, eventually the whole contents of a
> DVD. I dont want to need to build the zip on local storage to be able
> to POST it.
>
Loïc,
Presently any Part returning -1 as its length will cause MultipartEntity
to miscalculate its total length. Please file a bug with Bugzilla
Oleg
> --
> Loïc Péron
>
> phone:(33) 683 880 177
> mailto:loic.peron<at>bigfoot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org