From bf1ce7ff168f63c60b0988c3879aa201999c8f43 Mon Sep 17 00:00:00 2001 From: forfuns Date: Fri, 18 Aug 2017 11:11:12 +0800 Subject: [PATCH] =?UTF-8?q?#317=20=E4=BF=AE=E5=A4=8D=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E8=AF=B7=E6=B1=82=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=97=B6?= =?UTF-8?q?=E5=AF=B9=E9=94=99=E8=AF=AF=E7=B1=BB=E5=9E=8B=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=EF=BC=88text/plain=20=E6=94=B9=E4=B8=BA=20app/json=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 更新messageSend自动向wxCpConfigStorage里获取agentId * 修复小程序请求二维码时对错误类型检查(text/plain 改为 app/json) * 修复小程序请求二维码时对错误类型检查(text/plain 改为 app/json) --- .../binarywang/wx/miniapp/util/http/QrCodeRequestExecutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/util/http/QrCodeRequestExecutor.java b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/util/http/QrCodeRequestExecutor.java index dc482dff25..3c026f4a18 100644 --- a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/util/http/QrCodeRequestExecutor.java +++ b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/util/http/QrCodeRequestExecutor.java @@ -48,7 +48,7 @@ public File execute(String uri, WxMaQrcodeWrapper ticket) throws WxErrorExceptio InputStream inputStream = InputStreamResponseHandler.INSTANCE.handleResponse(response);) { Header[] contentTypeHeader = response.getHeaders("Content-Type"); if (contentTypeHeader != null && contentTypeHeader.length > 0 - && ContentType.TEXT_PLAIN.getMimeType().equals(contentTypeHeader[0].getValue())) { + && ContentType.APPLICATION_JSON.getMimeType().equals(contentTypeHeader[0].getValue())) { String responseContent = Utf8ResponseHandler.INSTANCE.handleResponse(response); throw new WxErrorException(WxError.fromJson(responseContent)); }