Merge pull request #28705 from cachedout/tornado_http_headers

Account for new headers class in tornado 4.3
This commit is contained in:
Pedro Algarvio 2015-11-09 19:24:33 +00:00
commit f40c617bad

View File

@ -1608,7 +1608,12 @@ class WebhookSaltAPIHandler(SaltAPIHandler): # pylint: disable=W0223
ret = self.event.fire_event({ ret = self.event.fire_event({
'post': self.raw_data, 'post': self.raw_data,
'headers': self.request.headers, # In Tornado >= v4.0.3, the headers come
# back as an HTTPHeaders instance, which
# is a dictionary. We must cast this as
# a dictionary in order for msgpack to
# serialize it.
'headers': dict(self.request.headers),
}, tag) }, tag)
self.write(self.serialize({'success': ret})) self.write(self.serialize({'success': ret}))