1xx HTTP Status Codes Explanation
HTTP 1xx Status Codes – Informational
A web server responds with a 1xx HTTP status code in the response when the received request is under processing by the server and these codes are kind of acknowledgement to the client.
1xx response typically consists of a HTTP status line, a header and is terminated by an empty line. 1xx status codes are only defined in version HTTP/1.1 and not supported by HTTP/1.0 hence, web servers should not respond with 1xx code to an HTTP/1.0 client.
There are only three status codes used in 1xx series and each code is explained in detail below:
100 – Continue
The server sends a code “100 – Continue” to indicate that the part of the request is received and the client can continue sending the remaining request. Normally client first sends a request header along with a statement “Expect: 100-continue” and receives the 100 code from server to proceed sending the request body.
The “expect” statement in the initial request is used to avoid sending the further request body in case of initial request header itself is rejected by the server. In this case server responds with “417 – Expectation Failed” and the client should stop sending the further request body.
101 – Switching Protocols
When the request from the client asks the server to switch the communication protocol and the server accepts it, then the code “100 – Switching Protocol” is received from the server as an acknowledgement to the request.
102 – Processing (WebDAV)
When a WebDAV request is sent with multiple sub-requests involving complex requirements, the server may need considerable time to process the request and sends this code “102 – Processing”. The purpose of this code is to avoid timeout errors at client side by informing the client that the server has received the request and processing it.