diff options
Diffstat (limited to 'module')
-rw-r--r-- | module/obmc/wsgi/apps/rest_dbus.py | 3 |
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)) |