[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-API] [PATCH] [rpc-light] Accept JSON string which contains UTF-XXX characters.
# HG changeset patch # User Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx> [rpc-light] Accept JSON string which contains UTF-XXX characters. Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx> diff -r 33811c04f39c rpc-light/jsonrpc.ml --- a/rpc-light/jsonrpc.ml Fri Dec 04 17:09:54 2009 +0000 +++ b/rpc-light/jsonrpc.ml Thu Dec 10 12:45:59 2009 +0000 @@ -154,10 +154,9 @@ | _ -> false let is_valid_unescaped_char c = - match (Char.code c) with - | 0x22 | 0x5c -> false - | x when 0x20 <= x && x <= 0x7f -> true (* only ASCII for now *) - | _ -> false + match c with + | '"' | '\\' | '\b' | '\x0c' | '\n' | '\r' | '\t' -> false + | _ -> true let clist_to_string cs = let len = List.length cs in Attachment:
xapi-libs-accept-utfX-when-parsing-json _______________________________________________ xen-api mailing list xen-api@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |