os-ken/ryu
IWASE Yusuke 1af384fa17 RPC: Specify encoding to msgpack.Packer/Unpacker
Currently, RPC requests using rpc_cli.py will crash on Python 3,
because the decoded string through msgpack-rpc is not str type
when the default encoding is not specified into msgpack.Unpacker.
On Python 2, bytes type is the same as str type, and this problem
does not occur.

The old spec of msgpack had no notation of the encoding, but now,
msgpack defines "UTF-8" as the default encoding and has the explicit
type definitions for String and Binary.
  https://github.com/msgpack/msgpack/blob/master/spec.md

This patch fixes to specify the encoding to msgpack.Packer/Unpacker
and enable to use Binary type when packing for the Python 3
compatibility.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-14 18:14:45 +09:00
..
app wsgi: Avoid using inspect.getargspec 2016-11-14 18:14:34 +09:00
base Avoid parallel executions of AppManager.close() 2016-07-01 11:30:01 +09:00
cmd contrib: Revert module path to ryu.contrib 2016-11-14 18:14:20 +09:00
contrib contrib/tinyrpc: Remove embedded tinyrpc, use upstream 2016-11-04 09:51:36 +09:00
controller Log OFPErrorMsg.data as ascii when type is OFPET_HELLO_FAILED 2016-10-25 16:23:07 +09:00
lib RPC: Specify encoding to msgpack.Packer/Unpacker 2016-11-14 18:14:45 +09:00
ofproto ofproto_v1_3_parser: Raise OFPTruncatedMessage exception on truncated messages 2016-10-12 09:08:52 +09:00
services RPC: Specify encoding to msgpack.Packer/Unpacker 2016-11-14 18:14:45 +09:00
tests RPC: Specify encoding to msgpack.Packer/Unpacker 2016-11-14 18:14:45 +09:00
topology topology: ignore cfm packets on packet in 2016-07-01 12:23:17 +09:00
__init__.py Ryu 4.8 2016-11-07 10:07:47 +09:00
cfg.py Adapt to namespace-less oslo 2015-05-19 15:39:27 +09:00
exception.py ofproto_v1_3_parser: Raise OFPTruncatedMessage exception on truncated messages 2016-10-12 09:08:52 +09:00
flags.py flags: Add CLI options for BGP application 2016-10-25 22:41:08 +09:00
hooks.py Removes unnecessary Windows requirements 2016-04-06 22:33:56 +03:00
log.py 'ConfigParser' is renamed to 'configparser' in Python 3 2015-04-14 05:31:42 +09:00
utils.py utils: Backward compatibility for 'imp.load_source' 2016-10-25 22:40:28 +09:00