Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


CGI: Input, Client Header Lines

The header lines recieved from the client, if any, are placed into the environment with the prefix HTTP_ followed by the header name. These variables are specific to requests made with HTTP. Interpretation of these variables may depend on the value of SERVER_PROTOCOL.

The HTTP header name

  • is converted to upper case;
  • "-" characters are changed to "_" characters;
  • has "HTTP_" prepended to give the environment variable name.
The header data may be presented as sent by the client, or may be rewritten in ways which preserves its semantics. If multiple headers with the same field-name are received then they must be rewritten as a single header having the same semantics. A header that is received on more than one line must be merged onto a single line.

The server must, if necessary, change the representation of the data (for example, the character set) to be appropriate for a CGI environment variable.

The server is not required to create environment variables for all the headers that it receives. It may exclude any headers which it has already processed, such as Authorization, Content-type, and Content-length. In particular, it may remove any headers carrying authentication information, such as "Authorization"; it may remove headers whose value is available to the script via other variables, such as "Content-Length" and "Content-Type".

If necessary, the server may choose to exclude any or all of these headers if including them would exceed any system environment limits.

A couple of the often-used headers are:-

  • HTTP_REFERER
    The URL of the refering page, i.e. the page that the client is following the link from.

  • HTTP_USER_AGENT
    The browser the client is using to send the request. General format: software/version library/version.


Up to => Home / Authoring / CGI / Input




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers