"Robert J. Chassell" <[EMAIL PROTECTED]> writes: > Accept: text/plain; > q=0.5, text/html, text/x-dvi; > q=0.8, text/x-c > > If sent in an HTTP request for a resource /fred the above Accept > headers tells the server that the user will ideally accept /fred as an > HTML document or a text/x-c document. > > I do not understand. > > Am I right in formatting the statement such that semi-colons have a > higher precedence than commas?
The header's value is a comma separated list of elements, where each one can contain parameters separated by semicolons. The "q" parameter defaults to 1 if absent. Accept = "Accept" ":" #( media-range [ accept-params ] ) media-range = ( "*/*" | ( type "/" "*" ) | ( type "/" subtype ) ) *( ";" parameter ) accept-params = ";" "q" "=" qvalue *( accept-extension ) accept-extension = ";" token [ "=" ( token | quoted-string ) ] > Thus, the above could be formatted like this > > Accept: text/plain; q=0.5, > text/html, text/x-dvi; q=0.8, > text/x-c > > and mean the same as > > Accept: text/plain ; q=0.5, > text/html, text/x-dvi; q=0.8, > text/x-c ; q=1.0 > > Is this the case? Close. Accept: text/plain; q=0.5, text/html ; q=1, text/x-dvi; q=0.8, text/x-c ; q=1 Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel