diff options
-rw-r--r-- | lib/mongrel.rb | 5 | ||||
-rw-r--r-- | lib/mongrel/handlers.rb | 1 | ||||
-rw-r--r-- | lib/mongrel/rails.rb | 1 | ||||
-rw-r--r-- | test/test_handlers.rb | 14 |
4 files changed, 7 insertions, 14 deletions
diff --git a/lib/mongrel.rb b/lib/mongrel.rb index 5d4deee..d2d66f1 100644 --- a/lib/mongrel.rb +++ b/lib/mongrel.rb @@ -123,7 +123,6 @@ module Mongrel MONGREL_VERSION="0.3.18".freeze - # TODO: this use of a base for tempfiles needs to be looked at for security problems MONGREL_TMP_BASE="mongrel".freeze # The standard empty 404 response for bad requests. Use Error4040Handler for custom stuff. @@ -191,8 +190,6 @@ module Mongrel # You don't really call this. It's made for you. # Main thing it does is hook up the params, and store any remaining # body data into the HttpRequest.body attribute. - # - # TODO: Implement tempfile removal when the request is done. def initialize(params, socket, dispatcher) @params = params @socket = socket @@ -537,8 +534,6 @@ module Mongrel # The timeout parameter is a sleep timeout (in hundredths of a second) that is placed between # socket.accept calls in order to give the server a cheap throttle time. It defaults to 0 and # actually if it is 0 then the sleep is not done at all. - # - # TODO: Find out if anyone actually uses the timeout option since it seems to cause problems on FBSD. def initialize(host, port, num_processors=(2**30-1), timeout=0) @socket = TCPServer.new(host, port) @classifier = URIClassifier.new diff --git a/lib/mongrel/handlers.rb b/lib/mongrel/handlers.rb index b7a3031..6bfdb13 100644 --- a/lib/mongrel/handlers.rb +++ b/lib/mongrel/handlers.rb @@ -132,7 +132,6 @@ module Mongrel # Checks if the given path can be served and returns the full path (or nil if not). def can_serve(path_info) - # TODO: investigate freezing the path_info to prevent double escaping req_path = File.expand_path(File.join(@path,HttpRequest.unescape(path_info)), @path) if req_path.index(@path) == 0 and File.exist? req_path diff --git a/lib/mongrel/rails.rb b/lib/mongrel/rails.rb index fc68636..d447c61 100644 --- a/lib/mongrel/rails.rb +++ b/lib/mongrel/rails.rb @@ -92,7 +92,6 @@ module Mongrel def log_threads_waiting_for(event) if Time.now - @tick > 10 - # TODO: add sync locking again @tick = Time.now end end diff --git a/test/test_handlers.rb b/test/test_handlers.rb index 98f83c0..09daf8f 100644 --- a/test/test_handlers.rb +++ b/test/test_handlers.rb @@ -91,13 +91,13 @@ class HandlersTest < Test::Unit::TestCase end # TODO: find out why this fails on win32 but nowhere else - # - #def test_posting_fails_dirhandler - # req = Net::HTTP::Post.new("http://localhost:9998/files/rdoc/") - # req.set_form_data({'from'=>'2005-01-01', 'to'=>'2005-03-31'}, ';') - # res = hit [["http://localhost:9998/files/rdoc/",req]] - # check_status res, Net::HTTPNotFound - #end + + def test_posting_fails_dirhandler + req = Net::HTTP::Post.new("http://localhost:9998/files/rdoc/") + req.set_form_data({'from'=>'2005-01-01', 'to'=>'2005-03-31'}, ';') + res = hit [["http://localhost:9998/files/rdoc/",req]] + check_status res, Net::HTTPNotFound + end def test_unregister @config.listeners["127.0.0.1:9998"].unregister("/") |