1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Small patch to allow multiple listeners

git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@363 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
zedshaw 2006-10-24 23:10:16 +00:00
parent 03118c1311
commit 3d4eccb7b2

View file

@ -5,7 +5,7 @@ class Upload < GemPlugin::Plugin "/handlers"
include Mongrel::HttpHandlerPlugin
def initialize(options = {})
@path_info = options[:path_info]
@path_info = Array(options[:path_info])
@frequency = options[:frequency] || 3
@request_notify = true
if options[:drb]
@ -32,7 +32,7 @@ class Upload < GemPlugin::Plugin "/handlers"
private
def upload_notify(action, params, *args)
return unless params['PATH_INFO'] == @path_info &&
return unless @path_info.include?(params['PATH_INFO']) &&
params[Mongrel::Const::REQUEST_METHOD] == 'POST' &&
upload_id = Mongrel::HttpRequest.query_parse(params['QUERY_STRING'])['upload_id']
if action == :mark