When the UP.Link Server makes an HTTP request to a WML 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: The following are some examples
WML 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. |
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 CookieCache 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 Guide.
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 you specify |
HTTP_USER_AGENT
| |
HTTP_X_UP_DEVCAP_ IMMED_ALERT |
A value specifying whether the device does ( |
HTTP_X_UP_DEVCAP_ MAX_PDU | The maximum packet size supported by the device (normally 1492 but configurable by the UP.Link operator). |
HTTP_X_UP_DEVCAP_ NUMSOFTKEYS | |
HTTP_X_UP_DEVCAP_ SCREENPIXELS |
The width and height of the display in pixels. For example, the value |
HTTP_X_UP_DEVCAP_ SCREENCHARS | |
HTTP_X_UP_DEVCAP_ SCREENDEPTH | |
HTTP_X_UP_DEVCAP_ MSIZE | |
HTTP_X_UP_DEVCAP_ NUMSOFTKEYS | |
HTTP_X_UP_DEVCAP_ SOFTKEYSIZE | A value specifying the maximum number of characters allowed for softkey labels. |
HTTP_X_UP_DEVCAP_ ISCOLOR | |
HTTP_X_UP_DEVCAP_ IMMED_ALERT |
A value specifying whether the device does (1) or does |
HTTP_X_UP_DEVCAP_ SMARTDIALING |
A value specifying whether the device does ( |
HTTP_X_UP_FAX_ ACCEPTS | A comma-delimited string specifying acceptable fax types (MIME content types). UP.Link Servers (version 3.0 and above) commonly support the following types:
|
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 you omit this HTTP header, that is the only type it accepts. Other types UP.Link Servers may accept are: 8-bit or base64. |
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
|