What Takes Place During an HTTP Session

Now you’ll learn exactly what happens when a Web browser requests a document from a Web server. Understanding the details of how Web browsers and servers communicate will come in handy later when I’m discussing how to build CGI scripts that take advantage of this architecture. An illustration of the steps in this process appears in Figure 6.1.

Figure 6.1. The steps in an HTTP session.

Step 1: Establish a TCP Connection

Before the HTTP protocol can go to work, the computer that is running the Web browser has to connect over the network to the computer running the Web server. This connection is established ...

Get Sams Teach Yourself CGI in 24 Hours, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.