HTTP working process and its status code

It’s a protocol that can make hyper text from server to web browser: it’s a protocol based on TCP/IP.
The http request: request line, header, the data requested.
The http response: status line, info head, and the html part
Http status code:
1: informational responses
2: successful responses
3. Redirects
4: client error
4. Server error

常见状态码:
200 OK //客户端请求成功
400 Bad Request //客户端请求有语法错误,不能被服务器所理解
401 Unauthorized //请求未经授权,这个状态代码必须和WWW-Authenticate报头域一起使用
403 Forbidden //服务器收到请求,但是拒绝提供服务
404 Not Found //请求资源不存在,eg:输入了错误的URL
500 Internal Server Error //服务器发生不可预期的错误
503 Server Unavailable //服务器当前不能处理客户端的请求,一段时间后可能恢复正常

The whole process of http working:
Connect the web browser(client) to server
Send http request
The server get that and send http response
Disconnect the TCP
And the web browser just start to do all that html and show it

posted @ 2020-10-29 10:14  EvanMeetTheWorld  阅读(17)  评论(0)    收藏  举报