about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-12-05 17:53:43 -0800
committerEric Wong <normalperson@yhbt.net>2011-12-05 17:53:43 -0800
commitba72b12030864a05fc88bc94a3b699971cc70b0a (patch)
tree3929aee60b86b286f6c6e34050bb4404aadba5d3 /test
parent9f6aece724a79d5a19723a781766fdb1725ddcf3 (diff)
downloadclogger-ba72b12030864a05fc88bc94a3b699971cc70b0a.tar.gz
This matches the behavior of nginx 1.0.9
Diffstat (limited to 'test')
-rw-r--r--test/test_clogger.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_clogger.rb b/test/test_clogger.rb
index 35a211a..10640e2 100644
--- a/test/test_clogger.rb
+++ b/test/test_clogger.rb
@@ -390,6 +390,15 @@ class TestClogger < Test::Unit::TestCase
     assert_equal "a\\x0Ab\n", str.string
   end
 
+  def test_escape_crazy_delete
+    str = StringIO.new
+    app = lambda { |env| [302, {}, [] ] }
+    cl = Clogger.new(app, :logger => str, :format => "$http_cookie")
+    @req["HTTP_COOKIE"] = "a\x7f\xff"
+    cl.call(@req)
+    assert_equal "a\\x7F\\xFF\n", str.string
+  end
+
   def test_request_uri_fallback
     str = StringIO.new
     app = lambda { |env| [ 200, {}, [] ] }