HTTP represents headers as a composition of parts and parameters. A simple header will have only one part, for example:
More complex headers consist of a number of parts, separated by semicolon (;) or comma (,) characters. In RFC 2616, these are defined with the EBNF notation 'rule - A construct "#" is defined, similar to "*", for defining lists of elements...'
An example of a multiple-part header is:
The three parts have values text/*, text/html and */* respectively. When setting up a header like this, the client only needs to specify the parts, and need not be concerned with separator characters. Separators are handled automatically by the built-in header codec.
Some header fields allow one or more parameters to be associated with individual header parts. An example of a header with parameters is:
The Content-Type header has a single part (value 'text/html') that has a single parameter (named 'charset', value 'ISO-8859-4'). Again, the client need only be concerned with setting part and parameter values; the separators including the '=' character are dealt with automatically.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.