Updated Branches:
  refs/heads/master 4d1b0eac7 -> 1fb684747

THRIFT-2299 TJsonProtocol implementation for Ruby does not allow for both 
possible slash (solidus) encodings

Patch: Jens Geyer


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/1fb68474
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/1fb68474
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/1fb68474

Branch: refs/heads/master
Commit: 1fb6847473169e2abfdd4b241ad4f2341842e8b1
Parents: 4d1b0ea
Author: Jens Geyer <[email protected]>
Authored: Thu Dec 26 18:55:33 2013 +0100
Committer: Jens Geyer <[email protected]>
Committed: Thu Dec 26 19:01:20 2013 +0100

----------------------------------------------------------------------
 lib/rb/lib/thrift/protocol/json_protocol.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/1fb68474/lib/rb/lib/thrift/protocol/json_protocol.rb
----------------------------------------------------------------------
diff --git a/lib/rb/lib/thrift/protocol/json_protocol.rb 
b/lib/rb/lib/thrift/protocol/json_protocol.rb
index 2e85089..9f0069d 100644
--- a/lib/rb/lib/thrift/protocol/json_protocol.rb
+++ b/lib/rb/lib/thrift/protocol/json_protocol.rb
@@ -507,13 +507,13 @@ module Thrift
     def read_json_string(skipContext = false)
       # This string's characters must match up with the elements in 
escape_char_vals.
       # I don't have '/' on this list even though it appears on www.json.org --
-      # it is not in the RFC
-      escape_chars = "\"\\bfnrt"
+      # it is not in the RFC -> it is. See RFC 4627
+      escape_chars = "\"\\/bfnrt"
 
       # The elements of this array must match up with the sequence of 
characters in
       # escape_chars
       escape_char_vals = [
-        '"', '\\', '\b', '\f', '\n', '\r', '\t',
+        '"', '\\', '/', '\b', '\f', '\n', '\r', '\t',
       ]
 
       if !skipContext

Reply via email to