From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
When pass form to cherrypy, it is stored in cherrypy.request.params,
so adjust parse_request for this change.
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
src/kimchi/control/utils.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/kimchi/control/utils.py b/src/kimchi/control/utils.py
index fbd5177..8620c1d 100644
--- a/src/kimchi/control/utils.py
+++ b/src/kimchi/control/utils.py
@@ -80,6 +80,8 @@ def parse_request():
except ValueError:
e = OperationFailed('KCHAPI0006E')
raise cherrypy.HTTPError(400, e.message)
+ elif mime_in_header('Content-Type', 'multipart/form-data'):
+ return cherrypy.request.params
else:
e = OperationFailed('KCHAPI0007E')
raise cherrypy.HTTPError(415, e.message)
--
1.8.3.2