From: Jens Geyer Date: Thu, 26 Dec 2013 17:55:33 +0000 (+0100) Subject: THRIFT-2299 TJsonProtocol implementation for Ruby does not allow for both possible... X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=1fb6847473169e2abfdd4b241ad4f2341842e8b1;p=common%2Fthrift.git THRIFT-2299 TJsonProtocol implementation for Ruby does not allow for both possible slash (solidus) encodings Patch: Jens Geyer --- diff --git a/lib/rb/lib/thrift/protocol/json_protocol.rb b/lib/rb/lib/thrift/protocol/json_protocol.rb index 2e850891..9f0069d6 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