summaryrefslogtreecommitdiffstats
path: root/module/obmc/wsgi/apps
diff options
context:
space:
mode:
Diffstat (limited to 'module/obmc/wsgi/apps')
-rw-r--r--module/obmc/wsgi/apps/rest_dbus.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/obmc/wsgi/apps/rest_dbus.py b/module/obmc/wsgi/apps/rest_dbus.py
index b4a6d0f..55d5b44 100644
--- a/module/obmc/wsgi/apps/rest_dbus.py
+++ b/module/obmc/wsgi/apps/rest_dbus.py
@@ -844,7 +844,8 @@ class ContentCheckerPlugin(object):
self.error_str = "Expecting content type '%s', got '%s'"
def __call__(self, *a, **kw):
- if self.expected_type and \
+ if request.method in ['PUT', 'POST', 'PATCH'] and \
+ self.expected_type and \
self.expected_type != request.content_type:
abort(415, self.error_str % (self.expected_type,
request.content_type))
OpenPOWER on IntegriCloud