summaryrefslogtreecommitdiffstats
path: root/module/obmc/wsgi/apps
diff options
context:
space:
mode:
authorDeepak Kodihalli <dkodihal@in.ibm.com>2017-07-08 12:28:20 -0500
committerDeepak Kodihalli <dkodihal@in.ibm.com>2017-07-08 12:28:20 -0500
commit0dc67226dd38d5e603c9abc9f443809010ae85ee (patch)
tree82862fecfdc6c4bf571d66ef777282fc5c4ab53b /module/obmc/wsgi/apps
parent9bc94997218bccf091f877a4e46ceb3339cefb2f (diff)
downloadphosphor-rest-server-0dc67226dd38d5e603c9abc9f443809010ae85ee.tar.gz
phosphor-rest-server-0dc67226dd38d5e603c9abc9f443809010ae85ee.zip
Set content-type to routes that had none set
Resolves openbmc/openbmc#1927. Change-Id: I05f0a1e37d8ebc83ebe1ff1d9aecba72ebc3aa39 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Diffstat (limited to 'module/obmc/wsgi/apps')
-rw-r--r--module/obmc/wsgi/apps/rest_dbus.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/module/obmc/wsgi/apps/rest_dbus.py b/module/obmc/wsgi/apps/rest_dbus.py
index f4ae606..3f98904 100644
--- a/module/obmc/wsgi/apps/rest_dbus.py
+++ b/module/obmc/wsgi/apps/rest_dbus.py
@@ -443,10 +443,11 @@ class PropertyHandler(RouteHandler):
class SchemaHandler(RouteHandler):
verbs = ['GET']
rules = '<path:path>/schema'
+ content_type = 'application/json'
def __init__(self, app, bus):
super(SchemaHandler, self).__init__(
- app, bus, self.verbs, self.rules)
+ app, bus, self.verbs, self.rules, self.content_type)
def find(self, path):
return self.try_mapper_call(
@@ -473,11 +474,12 @@ class SchemaHandler(RouteHandler):
class InstanceHandler(RouteHandler):
verbs = ['GET', 'PUT', 'DELETE']
rules = '<path:path>'
+ content_type = 'application/json'
request_type = dict
def __init__(self, app, bus):
super(InstanceHandler, self).__init__(
- app, bus, self.verbs, self.rules)
+ app, bus, self.verbs, self.rules, self.content_type)
def find(self, path, callback=None):
return {path: self.try_mapper_call(
OpenPOWER on IntegriCloud