With WebOB 1.7.0+, "charset" can not be omitted when constructing
Request/Response instance and exception will occur if omitted.
Example of Error occured on Travis-CI.
Traceback (most recent call last):
...(snip)
File "/home/travis/build/iwaseyusuke/ryu/ryu/app/ofctl_rest.py", line 220,
in wrapper
body=json.dumps(ret))
File
"/home/travis/build/iwaseyusuke/ryu/.tox/py34/lib/python3.4/site-packages/webob/response.py",
line 310, in __init__
"You cannot set the body to a text value without a "
nose.proxy.TypeError: You cannot set the body to a text value without a
charset
...(snip)
This patch adds wrapper classes of Request/Response for setting
charset="UTF-8" by default and fixes REST Apps to use this classes,
and fixes this problem.
IWASE Yusuke (2):
wsgi: Wrapper classes of Request/Response in WebOb
ryu/app: Use Request/Response wrappers in REST Apps
ryu/app/ofctl_rest.py | 7 +++----
ryu/app/rest_conf_switch.py | 6 +++---
ryu/app/rest_firewall.py | 3 +--
ryu/app/rest_qos.py | 7 ++++---
ryu/app/rest_router.py | 2 +-
ryu/app/rest_topology.py | 6 ++++--
ryu/app/simple_switch_rest_13.py | 6 ++++--
ryu/app/simple_switch_websocket_13.py | 11 +++++------
ryu/app/wsgi.py | 30 +++++++++++++++++++++++++++++-
ryu/tests/unit/app/test_ofctl_rest.py | 12 ++++++------
ryu/tests/unit/app/test_wsgi.py | 2 +-
11 files changed, 61 insertions(+), 31 deletions(-)
--
2.7.4
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel