 |
Zamples Client HTTP User-Agent Strings
Each client must identify itself with a unique string.
Failure to include an HTTP user agent may result in the Zamples server rejecting the request with the following
error message:
| 417 Missing Zamples HTTP User-Agent Header |
The REST interface may reject queries that do not contain an HTTP User-Agent header |
The following has been adapted from
Mozilla User-Agent string
specification, which is itself based upon RFC 1945
and RFC 2068.
The format is:
ProductToken (Comment) ZamplesClient (VendorProductToken|VendorComment)*
Where:
| ProductToken |
YourClientNameHere/ ClientVersion |
| ClientVersion |
Major.minor |
| Major |
Integer indicating major release number. |
| Minor |
If non-zero, it shall be a three-digit, zero-filled number, i.e. 001.
If zero, zero is fine. |
| Comment |
(Platform ;
Security ;
OS-or-CPU ;
Localization information
[; PrereleaseVersion]? )
[; Optional Other Comments]* ) |
| Platform |
Allowed values:
- Windows for all Microsoft Windows environments
- Macintosh for all MacOS environments
- X11 for X Window System environments
- etc.
|
| Security |
Allowed values:
- N for no security
- U for strong security
- I for weak security
|
| OS-or-CPU |
Values for Windows systems:
- Win3.11 for Windows 3.11
- WinNT3.51 for Windows NT 3.51
- WinNT4.0 for Windows NT 4.0
- Windows NT 5.0 for Windows 2000
- Win95 for Windows 95
- Win98 for Windows 98
- Win 9x 4.90 for Windows Me
- Win 2000 Home for Windows 2000 Home
- Win 2000 Pro for Windows 2000 Professional
- Win 2000 Server for Windows 2000 Server
- Win XP Express for Windows XP Express
- Win XP Home for Windows XP Home
- Win XP Pro for Windows XP Professional
- Win XP Server for Windows XP Server
- Win 2003 Server for Windows 2003 Server
- Win Longhorn Home for Windows Longhorn Home
- Win Longhorn Pro for Windows Longhorn Professional
- Win Longhorn Server for Windows Longhorn Server
- etc.
Values for MacOS systems shall be:
- 68K for 68k hardware
- PPC for PowerPC hardware
- Intel for Intel hardware
- etc.
Values for *nix systems shall be the output of the
command uname -sm (also accessible as the
sysname and machine fields of the utsname
structure.) (Do not use the output of uname -srm, since the
release field of the utsname structure is considered
to reveal too much information about the system, such as potential security holes.) |
| Localization Information |
Language Tag as described in the standards RFC 1945 and RFC 2068. Examples:
en, en-US, es, es-CO, ja, ja-JP, etc. |
| PrereleaseVersion |
String whose first character is [a-zA-Z]. By convention, used to indicate
pre-release versions, such as beta quality software, or milestones. This should
not be present in final release software. |
| ZamplesProductToken |
Gecko/ZamplesVersion
The Zamples product token allows identification of the version of Zamples server API
that the Zamples client was developed to support. |
| ZamplesVersion |
Date in the format YYYYMMDD that the client was built. |
| ApplicationProductToken, Application Comment |
The form of their product token and comment is not specified
here, but should adhere to the HTTP standards. |
| ( VendorProductToken | VendorComment ) |
Product tokens for client applications adhering to this specification.
Format and content shall be vendor-specific, but should adhere to the HTTP standards. |
| * |
Zero or more of the preceedingtoken are allowed. |
| ? |
Zero or one of the preceeding token are allowed. |
Examples
| A Zamples.com client release |
ZClient/1.000 (windows; U; NT4.0; en-us) ZamplesClient/25250101 |
| A branded release based on the same codebase as the client above |
ZClient/1.000 (Macintosh; N; PPC; ja) ZamplesClient/25250101 MegaCorpBrowser/1.0 (MegaCorp, Inc.) |
| A re-branded release |
ZClient/1.876 (X11; U; Linux 2.2.12-20 i686, en) ZamplesClient/25250101 BlahBlah/5.432b1 (C-MindSpring) |
| An independantly created client |
TinyBrowser/2.0 (TinyBrowser Comment) ZamplesClient/20201231 |
Implementation notes for applications, vendors, and extensions
The best way for applications, vendors, and extensions (if needed) to add to default preferences to
add VendorProductTokens or VendorComments is
to add a default preference of the form
general.useragent.extra.identifier. All
of the general.useragent.extra.* preferences will have
their string values added to the User-Agent string in alphabetical
order by identifier. For example:
pref("general.useragent.extra.megabrowser", "MegaCorpBrowser/1.0 (MegaCorp, Inc.)");
pref("general.useragent.extra.tinydistro", "TinyDistroLinux/2.3");
|
|  |