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:
d415712
)
もう一回
author
yamat0jp
<yamat0jp@yahoo.co.jp>
Fri, 7 Sep 2018 10:13:36 +0000
(19:13 +0900)
committer
yamat0jp
<yamat0jp@yahoo.co.jp>
Fri, 7 Sep 2018 10:13:36 +0000
(19:13 +0900)
bot.py
patch
|
blob
|
history
diff --git
a/bot.py
b/bot.py
index
6772216
..
16052b0
100644
(file)
--- a/
bot.py
+++ b/
bot.py
@@
-56,7
+56,7
@@
class WebHookHandler(tornado.web.RequestHandler):
def post(self):
header = self.request.headers
- if header
['Content-Type']
== 'application/json':
+ 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'),
body.encode('utf-8'), hashlib.sha256).digest()