修复特殊符号 转义的问题
This commit is contained in:
@ -464,7 +464,7 @@ public class FileHandlerService implements InitializingBean {
|
|||||||
url = WebUtils.encodeUrlFileName(url);
|
url = WebUtils.encodeUrlFileName(url);
|
||||||
if(UrlEncoderUtils.hasUrlEncoded(fileName) && UrlEncoderUtils.hasUrlEncoded(suffix)){ //判断文件名是否转义
|
if(UrlEncoderUtils.hasUrlEncoded(fileName) && UrlEncoderUtils.hasUrlEncoded(suffix)){ //判断文件名是否转义
|
||||||
try {
|
try {
|
||||||
fileName = URLDecoder.decode(fileName, "UTF-8").replaceAll("\\+", "%2B").replaceAll(" ", "%20");
|
fileName = URLDecoder.decode(fileName, "UTF-8").replaceAll("\\+", "%20").replaceAll(" ", "%20");
|
||||||
suffix = URLDecoder.decode(suffix, "UTF-8");
|
suffix = URLDecoder.decode(suffix, "UTF-8");
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@ -55,7 +55,7 @@ public class DownloadUtils {
|
|||||||
String urlStr = null;
|
String urlStr = null;
|
||||||
try {
|
try {
|
||||||
SslUtils.ignoreSsl();
|
SslUtils.ignoreSsl();
|
||||||
urlStr = fileAttribute.getUrl().replaceAll("\\+", "%2B").replaceAll(" ", "%20");
|
urlStr = fileAttribute.getUrl().replaceAll("\\+", "%20").replaceAll(" ", "%20");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("忽略SSL证书异常:", e);
|
logger.error("忽略SSL证书异常:", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user