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:
08a73ea
)
謎
author
yamat0jp
<yamat0jp@yahoo.co.jp>
Fri, 7 Sep 2018 11:33:59 +0000
(20:33 +0900)
committer
yamat0jp
<yamat0jp@yahoo.co.jp>
Fri, 7 Sep 2018 11:33:59 +0000
(20:33 +0900)
bot.py
patch
|
blob
|
history
diff --git
a/bot.py
b/bot.py
index
5b408b7
..
0d5aeff
100644
(file)
--- a/
bot.py
+++ b/
bot.py
@@
-55,8
+55,8
@@
class WebHookHandler(tornado.web.RequestHandler):
return ans
def post(self):
- header = self.request.headers
- body =
self.request.body.decode('utf-8'
)
+ header = self.request.headers
.get('X-Line-Signature')
+ body =
tornado.escape.json_decode(self.request.body
)
'''
hashid = hmac.new(header.get('X-Line-Signature'),
body.decode('utf-8'), hashlib.sha256).digest()