The format of the HTTP request and HTTP response messages are similar and will have following structure:
- An initial status line + CRLF ( Carriage Return + Line Feed ie. New Line )
- Zero or more header lines + CRLF
- A blank line ie. a CRLF
- An optioanl message body like file, query data or query output.
|
For example, a server response header looks as follows:
HTTP/1.1 200 OK
Content-Type: text/html
Header2: ...
...
HeaderN: ...
(Blank Line)
<!doctype ...>
<html>
<head>...</head>
<body>
...
</body>
</html>
|
The status line consists of the HTTP version (HTTP/1.1 in the
example), a status code (200 in the example), and a very short message
corresponding to the status code (OK in the example).
more...
No comments:
Post a Comment