伪造 referer
HttpURLConnection conn = (HttpURLConnection) new URL("http://localhost:8080/Test/Single").openConnection();conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon;)");conn.setRequestProperty("Accept-Encoding", "gzip");conn.setRequestProperty("referer", "www.163.com");conn.setRequestProperty("cookie", "www.163.com");InputStream input = conn.getInputStream();conn.disconnect();
?