File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
weixin-java-common/src/main/java/me/chanjar/weixin/common/util/http Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public String getFileName() throws WxErrorException {
58
58
private String getFileName (CloseableHttpResponse response ) throws WxErrorException {
59
59
Header [] contentDispositionHeader = response .getHeaders ("Content-disposition" );
60
60
if (contentDispositionHeader == null || contentDispositionHeader .length == 0 ) {
61
- throw new WxErrorException ("无法获取到文件名" );
61
+ throw new WxErrorException ("无法获取到文件名,Content-disposition为空 " );
62
62
}
63
63
64
64
return this .extractFileNameFromContentString (contentDispositionHeader [0 ].getValue ());
@@ -76,15 +76,15 @@ private String getFileName(Response response) throws WxErrorException {
76
76
77
77
private String extractFileNameFromContentString (String content ) throws WxErrorException {
78
78
if (content == null || content .length () == 0 ) {
79
- throw new WxErrorException ("无法获取到文件名" );
79
+ throw new WxErrorException ("无法获取到文件名,content为空 " );
80
80
}
81
81
82
82
Matcher m = PATTERN .matcher (content );
83
83
if (m .matches ()) {
84
84
return m .group (1 );
85
85
}
86
86
87
- throw new WxErrorException ("无法获取到文件名" );
87
+ throw new WxErrorException ("无法获取到文件名,header信息有问题 " );
88
88
}
89
89
90
90
}
You can’t perform that action at this time.
0 commit comments