springMvc 处理HttpRepsonse时 同时设置response.setStatus(301)和response.sendRedirect("/hello");时,HTTP response Headers status is 302调换两个的位置也是如此,所以想理解下具体的原理相关代码 //input
response.sendRedirect("/hello"); response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);// outputRequest URL: http://localhost:9999/account/listRequest Method: GET
Status Code: 302 Remote Address: [::1]:9999Referrer Policy: no-referrer-when-downgrade
HTTP/1.1 302Location: http://localhost:9999/helloContent-Length: 0Date: Sun, 29 Jul 2018 17:38:31 GMT
- 2 回答
- 0 关注
- 1342 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消