From c9f68fc6294a59c31728bab9e01350c4b271fe30 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 30 Aug 2009 22:27:26 -0700 Subject: Ensure hex escaping is done in uppercase The pure variant was using lower-case output instead of upper case, the ext variant was actually fine in this case. This is for nginx output format compatibility. --- lib/clogger/pure.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/clogger/pure.rb') diff --git a/lib/clogger/pure.rb b/lib/clogger/pure.rb index 0a7aa24..ebbb1d6 100644 --- a/lib/clogger/pure.rb +++ b/lib/clogger/pure.rb @@ -62,7 +62,7 @@ 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}" } + s.gsub!(/(['"\x00-\x1f])/) { |x| "\\x#{$1.unpack('H2').first.upcase}" } s end -- cgit v1.2.3-24-ge0c7