about summary refs log tree commit homepage
path: root/lib/clogger/pure.rb
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 /lib/clogger/pure.rb
parent9f6aece724a79d5a19723a781766fdb1725ddcf3 (diff)
downloadclogger-ba72b12030864a05fc88bc94a3b699971cc70b0a.tar.gz
This matches the behavior of nginx 1.0.9
Diffstat (limited to 'lib/clogger/pure.rb')
-rw-r--r--lib/clogger/pure.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/clogger/pure.rb b/lib/clogger/pure.rb
index 63907ae..8c3d3dc 100644
--- a/lib/clogger/pure.rb
+++ b/lib/clogger/pure.rb
@@ -98,7 +98,9 @@ private
   def byte_xs(s)
     s = s.dup
     s.force_encoding(Encoding::BINARY) if defined?(Encoding::BINARY)
-    s.gsub!(/(['"\x00-\x1f])/) { |x| "\\x#{$1.unpack('H2').first.upcase}" }
+    s.gsub!(/(['"\x00-\x1f\x7f-\xff])/) do |x|
+      "\\x#{$1.unpack('H2').first.upcase}"
+    end
     s
   end