You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "cedric.minois@laposte.net" <ce...@laposte.net> on 2003/06/02 18:11:17 UTC
Put method
Hi,
I use PutMethod to upload files. Everything goes ok until
I try to send a big file (~ 150 Mo): I get an OutOfMemoryError.
I use a BufferedInputStream for my RequestBody.
Has anyone already had this kind of error ?
Thanks,
Cedric.
Accédez au courrier électronique de La Poste : www.laposte.net ;
3615 LAPOSTENET (0,34/mn) ; tél : 08 92 68 13 50 (0,34/mn)"
Re: Put method
Posted by Michael Becke <be...@u.washington.edu>.
I'm guessing this is happening because the PUT's content length is not
being set. The request content length must be set to
EntityEnclosingMethod.CONTENT_LENGTH_CHUNKED or to the actual size of
the content to avoid buffering. If the content length is not specified
the content is buffered to memory in order to determing the length.
Mike
cedric.minois@laposte.net wrote:
> Hi,
>
> I use PutMethod to upload files. Everything goes ok until
> I try to send a big file (~ 150 Mo): I get an OutOfMemoryError.
>
> I use a BufferedInputStream for my RequestBody.
>
> Has anyone already had this kind of error ?
>
> Thanks,
>
> Cedric.
>
>
> Accédez au courrier électronique de La Poste : www.laposte.net ;
> 3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)"
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
>