Skip to content

Commit 9ee671e

Browse files
forfunsbinarywang
authored andcommitted
#317 修复小程序请求二维码时对错误类型检查(text/plain 改为 app/json)
* 更新messageSend自动向wxCpConfigStorage里获取agentId * 修复小程序请求二维码时对错误类型检查(text/plain 改为 app/json) * 修复小程序请求二维码时对错误类型检查(text/plain 改为 app/json)
1 parent 657c87b commit 9ee671e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/util/http/QrCodeRequestExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public File execute(String uri, WxMaQrcodeWrapper ticket) throws WxErrorExceptio
4848
InputStream inputStream = InputStreamResponseHandler.INSTANCE.handleResponse(response);) {
4949
Header[] contentTypeHeader = response.getHeaders("Content-Type");
5050
if (contentTypeHeader != null && contentTypeHeader.length > 0
51-
&& ContentType.TEXT_PLAIN.getMimeType().equals(contentTypeHeader[0].getValue())) {
51+
&& ContentType.APPLICATION_JSON.getMimeType().equals(contentTypeHeader[0].getValue())) {
5252
String responseContent = Utf8ResponseHandler.INSTANCE.handleResponse(response);
5353
throw new WxErrorException(WxError.fromJson(responseContent));
5454
}

0 commit comments

Comments
 (0)