mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +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
1 changed files with 6 additions and 1 deletions
|
@ -1608,7 +1608,12 @@ class WebhookSaltAPIHandler(SaltAPIHandler): # pylint: disable=W0223
|
|||
|
||||
ret = self.event.fire_event({
|
||||
'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)
|
||||
|
||||
self.write(self.serialize({'success': ret}))
|
||||
|
|
Loading…
Add table
Reference in a new issue