![]() ![]()
|
Header Management
Good Intranet Server receives HTTP requests from a handheld and forwards them to their destination Internet hosts. Header management makes it possible for you to configure Good Intranet Server so that when it receives a handheld request intended for designated hosts it adds or modifies one or more HTTP headers in the request.
Header management settings are useful for accessing sites that are not configured to recognize Good Intranet (or other types of wireless) handhelds.
For example, the handheld might send Good Intranet as its user agent, but Good Intranet is not recognized by Hotmail. You can specify that the User-Agent header in all HTTP requests sent to hotmail.com is to be set to Mozilla/4.0, instead of Good Intranet.
You can use the default header-management property settings in the config.props file to change the User-Agent.
As a second example, you can add an email address header to all HTTP requests and set the header value to the email address of the handheld sending a request. When a web server receives a request it can then use the handheld email address for billing or other purposes. Inserting a header for email addresses is provided through the default header-management property settings in the config.props file.
You specify headers, header values, and the hosts that receive them by associating each of these with a header rule. A header rule is defined through three properties:
- header.rule_name.header
- header.rule_name.value
- header.rule_name.hosts
In each of these properties, rule_name is replaced by the name assigned to the header rule. For example, in the default header properties, there is a header rule for assigning an email address header to all HTML requests. The rule name is email and correspondingly there are three email properties:
- header.email.header
- header.email.value
- header.email.hosts
header.rule_name.header.This property specifies the name of the header to be inserted in an HTTP request or, if the header is already present, to be modified.
Example 1:
header.mozilla_ua.header User-Agent
In this example, the rule name is mozilla_ua and the rule is set to apply to the User-Agent header.
Example 2:
header.email.header GI_EMAIL
In this example, the rule name is email and the rule is set to apply to a GI_EMAIL header. Since GI_EMAIL is not a standard HTTP header, Good Intranet Server will insert this header into requests.
header.rule_name.valueThis property specifies the value to be assigned to the header. The value is treated as a string and accepts variables representing either the value of a header (%header_name%) or the value of a handheld making a request.
Example 1:
header.email.header GI_EMAIL
header.email.value %gi_emailaddress%In this example, the email rule specifies that a GI_EMAIL header is to be inserted in HTTP requests and that the value assigned to the header is to be the email address of the requesting handheld.
Example 2:
header.html_first.header Accept
header.html_first.value text/html, %Accept%In this example, the rule html_first assigns the Accept header the literal value text/html, followed by the received value of the Accept header. For example, if the Accept header in the request received from the handheld is:
Accept: text/vnd.wap.wml, text/plain, text/html
Good Intranet Server modifies the header to appear as:
Accept: text/html, text/vnd.wap.wml, text/plain, text/html
The modified header ensures that a web server always sees text/html as the first element in the header.
Example 3:
header.mozilla_ua.header User-Agent
header.mozilla_ua.value Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; %User-Agent%)In this example, the rule mozilla_ua sets the User-Agent header to the literal value Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; followed by the received value of the User-Agent header, followed by a close-parenthesis. For example, if the value of the User-Agent header sent by the handheld is:
Good Intranet 3.6.12 (PocketPC; Good Intranet; OS v. 4.4)
The header value sent to the destination web server is:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Good Intranet 3.6.12 (PocketPC; Good Intranet; OS v. 4.4))
This ensures that destination web servers view the handheld as compatible with Mozilla/4.0, even if they do not recognize the user-agent string for Good Intranet, which identifies the handheld's user agent.
header.rule_name.hostsThis property specifies the hosts that the rule applies to. If there are multiple hosts, enter them as a space-separated list.
At the beginning of a host name, you can use an asterisk (*) as a wildcard to represent one or more components of the name. The following are all acceptable:
You cannot use an asterisk (*) as a wildcard within a host name or as part of a component:
// The following are not valid uses of `*'
header.bad_rule1.hosts Good Intranet.*.com
header.bad_rule2.hosts *oogle.comDefault Header-Management Properties
The default header-management properties include:
|
Good Technology www.good.com Voice: 1 866-7-BE-GOOD sales@good.com |
![]() ![]()
|