When the UP.Link server makes an HTTP request to an HDML service, it adds headers that provide information about the subscriber, the UP.Phone, and the UP.Link server. These headers are converted by the Web server to environment variables, which you can retrieve using facilities such as the C function, getenv(), or the special Perl array, @ENV. The whoami.cgi example CGI script included with the UP.SDK provides a simple example of how to retrieve these environment variables.
The following table lists the environment variables set by the UP.Link HTTP request headers.
| Environment Variable | Description |
|---|---|
|
HTTP_ACCEPT_ LANGUAGE | Specifies the language(s) in use on the device. The variable specifies a comma-separated list of language-country identifiers as defined in ISO 639 and the two character country codes as defined in ISO 3166. A list of these codes is provided at: http://www.unicode.org
The following are some examples
HDML services should check this variable and attempt to deliver localized content in the specified language. For more information on character set and localization issues, see Chapter 9, Creating Globally Accessible HDML Services |
|
HTTP_COOKIE
| HTTP cookies in the standard format compatible with RFC-2109. The UP.Link server and UP.Simulator both store persistent cookies. The UP.Simulator manages cookies in HTTP direct mode and stores them in a cookie cache file. In UP.Link mode, the server manages cookies and never delivers them to the UP.Simulator. For more information about UP.Simulator modes, see Chapter 1 in the UP.SDK Tools and APIs Reference.
To set cookies from a CGI script, see the |
|
HTTP_REFERER
|
The URL of the deck originating the request. This variable is set only if the task that generates the request sets the |
|
HTTP_USER_AGENT
|
UP.Link/uplink_version
UP.Browser/3.1-ALCS UP.Link/3.1.1 |
|
HTTP_X_UP_DEVCAP_ CHARSET | The character set used by the device. For a list of character set names, see Character set names. Normally, you don't need to use this variable, because the UP.Link server transcodes the character set to the character understood by your service. For more information about character set transcoding and other character set issues, see Chapter 9, Creating Globally Accessible HDML Services |
|
HTTP_X_UP_DEVCAP_ IMMED_ALERT | A value specifying whether the device supports immediate alerts: |
|
HTTP_X_UP_DEVCAP_ MAX_PDU | The maximum packet size supported by the device. Normally, this is 1492. |
|
HTTP_X_UP_DEVCAP_ NUMSOFTKEYS | |
|
HTTP_X_UP_DEVCAP_ SCREENPIXELS | The width and height of the display in pixels. For example, the following value indicates the display is 264 pixels wide by 116 pixels high. |
|
HTTP_X_UP_DEVCAP_ SMARTDIALING | A value specifying whether the device supports smart dialing: |
|
HTTP_X_UP_FAX_ ACCEPTS | A comma-delimited string specifying acceptable fax types (MIME content types). The following types are commonly supported by 3.1 UP.Link servers: |
|
HTTP_X_UP_FAX_ ENCODINGS | A comma-delimited list of the fax encoding types that the UP.Link server accepts. By default, the UP.Link server always accepts faxes with 7-bit encoding. If this HTTP header is not specified, that is the only type it accepts. |
|
HTTP_X_UP_FAX_ LIMIT | The maximum fax size (in bytes) that the UP.Link server accepts. |
|
HTTP_X_UP_SUBNO
| The subscriber ID. The ID is globally unique (in other words, across all UP.Link servers throughout the world) and has a maximum length of 32 characters. |
|
HTTP_X_UP_UPLINK
|