- 第三方平台-授权事件接收配置URL无法接收微信推送验证票据,nginx日志状态码499
微信开放平台下我的第三方平台已经配置 授权事件接收配置URL ,在我的服务器nginx日志上看到日志如下图 remote_addr:81.69.101.193 remote_user:- time_local:[26/Nov/2024:09:43:21 +0800] request:"POST /event/authorize?signature=c16b56a2df3785cd30a9959a587526aa8aa95778×tamp=1732585401&nonce=615166801&encrypt_type=aes&msg_signature=2b32019b16503042a92b81c7b9303fcd90163dd5 HTTP/1.1" status:499 body_bytes_sent:0 http_referer:"-" request_time:0.000 upstream_status:- upstream_response_time:0.000 http_user_agent:"Mozilla/4.0" http_x_forwarded_for:"-" 报错信息499,参考官方文档,打印了upstream的信息,请官方帮忙排查并解决问题
11-26 - 微信公众号之测试号的开发者基本配置处官方文档案例的错误
https://developers.weixin.qq.com/doc/offiaccount/Getting_Started/Getting_Started_Guide.html 官方文档关键代码如下: # -*- coding: utf-8 -*- # filename: handle.py import hashlib import web class Handle(object): def GET(self): try: data = web.input() if len(data) == 0: return "hello, this is handle view" signature = data.signature timestamp = data.timestamp nonce = data.nonce echostr = data.echostr token = "xxxx" #请按照公众平台官网\基本配置中信息填写 list = [token, timestamp, nonce] list.sort() sha1 = hashlib.sha1() map(sha1.update, list) hashcode = sha1.hexdigest() print "handle/GET func: hashcode, signature: ", hashcode, signature if hashcode == signature: return echostr else: return "" except Exception, Argument: return Argument
10-29