From e18829136f567b316fee1dda265c92bbafd14657 Mon Sep 17 00:00:00 2001 From: tiansh Date: Thu, 25 Mar 2021 09:39:38 +0800 Subject: [PATCH] =?UTF-8?q?2021-03-25=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/hellohao/controller/AdminController.java | 1 + .../interceptor/XssHttpServletRequestWrapper.java | 1 - src/main/java/cn/hellohao/utils/TestUrl.java | 11 ++--------- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/main/java/cn/hellohao/controller/AdminController.java b/src/main/java/cn/hellohao/controller/AdminController.java index 648a6ce..4d558ae 100644 --- a/src/main/java/cn/hellohao/controller/AdminController.java +++ b/src/main/java/cn/hellohao/controller/AdminController.java @@ -82,6 +82,7 @@ public class AdminController { } return "admin/index"; }else{ + System.out.println("重定向到首页"); return "redirect:/"; } } diff --git a/src/main/java/cn/hellohao/interceptor/XssHttpServletRequestWrapper.java b/src/main/java/cn/hellohao/interceptor/XssHttpServletRequestWrapper.java index e59c9a2..28583df 100644 --- a/src/main/java/cn/hellohao/interceptor/XssHttpServletRequestWrapper.java +++ b/src/main/java/cn/hellohao/interceptor/XssHttpServletRequestWrapper.java @@ -87,7 +87,6 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper { String line = ""; StringBuilder body = new StringBuilder(); int counter = 0; - // 读取POST提交的数据内容 BufferedReader reader = new BufferedReader(new InputStreamReader(stream, Charset.forName("UTF-8"))); try { diff --git a/src/main/java/cn/hellohao/utils/TestUrl.java b/src/main/java/cn/hellohao/utils/TestUrl.java index 2049e12..2dd367c 100644 --- a/src/main/java/cn/hellohao/utils/TestUrl.java +++ b/src/main/java/cn/hellohao/utils/TestUrl.java @@ -5,14 +5,8 @@ import java.net.URL; import java.net.URLConnection; public class TestUrl { - - public static void main(String[] args) { - - //testUrl("http://1.3.3.3/test"); - //最好使用下面这个,上面那个超时时间不定,所以可能会导致卡住的情况 - testUrlWithTimeOut("http://tc.hellohao.cn2/getNoticeText", 2000); - } - + //最好使用下面这个,上面那个超时时间不定,所以可能会导致卡住的情况 +// testUrlWithTimeOut("http://tc.hellohao.cn2/getNoticeText", 2000); public static void testUrl(String urlString){ long lo = System.currentTimeMillis(); @@ -44,6 +38,5 @@ public class TestUrl { url = null; return false; } - //System.out.println(System.currentTimeMillis()-lo); } } \ No newline at end of file