I got some advice from Rick last night and started coding this handler
to allow for time-based secure downloading similar to mod_secdownload
that lighttpd offers. I got most of the code in the handler worked out
and packaged into a gem but am still having the following problems:
1) I have a configuration script as follows
require 'mongrel'
config = Mongrel::Configurator.new :host => "127.0.0.1" do
listener do
uri "/downloads", :handler =>
plugin('/handlers/securedownload',{:secret_string => "secret_string"})
end
run
end
When I try 'listener :port => 3000 do' I get a bind (port already in
use) error.
The script above however starts up but http://localhost:3000/downloads
doesn't start up the handler. The process method of my handler is never
called, I just get a routing error from rails.
2) When I pass in the options to the plugin like this how do I get to
the options hash while inside of the process method?
Note: I also tried to get just the DirHandler example working and I
couldn't get the server to recognize that path either, so there might be
something more sinister going on here.
Any help appreciated. If I can get this to recognize my handler I'll
almost have it working. Is there a wiki I could do a writeup on as to
how to write handlers after I get this finished?
Josh Ferguson
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users