"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?
Yes. A media-type is a major-type / minor-type plus an optional list
of parameters which are separated from themselves and the major/minor
type info by semi-colons, eg:
text/plain; charset=utf-8; otherparam=xxx; q=0.5
> If that is the case, then the above sequency looks to me to favor
>
> * text/x-c as the highest priority;
>
> * text/html, text/x-dvi both equally as the second priorty; and,
>
> * text/plain as the third, lowest priority.
No quality specifier indicates priority 1.0 (the highest).
> But I do not know anything about this and would like to be told more.
>
> An alternative formatting is that semi-colons precede q settings, and
> that if a format lacks a q setting, it has the highest priority.
>
> 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
My original was cut straight out of rfc2616 and is formatted badly (I
think to empahsise the syntax over any arbritary textual ordering).
A more sensible textual rendering would look like this:
Accept: text/plain; q=0.5,
text/html; q=1.0,
text/x-dvi; q=0.8,
text/x-c; q=1.0
Hope that's clearer.
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel