From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59551 Path: main.gmane.org!not-for-mail From: =?iso-8859-1?Q?Bj=F8rn_Mork?= Newsgroups: gmane.emacs.gnus.general Subject: Re: Using versions instead of XEmacs codenames in User-Agent Date: Mon, 10 Jan 2005 11:39:46 +0100 Organization: Decadents oven-ready Damosels Message-ID: <87sm59zhxp.fsf@obelix.mork.no> References: <87wtulzndx.fsf@obelix.mork.no> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1105352968 21795 80.91.229.6 (10 Jan 2005 10:29:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 Jan 2005 10:29:28 +0000 (UTC) Original-X-From: ding-owner+M8091@lists.math.uh.edu Mon Jan 10 11:29:21 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CnwnY-0006gJ-00 for ; Mon, 10 Jan 2005 11:29:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1CnwkV-0005eT-00; Mon, 10 Jan 2005 04:26:11 -0600 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1CnwkL-0005eL-00 for ding@lists.math.uh.edu; Mon, 10 Jan 2005 04:26:01 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1CnwkE-0006I1-DZ for ding@lists.math.uh.edu; Mon, 10 Jan 2005 04:25:54 -0600 Original-Received: from news by quimby.gnus.org with local (Exim 3.35 #1 (Debian)) id 1CnwkD-0006f6-00 for ; Mon, 10 Jan 2005 11:25:53 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 139 Original-NNTP-Posting-Host: 248.245.120.148.in-addr.arpa Original-X-Trace: quimby.gnus.org 1105352753 25611 148.120.245.248 (10 Jan 2005 10:25:53 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Mon, 10 Jan 2005 10:25:53 +0000 (UTC) User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:yDGFVxdaxO3MZdJppqgGo8nF0GM= Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: main.gmane.org gmane.emacs.gnus.general:59551 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59551 Steve Youngs writes: > * Bjørn Mork writes: > > Steve Youngs writes: > >> > >> Yep, however, IMHO, this... > >> > >> SXEmacs/22.1.1 (Aston Martin, berkeley-unix) > >> > >> doesn't look anywhere near as nice as... > >> > >> SXEmacs/22.1.1 "Aston Martin" (berkeley-unix) > > > Maybe. But it doesn't really matter since the first version uses a > > perfectly legal comment while the second is an invalid User-Agent > > field. > > OK, now I'm really confused. Because going by what you quoted about > tokens and separators, aren't both of them invalid? And if not, why > not? Oh, I left that as an exercise :-) More from RFC 2616: 14.43 User-Agent The User-Agent request-header field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests. The field can contain multiple product tokens (section 3.8) and comments identifying the agent and any subproducts which form a significant part of the user agent. By convention, the product tokens are listed in order of their significance for identifying the application. User-Agent = "User-Agent" ":" 1*( product | comment ) Example: User-Agent: CERN-LineMode/2.15 libwww/2.17b3 and Comments can be included in some HTTP header fields by surrounding the comment text with parentheses. Comments are only allowed in fields containing "comment" as part of their field value definition. In all other fields, parentheses are considered part of the field value. comment = "(" *( ctext | quoted-pair | comment ) ")" ctext = > Also, what the hell does RFC 2616 - "Hypertext Transfer Protocol -- > HTTP/1.1" have to do with email headers? I honestly don't understand > that at all? No, that's not very clear. I assume it's because that's the RFC where the User-Agent field is currently specified. RFC 2822 gives these generic rules for optional header fields: 3.6.8. Optional fields Fields may appear in messages that are otherwise unspecified in this standard. They MUST conform to the syntax of an optional-field. This is a field name, made up of the printable US-ASCII characters except SP and colon, followed by a colon, followed by any text which conforms to unstructured. The field names of any optional-field MUST NOT be identical to any field name specified elsewhere in this standard. optional-field = field-name ":" unstructured CRLF field-name = 1*ftext ftext = %d33-57 / ; Any character except %d59-126 ; controls, SP, and ; ":". For the purposes of this standard, any optional field is uninterpreted. which allows any syntax. However, when it comes to mail and Usenet user agents the current USEFOR draft is probably a better reference than both RFC 2822 and RFC 2616: http://www.ietf.org/internet-drafts/draft-ietf-usefor-usefor-02.txt Luckily, it seems to mostly agree with RFC 2616: 3.2.12 User-Agent The User-Agent header contains information about the user agent (typically a newsreader) generating the article, for statistical purposes and tracing of standards violations to specific software needing correction. It is intended that this header be suitable for use in Email. user-agent = "User-Agent:" SP 1*product CRLF product = [CFWS] token [CFWS] [ "/" product-version ] product-version = [CFWS] token [CFWS] This header MAY contain multiple product-tokens identifying the agent and any subproducts which form a significant part of the posting agent, listed in order of their significance for identifying the application. NOTE: This header supersedes the role performed redundantly by experimental headers such as X-Newsreader, X-Mailer, X-Posting-Agent, X-Http-User-Agent, and other headers previously used on Usenet and in Email for this purpose. Use of these experimental headers SHOULD be discontinued in favor of the single, standard User-Agent header. NOTE: [RFC2616] describes a similar facility for the HTTP protocol. This specification differs in that "{" and "}" are allowed in tokens ( and ) and comments are permitted wherever whitespace is allowed. IMHO, it's best using a syntax that conforms to USEFOR, RFC 2616 and RFC 2822 unless there are good reasons not to do so. That means sticking with the RFC 2616 definition even for mail and news user agents. But that's only an opionion. Bjørn -- Ignoramus!