about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-11-25 05:09:36 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-11-25 05:09:36 +0000
commit2039a4c56042adf4a4af4c3180a994d8c6849db6 (patch)
tree30da41b26fc7293345ddfdfabfc8b5296831ab5f
parent6f93879f86a15201dcb5de3f3f034290aea74a21 (diff)
downloadunicorn-2039a4c56042adf4a4af4c3180a994d8c6849db6.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@419 19e92222-5c0b-0410-8929-a290d50e31e9
-rw-r--r--lib/mongrel.rb5
-rw-r--r--lib/mongrel/handlers.rb1
-rw-r--r--lib/mongrel/rails.rb1
-rw-r--r--test/test_handlers.rb14
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("/")