- 第三方平台获取accessToken时为什么会返回48001?
调用接口:https://api.weixin.qq.com/sns/oauth2/component/access_token 公众号已授权,并且所有的功能都已勾选,但是在调用接口时仍然报错 返回错误信息{"errcode":48001,"errmsg":"api unauthorized, rid: 62a457b9-6d8f6026-06a04d7f"}
2022-06-11 - 接收component_verify_ticket事件时PostDa偶尔为空,从而导致解析XML失败
看了日志,并非是每次都为空,postdata有值时j当PostData为空时,会导致解析XML报错 Premature end of file. nonce、timestamp、msg_signature始终有值
2022-05-16 - 接收component_verify_ticket时,偶尔会发生读取数据错误是什么原因?
@RequestMapping(value = "/getComponentVerifyTicket") public String getComponentVerifyTicket(HttpServletRequest request, HttpServletResponse response) throws Exception { log.info("接收component_verify_ticket 或 authorized事件"); String nonce = request.getParameter("nonce"); String timestamp = request.getParameter("timestamp"); String msgSignature = request.getParameter("msg_signature"); StringBuilder sb = new StringBuilder(); BufferedReader in = request.getReader(); String line; while ((line = in.readLine()) != null) { sb.append(line); } String postData = sb.toString(); log.info("nonce: " + nonce); log.info("timestamp: " + timestamp); log.info("msgSignature: " + msgSignature); log.info("postData: " + postData); authService.handleAuthEvent(timestamp, nonce, msgSignature,postData); return "success"; } 获取的postData偶尔会为 [Fatal Error] :-1:-1: Premature end of file. 请问这是什么原因?代码一直没有修改过,但是每天都会有几次接收到的请求是这样的,从而导致数据报错
2022-05-11