I have written a mongrel handler that monitors the content length of a given url's request and redirects 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 is no way to affect the actual processing of the request until the process method is called. 

Does anyone have any suggestions as to how I may be able to work around this? 
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to