search for: request_begins

Displaying 6 results from an estimated 6 matches for "request_begins".

2006 Sep 19
2
Upload Size Limiting Handler
...s them if they are over a certain limit. The idea is to throttle the maximum size of an uploaded file. Using the process method on HttpHandlerPlugin I am able to make this work the only downside is that the whole file is still uploaded. I would much prefer to inspect the http header params on the request_begins call and inform mongrel that there is no need to process that request any more. Is there any way to do this? I have glanced through both the handlers.rb and mongrel.rb source and I don''t think that it is possible. While you can inspect the http header params in the request_begins there...
2007 Mar 16
0
cancel running request
Hi everybody, I''m making a plugin to limit the maximum request size (for file uploads). Instead of canceling the request after it''s completely in (with the method ''process''). I would like to cancel it based on the CONTENT_LENGTH in the method request_begins. Usability thingie ;-) how can i cancel the running request and send a response, instead of waiting? currently i have these 2 methods: def request_begins(params) return unless params[Mongrel::Const::REQUEST_METHOD] == ''POST'' req_size = params[Mongrel::Const::CONTENT_L...
2007 Mar 24
0
max upload size!
...st". Currently my plugin raises an error and disconnects the socket without send a reply at all (and the Apache proxy keeps accepting incoming data making the user wait till the upload is "completed" to discover it didn''t upload). How can I send an HTTP 413 and disconnect on request_begins. I tried passing in the socket into request_begins as a second parameter but I don''t like to mess with the mongrel sources and rather keep everything in the plugin. I made a small writeup on my blog where you can also download the plugin as a gem: http://slasaus.netsend.nl/articles/show/7...
2007 Feb 06
0
Question about file upload max size
Hi, We use merb for our file upload server. Everything is ok except file upload size limit, we want to cancel file upload process immediately once we learn that the size of upload files has exceed the max size limit. First, we try to hack MerbUploadHandler#request_begins(here, we can get CONTENT_LENGTH), but get trouble to cancel the upload process elegantly. Currently, we have no choice but to let browser to do the work. Our web client will query process info from server, and it know the max size limit, when it find that the size > allowed maxsize, it will...
2009 Jun 12
5
Limit Request Body Size (Disallow very large File-uploads)
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_cluster 3.) We use mongrel for our Ruby on Rails application Note that due to some restrictions we are
2007 Feb 24
3
Mongrel Cluster 1.0.1.1 Prerelease: Healing power of the pack!
Hello all... I know its been a while since the last one, but a new prerelease is available with a gratuitous increase in version numbers! gem install mongrel_cluster --source http://mongrel.rubyforge.org/releases/ This one has some new features in it that need to be tested on all unix platforms. Please run --clean and cluster::status on every *nix you can find. I run linux so the rest are up