mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-29 09:38:19 +08:00
#356 修复QrCodeRequestExecutor类MimeType比较的bug
This commit is contained in:
@ -48,7 +48,8 @@ public class QrCodeRequestExecutor implements RequestExecutor<File, AbstractWxMa
|
||||
InputStream inputStream = InputStreamResponseHandler.INSTANCE.handleResponse(response);) {
|
||||
Header[] contentTypeHeader = response.getHeaders("Content-Type");
|
||||
if (contentTypeHeader != null && contentTypeHeader.length > 0
|
||||
&& ContentType.APPLICATION_JSON.getMimeType().equals(contentTypeHeader[0].getValue())) {
|
||||
&& ContentType.APPLICATION_JSON.getMimeType()
|
||||
.equals(ContentType.parse(contentTypeHeader[0].getValue()).getMimeType())) {
|
||||
String responseContent = Utf8ResponseHandler.INSTANCE.handleResponse(response);
|
||||
throw new WxErrorException(WxError.fromJson(responseContent));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user