[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Do you understand this?
From: |
Andreas Schwab |
Subject: |
Re: Do you understand this? |
Date: |
Sun, 06 Mar 2005 23:58:29 +0100 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/22.0.50 (gnu/linux) |
"Robert J. Chassell" <address@hidden> 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, address@hidden
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."
- Do you understand this?, Richard Stallman, 2005/03/06
- Re: Do you understand this?, Nic Ferrier, 2005/03/06
- Re: Do you understand this?, Robert J. Chassell, 2005/03/06
- Re: Do you understand this?,
Andreas Schwab <=
- Re: Do you understand this?, Jason Rumney, 2005/03/06
- Re: Do you understand this?, Robert J. Chassell, 2005/03/07
- Re: Do you understand this?, Jason Rumney, 2005/03/07
- Re: Do you understand this?, Robert J. Chassell, 2005/03/07
- Re: Do you understand this?, Nic Ferrier, 2005/03/07
- Re: Do you understand this?, Robert J. Chassell, 2005/03/08
- Re: Do you understand this?, Richard Stallman, 2005/03/09
- Re: Do you understand this?, Nic Ferrier, 2005/03/06