
HTTP HeadersHyperText Transfer Protocol (HTTP) is the method by which Web servers and Web browsers communicate with each other. Web pages are composed of a header and a body. The header contains information about the body so that the Web browser will know how to treat the body of the page. Using HTTP HeadersWhen a Web browser requests a simple HTML page, the Web server generates the HTTP header information, and the body is the content of the HTML page requested. When the Web browser requests a CGI script, the CGI programmer must supply the header and body information. An HTTP header is separated from the body of the page by a blank line. In Perl, two newline characters, \n\n, indicate this line. The following are some of the HTTP headers most commonly used by CGI programmers:
More informationHTTP/1.1 includes the complete specification for HTTP. This is a very technical document, and is more detailed than most CGI programmers usually need. Local information about MIME types is available within the UT Web Central FAQS. |