可能情况:
1:服务器端不支持请求的http版本协议,可能是可能请求的是http1.1,服务器端只支持http1.0
2:请求地址不严谨,/前后是没有空格的,有空格,http请求格式非常严格,必须按照要求的格式.
GET/sample.jspHTTP/1.1
Accept:image/gif.image/jpeg,*/*
Accept-Language:zh-cn
Connection:Keep-Alive
Host:localhost
User-Agent:Mozila/4.0(compatible;MSIE5.01;Window NT5.0)
Accept-Encoding:gzip,deflate
username=jinqiao&password=1234
3:请求的方法里有输出,导致前端误判,算成了505