perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Vanasco <jvana...@2xlp.com>
Subject Re: [mp2] aborting a file upload
Date Sun, 04 Mar 2007 00:59:53 GMT

On Mar 2, 2007, at 8:28 PM, Matt Williamson wrote:

> Thanks, but I am afraid I do not understand your reply.
>
> Should a body with size > POST_MAX cause the upload to fail? Does it
> send an error back to the client? It did not appear to do either of
> those things for me.
>
> In my situation I want to still process the request, and return ok to
> the client, just not accept the file!
>
> What is a 'fat' apr object?


if you're using libapreq, i the APR object will have an error and i  
think the upload method will die if you try calling it .  in all  
situations, i believe calling $apr-> body_status will show you an  
error message.  For an exceeded POST_MAX, this will work

	my  $error = $self->PageUser->ApacheRequest->body_status();
	if ( $error eq 'Exceeds configured maximum limit' ) {}

see:
	http://httpd.apache.org/apreq/docs/libapreq2/ 
group__apreq__xs__request.html#body_status

i can't comment on other situations.  i'm not sure exactly how data  
is handled in terms of when the connection is closed. that might be  
in the http spec. i'm also not sure how a proxy server would fit into  
this , if you were limiting the body content on the proxy.

'fat' is vs 'skinny' -- 10mb vs 10k.


// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -



Mime
View raw message