mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #28705 from cachedout/tornado_http_headers
Account for new headers class in tornado 4.3
This commit is contained in:
commit
f40c617bad
@ -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}))
|
||||||
|
Loading…
Reference in New Issue
Block a user