O'Reilly logo

Sams Teach Yourself CGI in 24 Hours, Second Edition by Rafe Colburn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

HTTP Request Headers

When a user types a URL into the Web client and “sends it on its way” to fetch a Web page, the Web client uses that URL to create an HTTP request header. This request header is sent to the Web server, which then decodes the header and sends back an appropriate HTTP reply.

I provided many examples of simple request headers in Appendix B, “Response Codes and Reason Phrases.” They consisted of a single GET line. Request headers can be far more complex and extensive than that. Here is the header that my Netscape Web client produced when I asked it to fetch the root index at a fictitious Web site:

 GET / HTTP/1.0 Connection: Keep-Alive User-Agent: Mozilla/4.04 [en] (WinNT; U) Host: www.mywebsite.com Accept: image/gif, image/x-xbitmap, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required