From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Do you understand this? Date: Sun, 06 Mar 2005 23:58:29 +0100 Message-ID: References: <87sm38jyhm.fsf@tapsellferrier.co.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1110150091 21206 80.91.229.2 (6 Mar 2005 23:01:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 6 Mar 2005 23:01:31 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 07 00:01:30 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D84kT-0004rI-He for ged-emacs-devel@m.gmane.org; Mon, 07 Mar 2005 00:01:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D8548-0006nm-0X for ged-emacs-devel@m.gmane.org; Sun, 06 Mar 2005 18:21:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D850k-0004z2-PN for emacs-devel@gnu.org; Sun, 06 Mar 2005 18:18:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D850T-0004ou-C3 for emacs-devel@gnu.org; Sun, 06 Mar 2005 18:17:55 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D850S-0004nO-PE for emacs-devel@gnu.org; Sun, 06 Mar 2005 18:17:53 -0500 Original-Received: from [195.135.220.2] (helo=Cantor.suse.de) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1D84hj-0004wb-E1 for emacs-devel@gnu.org; Sun, 06 Mar 2005 17:58:31 -0500 Original-Received: from hermes.suse.de (hermes-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 7C14B157457B; Sun, 6 Mar 2005 23:58:30 +0100 (CET) Original-To: bob@rattlesnake.com X-Yow: As a FAD follower, my BEVERAGE choices are rich and fulfilling! In-Reply-To: (Robert J. Chassell's message of "Sun, 6 Mar 2005 22:32:56 +0000 (UTC)") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34256 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34256 "Robert J. Chassell" writes: > Accept: text/plain;=20 > q=3D0.5, text/html, text/x-dvi;=20 > q=3D0.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.=20 > > 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 =3D "Accept" ":" #( media-range [ accept-params ] ) media-range =3D ( "*/*" | ( type "/" "*" ) | ( type "/" subtype ) ) *( ";" parameter ) accept-params =3D ";" "q" "=3D" qvalue *( accept-extension ) accept-extension =3D ";" token [ "=3D" ( token | quoted-string ) ] > Thus, the above could be formatted like this > > Accept: text/plain; q=3D0.5,=20 > text/html, text/x-dvi; q=3D0.8,=20 > text/x-c > > and mean the same as > > Accept: text/plain ; q=3D0.5,=20 > text/html, text/x-dvi; q=3D0.8,=20 > text/x-c ; q=3D1.0 > > Is this the case? Close. Accept: text/plain; q=3D0.5,=20 text/html ; q=3D1, text/x-dvi; q=3D0.8,=20 text/x-c ; q=3D1 Andreas. --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany Key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."