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.11 Cookie

The HTTP protocol uses only the request and the immediate response to that request. It is not possible to keep a running session between the client and the server. It is not possible to keep any information between two requests to the server.

Netscape solved this problem by establishing a simple relation, during which it is possible to pass information from the server response to the subsequent request(s). The server writes a small piece of data called a cookie into its response. The Cooke is written in the Set-Cookie header line. The client repeats this cookie in the next request to this server in the Cooke header line. This creates a session that is not intended as a persistent TCP connection, but as a logical session created from HTTP requests and responses.

The main server initiates a session. In subsequent requests, the target server may use a cookie to determine the current state of the session. It may send back the Set-Cookie response header with the same or different...