[Mongrel] Limit Request Body Size (Disallow very large File-uploads)

2009-06-12 Thread gollomm
Hello all, For the last couple of days I was trying to get my Apache/mod_proxy/mongrel setup to limit the size of the request body. The setup is as follows: 1.) Apache acts as a reverse proxy by facilitating mod_rewrite and mod_proxy 2.) Requests for non-static files are passed on to a mongrel_cl

Re: [Mongrel] Limit Request Body Size (Disallow very large File-uploads)

2009-06-12 Thread Stephan Wehner
On Fri, Jun 12, 2009 at 6:46 AM, gollomm wrote: > Hello all, > > For the last couple of days I was trying to get my > Apache/mod_proxy/mongrel setup to limit the size of the request body. > The setup is as follows: > > 1.) Apache acts as a reverse proxy by facilitating mod_rewrite and mod_proxy > 2

Re: [Mongrel] Limit Request Body Size (Disallow very large File-uploads)

2009-06-12 Thread Ryan Stenhouse
gollomm wrote: Hello all, For the last couple of days I was trying to get my Apache/mod_proxy/mongrel setup to limit the size of the request body. The setup is as follows: 1.) Apache acts as a reverse proxy by facilitating mod_rewrite and mod_proxy 2.) Requests for non-static files are passed

Re: [Mongrel] Limit Request Body Size (Disallow very large File-uploads)

2009-06-12 Thread gollomm
On Fri, Jun 12, 2009 at 11:07 AM, Stephan Wehner wrote: > On Fri, Jun 12, 2009 at 6:46 AM, gollomm wrote: >> Hello all, >> >> For the last couple of days I was trying to get my >> Apache/mod_proxy/mongrel setup to limit the size of the request body. >> The setup is as follows: >> >> 1.) Apache acts

Re: [Mongrel] Limit Request Body Size (Disallow very large File-uploads)

2009-06-12 Thread Kirk Haines
Look at http_request.rb. Mongrel already has a limit to the length of the headers that it will accept, so you are covered there. If you look at HttpRequest#initialize, there is a "remain" variable that is set to the content length of the body of the request. You could simply insert a check there

Re: [Mongrel] Limit Request Body Size (Disallow very large File-uploads)

2009-06-12 Thread gollomm
On Fri, Jun 12, 2009 at 12:40 PM, Kirk Haines wrote: > Look at http_request.rb. > > Mongrel already has a limit to the length of the headers that it will > accept, so you are covered there.  If you look at > HttpRequest#initialize, there is a "remain" variable that is set to > the content length of