Modular Software - Home PicLan-IP - Home

Using HTTP Header Fields

When a web browser retrieves a web page, a number of HTTP header fields are included with each page request.  These fields vary from browser to browser, but can be used by Coyote applications to control page processing. Here is an example of the HTTP header fields that are sent to the Coyote web server by your browser:
ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
ACCEPT-ENCODING gzip
HOST v-2052.easyco.net:50000
IF-MODIFIED-SINCE Thu, 20 Sep 2018 22:33:51 UTC
MAX-FORWARDS 10
USER-AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
X-CONNADDR 4.28.107.6:20480 54.167.18.170:43175
X-FORWARDED-FOR 54.167.18.170
X-FORWARDED-HOST coyote.modsoft.com
X-FORWARDED-SERVER v-2022.easyco.net


This table is built live with the actual values that your browser generated.  It is also possible that any intervening HTTP proxy server may have also added header fields.

There are two basic techniques for querying HTTP header fields. You can query single fields with the statement:

PL_GET_HDR var FROM 'field name' ELSE ...
An example of using this statement is here:
PL_GET_HDR USER.AGENT FROM 'USER-AGENT' ELSE USER.AGENT = 'Undefined'
Your user-agent is:  CCBot/2.0 (https://commoncrawl.org/faq/)
This statement is ideal for specifically querying a single header field value.  If you want to see all of the values, you can look directly at the Coyote common variables where these values are stored:
ST$HTTP.HDR This is a dynamic array of values that contains the names of each existing header field.  If the same header field name occurs multiple times, then only a single entry in the ST$HTTP.HDR variable will be entered.
ST$HTTP.VAL This is a dynamic array of values that contains the values of each existing header field.  If the same header field name occurs multiple times, then each instance will be stored as a seperate sub-value in this variable.
If you would like to see how this page queries the HTTP headers, you can look here.

Modular Software - Home PicLan-IP - Home

© Copyright 1996-1998  Modular Software Corporation.All rights Reserved.