cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miguel <>
Subject Re: Doubt about file upload in Cocoon 2.2
Date Fri, 07 Jun 2013 09:43:20 GMT
Hi Alfred

Thanks for your answer, but class 
org.apache.cocoon.servlet.multipart.MultipartParser execute the method 
parseFilePart when a file is upload on cocoon application and in this 
case the parameter contentLength is used to manage the check about limit 
of size of file and after create RejectedPart object, so to reject of file.

I understand for yo answer that parameter "contentLength" is not 
reliable, is it?

On the other hand, if parameter "contentLength" is not reliable and it's 
necesary read from request stream, it would be possible read until 
maxUploadSize, so stop when process of drain the data arrive until the 
limit established by parameter maxUploadSize

Thanks Alfred.

El 07/06/2013 10:49, Nathaniel, Alfred escribió:
> In a file upload request, there is no length indicator which would 
> allow to detect oversized files immediately.
> The file data is embedded with a special multipart encoding in the 
> normal HTTP request stream.
> There may be more requests following in the same persistent HTTP 
> connection.
> Therefore one is obliged to drain the data from the request stream 
> even for only throwing it away.

View raw message