OSDN Git Service
(root)
/
simple-tornado-bot
/
simple-tornado-bot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
626bffa
)
header
author
yamat0jp
<yamat0jp@yahoo.co.jp>
Fri, 7 Sep 2018 10:14:59 +0000
(19:14 +0900)
committer
yamat0jp
<yamat0jp@yahoo.co.jp>
Fri, 7 Sep 2018 10:14:59 +0000
(19:14 +0900)
bot.py
patch
|
blob
|
history
diff --git
a/bot.py
b/bot.py
index
16052b0
..
e97c029
100644
(file)
--- a/
bot.py
+++ b/
bot.py
@@
-58,7
+58,7
@@
class WebHookHandler(tornado.web.RequestHandler):
header = self.request.headers
if header.get('Content-Type','') == 'application/json':
body = tornado.escape.json_decode(self.request.body)
- hashid = hmac.new(header
['X-Line-Signature']
.encode('utf-8'),
+ hashid = hmac.new(header
.get('X-Line-Signature')
.encode('utf-8'),
body.encode('utf-8'), hashlib.sha256).digest()
signature = base64.b64encode(hashid)
handle = WebhookHandler(ch)