Skip to Content
HTTP: The Definitive Guide
book

HTTP: The Definitive Guide

by David Gourley, Brian Totty, Marjorie Sayer, Anshu Aggarwal, Sailu Reddy
September 2002
Intermediate to advanced
656 pages
22h 14m
English
O'Reilly Media, Inc.
Content preview from HTTP: The Definitive Guide

What Real Web Servers Do

The Perl server we showed in Example 5-1 is a trivial example web server. State-of-the-art commercial web servers are much more complicated, but they do perform several common tasks, as shown in Figure 5-3:

Steps of a basic web server request

Figure 5-3. Steps of a basic web server request

  1. Set up connection—accept a client connection, or close if the client is unwanted.

  2. Receive request—read an HTTP request message from the network.

  3. Process request—interpret the request message and take action.

  4. Access resource—access the resource specified in the message.

  5. Construct response—create the HTTP response message with the right headers.

  6. Send response—send the response back to the client.

  7. Log transaction—place notes about the completed transaction in a log file.

The next seven sections highlight how web servers perform these basic tasks.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

REST API Design Rulebook

REST API Design Rulebook

Mark Masse
Kubernetes: Up and Running, 3rd Edition

Kubernetes: Up and Running, 3rd Edition

Brendan Burns, Joe Beda, Kelsey Hightower, Lachlan Evenson

Publisher Resources

ISBN: 1565925092Errata Page