Book Image

Understanding TCP/IP

By : CP Books a.s.
Book Image

Understanding TCP/IP

By: CP Books a.s.

Overview of this book

This book covers in detail the Open System Interconnection (OSI) reference model and the TCP/IP protocols that operate that different layers. Its coverage includes various application protocols. The authors explain in an easy-to-read style networking concepts and protocols, with examples that make the book a practical guide in addition to its coverage of theory.
Table of Contents (20 chapters)
19
Index

14.8 The HTTP Request

The HTTP request (and response) structure reminds us of an email structure. At first sight, we see the difference only in the first line. The first line of a request contains a method, and the first line of a response contains status line.

An HTTP request consists of the following (see Figure 14.10):

  • A method: HTTP version 1.1 supports the following methods: GET, POST, HEAD, OPTIONS, TRACE, CONNECT, PUT, and DELETE. The PUT and DELETE methods are not always implemented.
  • A header: This consists of individual header fields. Every header field starts with a keyword (for example, Host). A colon followed by a space terminates the keyword. After a space, the header field parameters can follow. The whole header field is always terminated by an end of line (CR+LF). Only one header field is compulsory, namely, the Host header field.
  • A blank line: I.e. CR+LF twice; the first CR+LF ends the last line of a header field. (CR is a cursor return character (0D16), and LF is a new line...