search for: httphandlerplugin

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

2006 Oct 19
8
Mongrel::HttpHandlerPlugin
Hi, I''m trying to write a file upload monitor for mongrel that uses juggernaut to alert the browser of a change. I''m writing a plugin that uses Mongrel::HttpHandlerPlugin but it looks like the only method that gets called is process and that is only when the upload has finished. I''m setting the following: @request_notify = true But I am still only getting process to come through. Any ideas? -- Carl Woodward
2006 Sep 19
2
Upload Size Limiting Handler
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...
2006 Mar 22
0
0.3.12 Pre-Release Gems Available
...e DSL (Domain Specific Language) to create any number of port listeners with any number of URIs that have chained handlers on them. Here''s an example DSL loading script: require ''mongrel'' class TestPlugin < GemPlugin::Plugin "/handlers" include Mongrel::HttpHandlerPlugin def process(request, response) STDERR.puts "My options are: #{options.inspect}" STDERR.puts "Request Was:" STDERR.puts request.params.to_yaml end end config = Mongrel::Configurator.new :host => "127.0.0.1" do load_plugins :includes => ["m...
2007 Mar 12
17
need help writing a plugin
...hin that directory, some stuff should happen, if not, the request should be processed as usual. I don''t know how to do the latter.. require ''mongrel'' require ''gem_plugin'' class Streamert < GemPlugin::Plugin "/handlers" include Mongrel::HttpHandlerPlugin def initialize(options = {}) @docroot = options[:cwd] + "/" + options[:docroot] end def process(request, response) # only stream flv files unless File.extname(request.params[''REQUEST_PATH'']).downcase == ''.flv'' # somehow c...
2007 Dec 19
8
Segmentation fault in Mongrel when run with --debug
...ails.org/deprecation for details. (called from process at /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/bin/../lib/mongrel/debug.rb:128) both outputs refer to debug.rb line 128 which is # stolen from Robert Klemme class Objects < GemPlugin::Plugin "/handlers" include Mongrel::HttpHandlerPlugin 121 def process(request,response) 122 begin 123 stats = Hash.new(0) 124 lengths = {} 125 begin 126 ObjectSpace.each_object do |o| 127 begin 128 if o.respond_to? :length 129 len = o.length 130 lengths[o.class]...
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