From: Andreas Schwab <schwab@suse.de>
Cc: emacs-devel@gnu.org
Subject: Re: Do you understand this?
Date: Sun, 06 Mar 2005 23:58:29 +0100 [thread overview]
Message-ID: <je6504l6ui.fsf@sykes.suse.de> (raw)
In-Reply-To: <m1D84Iy-0004RGC@rattlesnake.com> (Robert J. Chassell's message of "Sun, 6 Mar 2005 22:32:56 +0000 (UTC)")
"Robert J. Chassell" <bob@rattlesnake.com> 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, schwab@suse.de
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."
next prev parent reply other threads:[~2005-03-06 22:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-06 19:11 Do you understand this? Richard Stallman
2005-03-06 20:44 ` Nic Ferrier
2005-03-06 22:32 ` Robert J. Chassell
2005-03-06 22:58 ` Andreas Schwab [this message]
2005-03-06 23:05 ` Jason Rumney
2005-03-07 15:37 ` Robert J. Chassell
2005-03-07 17:10 ` Jason Rumney
2005-03-07 23:46 ` Robert J. Chassell
2005-03-08 0:34 ` Nic Ferrier
2005-03-08 18:41 ` Robert J. Chassell
2005-03-09 16:58 ` Richard Stallman
2005-03-06 23:12 ` Nic Ferrier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=je6504l6ui.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).