about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/exec/test_exec.rb2
-rw-r--r--test/rails/app-2.3.5/.gitignore (renamed from test/rails/app-2.3.3.1/.gitignore)0
-rw-r--r--test/rails/app-2.3.5/Rakefile (renamed from test/rails/app-2.3.3.1/Rakefile)0
-rw-r--r--test/rails/app-2.3.5/app/controllers/application_controller.rb (renamed from test/rails/app-2.3.3.1/app/controllers/application_controller.rb)0
-rw-r--r--test/rails/app-2.3.5/app/controllers/foo_controller.rb (renamed from test/rails/app-2.3.3.1/app/controllers/foo_controller.rb)0
-rw-r--r--test/rails/app-2.3.5/app/helpers/application_helper.rb (renamed from test/rails/app-2.3.3.1/app/helpers/application_helper.rb)0
-rw-r--r--test/rails/app-2.3.5/config/boot.rb (renamed from test/rails/app-2.3.3.1/config/boot.rb)0
-rw-r--r--test/rails/app-2.3.5/config/database.yml (renamed from test/rails/app-2.3.3.1/config/database.yml)0
-rw-r--r--test/rails/app-2.3.5/config/environment.rb (renamed from test/rails/app-2.3.3.1/config/environment.rb)0
-rw-r--r--test/rails/app-2.3.5/config/environments/development.rb (renamed from test/rails/app-2.3.3.1/config/environments/development.rb)0
-rw-r--r--test/rails/app-2.3.5/config/environments/production.rb (renamed from test/rails/app-2.3.3.1/config/environments/production.rb)0
-rw-r--r--test/rails/app-2.3.5/config/routes.rb (renamed from test/rails/app-2.3.3.1/config/routes.rb)0
-rw-r--r--test/rails/app-2.3.5/db/.gitignore (renamed from test/rails/app-2.3.3.1/db/.gitignore)0
-rw-r--r--test/rails/app-2.3.5/log/.gitignore (renamed from test/rails/app-2.3.3.1/log/.gitignore)0
-rw-r--r--test/rails/app-2.3.5/public/404.html (renamed from test/rails/app-2.3.3.1/public/404.html)0
-rw-r--r--test/rails/app-2.3.5/public/500.html (renamed from test/rails/app-2.3.3.1/public/500.html)0
-rw-r--r--test/rails/app-2.3.5/public/x.txt (renamed from test/rails/app-2.3.3.1/public/x.txt)0
-rw-r--r--test/unit/test_http_parser.rb39
18 files changed, 40 insertions, 1 deletions
diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb
index fc0719b..24ba856 100644
--- a/test/exec/test_exec.rb
+++ b/test/exec/test_exec.rb
@@ -805,7 +805,7 @@ EOF
       exec($unicorn_bin, "-D", "-l#{@addr}:#{@port}", "-c#{ucfg.path}")
     end
     pid, status = Process.waitpid2(pid)
-    assert status.success?, "original process exited successfully"
+    assert ! status.success?, "original process exited successfully"
     sleep 1 # can't waitpid on a daemonized process :<
     assert err.stat.size > 0
   end
diff --git a/test/rails/app-2.3.3.1/.gitignore b/test/rails/app-2.3.5/.gitignore
index f451f91..f451f91 100644
--- a/test/rails/app-2.3.3.1/.gitignore
+++ b/test/rails/app-2.3.5/.gitignore
diff --git a/test/rails/app-2.3.3.1/Rakefile b/test/rails/app-2.3.5/Rakefile
index fbebfca..fbebfca 100644
--- a/test/rails/app-2.3.3.1/Rakefile
+++ b/test/rails/app-2.3.5/Rakefile
diff --git a/test/rails/app-2.3.3.1/app/controllers/application_controller.rb b/test/rails/app-2.3.5/app/controllers/application_controller.rb
index 07c333e..07c333e 100644
--- a/test/rails/app-2.3.3.1/app/controllers/application_controller.rb
+++ b/test/rails/app-2.3.5/app/controllers/application_controller.rb
diff --git a/test/rails/app-2.3.3.1/app/controllers/foo_controller.rb b/test/rails/app-2.3.5/app/controllers/foo_controller.rb
index 54ca1ed..54ca1ed 100644
--- a/test/rails/app-2.3.3.1/app/controllers/foo_controller.rb
+++ b/test/rails/app-2.3.5/app/controllers/foo_controller.rb
diff --git a/test/rails/app-2.3.3.1/app/helpers/application_helper.rb b/test/rails/app-2.3.5/app/helpers/application_helper.rb
index d9889b3..d9889b3 100644
--- a/test/rails/app-2.3.3.1/app/helpers/application_helper.rb
+++ b/test/rails/app-2.3.5/app/helpers/application_helper.rb
diff --git a/test/rails/app-2.3.3.1/config/boot.rb b/test/rails/app-2.3.5/config/boot.rb
index b6c80d5..b6c80d5 100644
--- a/test/rails/app-2.3.3.1/config/boot.rb
+++ b/test/rails/app-2.3.5/config/boot.rb
diff --git a/test/rails/app-2.3.3.1/config/database.yml b/test/rails/app-2.3.5/config/database.yml
index 9f77843..9f77843 100644
--- a/test/rails/app-2.3.3.1/config/database.yml
+++ b/test/rails/app-2.3.5/config/database.yml
diff --git a/test/rails/app-2.3.3.1/config/environment.rb b/test/rails/app-2.3.5/config/environment.rb
index 6eb092c..6eb092c 100644
--- a/test/rails/app-2.3.3.1/config/environment.rb
+++ b/test/rails/app-2.3.5/config/environment.rb
diff --git a/test/rails/app-2.3.3.1/config/environments/development.rb b/test/rails/app-2.3.5/config/environments/development.rb
index 3d381d2..3d381d2 100644
--- a/test/rails/app-2.3.3.1/config/environments/development.rb
+++ b/test/rails/app-2.3.5/config/environments/development.rb
diff --git a/test/rails/app-2.3.3.1/config/environments/production.rb b/test/rails/app-2.3.5/config/environments/production.rb
index 08710a4..08710a4 100644
--- a/test/rails/app-2.3.3.1/config/environments/production.rb
+++ b/test/rails/app-2.3.5/config/environments/production.rb
diff --git a/test/rails/app-2.3.3.1/config/routes.rb b/test/rails/app-2.3.5/config/routes.rb
index ac7877c..ac7877c 100644
--- a/test/rails/app-2.3.3.1/config/routes.rb
+++ b/test/rails/app-2.3.5/config/routes.rb
diff --git a/test/rails/app-2.3.3.1/db/.gitignore b/test/rails/app-2.3.5/db/.gitignore
index e69de29..e69de29 100644
--- a/test/rails/app-2.3.3.1/db/.gitignore
+++ b/test/rails/app-2.3.5/db/.gitignore
diff --git a/test/rails/app-2.3.3.1/log/.gitignore b/test/rails/app-2.3.5/log/.gitignore
index 397b4a7..397b4a7 100644
--- a/test/rails/app-2.3.3.1/log/.gitignore
+++ b/test/rails/app-2.3.5/log/.gitignore
diff --git a/test/rails/app-2.3.3.1/public/404.html b/test/rails/app-2.3.5/public/404.html
index 44d986c..44d986c 100644
--- a/test/rails/app-2.3.3.1/public/404.html
+++ b/test/rails/app-2.3.5/public/404.html
diff --git a/test/rails/app-2.3.3.1/public/500.html b/test/rails/app-2.3.5/public/500.html
index e534a49..e534a49 100644
--- a/test/rails/app-2.3.3.1/public/500.html
+++ b/test/rails/app-2.3.5/public/500.html
diff --git a/test/rails/app-2.3.3.1/public/x.txt b/test/rails/app-2.3.5/public/x.txt
index e427984..e427984 100644
--- a/test/rails/app-2.3.3.1/public/x.txt
+++ b/test/rails/app-2.3.5/public/x.txt
diff --git a/test/unit/test_http_parser.rb b/test/unit/test_http_parser.rb
index 1b3faaf..0443b46 100644
--- a/test/unit/test_http_parser.rb
+++ b/test/unit/test_http_parser.rb
@@ -298,6 +298,45 @@ class HttpParserTest < Test::Unit::TestCase
     assert ! parser.keepalive?
   end
 
+  # some dumb clients add users because they're stupid
+  def test_absolute_uri_w_user
+    parser = HttpParser.new
+    req = {}
+    http = "GET http://user%20space@example.com/foo?q=bar HTTP/1.0\r\n\r\n"
+    assert_equal req, parser.headers(req, http)
+    assert_equal 'http', req['rack.url_scheme']
+    assert_equal '/foo?q=bar', req['REQUEST_URI']
+    assert_equal '/foo', req['REQUEST_PATH']
+    assert_equal 'q=bar', req['QUERY_STRING']
+
+    assert_equal 'example.com', req['HTTP_HOST']
+    assert_equal 'example.com', req['SERVER_NAME']
+    assert_equal '80', req['SERVER_PORT']
+    assert_equal "", http
+    assert ! parser.keepalive?
+  end
+
+  # since Mongrel supported anything URI.parse supported, we're stuck
+  # supporting everything URI.parse supports
+  def test_absolute_uri_uri_parse
+    "#{URI::REGEXP::PATTERN::UNRESERVED};:&=+$,".split(//).each do |char|
+      parser = HttpParser.new
+      req = {}
+      http = "GET http://#{char}@example.com/ HTTP/1.0\r\n\r\n"
+      assert_equal req, parser.headers(req, http)
+      assert_equal 'http', req['rack.url_scheme']
+      assert_equal '/', req['REQUEST_URI']
+      assert_equal '/', req['REQUEST_PATH']
+      assert_equal '', req['QUERY_STRING']
+
+      assert_equal 'example.com', req['HTTP_HOST']
+      assert_equal 'example.com', req['SERVER_NAME']
+      assert_equal '80', req['SERVER_PORT']
+      assert_equal "", http
+      assert ! parser.keepalive?
+    end
+  end
+
   def test_absolute_uri
     parser = HttpParser.new
     req = {}