Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

Large File Upload blocking

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


padfootpost at gmail

May 2, 2008, 9:32 AM

Post #1 of 2 (99 views)
Permalink
Large File Upload blocking

I'm trying to prevent my users from uploding files larger than 500MB. I
know that I can use LimitPayloadBody and ErrorDocument 413 to redirect the
users to a page telling them their file is too large. But then it seems
like apache still has to read in the entire file before it returns the
user. Even with a simple html file like this:

<FORM ENCTYPE='multipart/form-data' method='POST' action='http://localhost'>
<INPUT TYPE='file' NAME='mptest'>
<INPUT TYPE='submit' VALUE='upload'>
</FORM>


it takes a long time for a 1.9GB file to upload.

Is there a way to prevent Apache form continuing to read the socket?
If I try to break before that, I get an "Ivalid Response From the
Server" or something like that response.

Thanks


linusali at gmail

May 12, 2008, 5:40 AM

Post #2 of 2 (64 views)
Permalink
Re: Large File Upload blocking [In reply to]

Hi there,

Look for something related to Content-length request header. Usually
it contains the size of the POST data. You may need to use a mix of
the exisiting solution + the Content-length for security reasons.

Cheers
Salih

On Fri, May 2, 2008 at 8:32 PM, sirius black <padfootpost[at]gmail.com> wrote:
> I'm trying to prevent my users from uploding files larger than 500MB. I
> know that I can use LimitPayloadBody and ErrorDocument 413 to redirect the
> users to a page telling them their file is too large. But then it seems
> like apache still has to read in the entire file before it returns the user.
> Even with a simple html file like this:
>
> <FORM ENCTYPE='multipart/form-data' method='POST' action='http://localhost'>
>
> <INPUT TYPE='file' NAME='mptest'>
>
> <INPUT TYPE='submit' VALUE='upload'>
>
> </FORM>
>
>
> it takes a long time for a 1.9GB file to upload.
>
> Is there a way to prevent Apache form continuing to read the socket? If I
> try to break before that, I get an "Ivalid Response From the Server" or
> something like that response.
>
>
> Thanks
>
>
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe[at]httpd.apache.org
" from the digest: users-digest-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: users-help[at]httpd.apache.org

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.