From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59548 Path: main.gmane.org!not-for-mail From: Steve Youngs Newsgroups: gmane.emacs.gnus.general Subject: Re: Using versions instead of XEmacs codenames in User-Agent Date: Mon, 10 Jan 2005 09:09:11 +1000 Organization: Linux Users - Fanatics Dept. Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: sea.gmane.org 1105312409 9164 80.91.229.6 (9 Jan 2005 23:13:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 9 Jan 2005 23:13:29 +0000 (UTC) Keywords: emacs,gnus,xemacs,user-agent,type,product,codename,version,gnus-user-agent,tokens,tag,system Original-X-From: ding-owner+M8088@lists.math.uh.edu Mon Jan 10 00:13:23 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 1CnmFO-0003bT-00 for ; Mon, 10 Jan 2005 00:13:22 +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 1CnmC1-0004t4-00; Sun, 09 Jan 2005 17:09:53 -0600 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1CnmBs-0004sw-00 for ding@lists.math.uh.edu; Sun, 09 Jan 2005 17:09:44 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1CnmBl-0000pA-6N for ding@lists.math.uh.edu; Sun, 09 Jan 2005 17:09:37 -0600 Original-Received: from cpe-61-9-212-151.qld.bigpond.net.au ([61.9.212.151] helo=bastard.youngs.au.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1CnmBY-00065Y-00 for ; Mon, 10 Jan 2005 00:09:25 +0100 Original-Received: from bastard.youngs.au.com (localhost [127.0.0.1]) by bastard.youngs.au.com (8.12.11/8.12.11) with ESMTP id j09N9C1D028983 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 10 Jan 2005 09:09:12 +1000 Original-Received: (from steve@localhost) by bastard.youngs.au.com (8.12.11/8.12.11/Submit) id j09N9CFk028982; Mon, 10 Jan 2005 09:09:12 +1000 X-Authentication-Warning: bastard.youngs.au.com: steve set sender to steve@youngs.au.com using -f Original-To: ding@gnus.org X-Face: #/1'_-|5_1$xjR,mVKhpfMJcRh8"k}_a{EkIO:Ox<]@zl/Yr|H,qH#3jJi6Aw(Mg@"!+Z"C N_S3!3jzW^FnPeumv4l#,E}J.+e%0q(U>#b-#`~>l^A!_j5AEgpU)>t+VYZ$:El7hLa1:%%L=3%B>n K{^jU_{& Mail-Copies-To: never X-X-Day: Only 2431231 days till X-Day. Got Slack? X-URL: X-Request-PGP: X-OpenPGP-Fingerprint: 1659 2093 19D5 C06E D320 3A20 1D27 DB4B A94B 3003 X-Discordian-Date: Setting Orange, the 10th day of Chaos, 3171. X-Attribution: SY Mail-Followup-To: ding@gnus.org In-Reply-To: (Reiner Steib's message of "Sun, 09 Jan 2005 21:55:02 +0100") User-Agent: Gnus/5.110003 (No Gnus v0.3) SXEmacs/22.1.1 (Aston Martin, linux) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: main.gmane.org gmane.emacs.gnus.general:59548 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59548 --=-=-= Content-Transfer-Encoding: quoted-printable * Reiner Steib writes: > On Sun, Jan 09 2005, Steve Youngs wrote: >> The default settings should give a User-Agent header similar to the >> one in this message's headers. > | User-Agent: Gnus/5.110003 (No Gnus v0.3) SXEmacs/22.1.1 "Aston Martin= " (linux) > Is a quoted string like "Aston Martin" allowed in RFC 2616?=20=20 ,----[ from RFC 2616 ] | 14.43 User-Agent |=20 | 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. |=20 | User-Agent =3D "User-Agent" ":" 1*( product | comment ) |=20 | Example: |=20 | User-Agent: CERN-LineMode/2.15 libwww/2.17b3 |=20 | 3.8 Product Tokens |=20 | Product tokens are used to allow communicating applications to | identify themselves by software name and version. Most fields using | product tokens also allow sub-products which form a significant part | of the application to be listed, separated by white space. By | convention, the products are listed in order of their significance | for identifying the application. |=20 | product =3D token ["/" product-version] | product-version =3D token |=20 | Examples: |=20 | User-Agent: CERN-LineMode/2.15 libwww/2.17b3 | Server: Apache/0.8.4 |=20 | Product tokens SHOULD be short and to the point. They MUST NOT be | used for advertising or other non-essential information. Although any | token character MAY appear in a product-version, this token SHOULD | only be used for a version identifier (i.e., successive versions of | the same product SHOULD only differ in the product-version portion of | the product value). `---- Going by that, using quoted text "like this" should be fine. > Upto now, we had it inside the bracket: > | [...] XEmacs/21.4 (Security Through Obscurity, berkeley-unix) 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) :-) > [...] >> + * gnus.el (gnus-user-agent-display-codename): New. When non-nil >> + and a (S)XEmacs codename exists, display it in the User-Agent >> + header.=20 > I'd prefer not to introduce another variable. We already have > `gnus-user-agent' for this. It is confusing to have several variables > for the same thing. How about making `gnus-user-agent' a list? > ,----[ C-h v gnus-user-agent RET ] > | gnus-user-agent's value is (gnus emacs type) [...] > With a customize buffer like for the list: > ,---- > | [X] gnus > | [X] emacs > | [X] system: Value Menu type > | [ ] codename > `---- Cool. Can we make the default on (S)XEmacs to include the codename? Just to keep as close as possible to current settings. ,---- | (defcustom gnus-user-agent (if (featurep '(or sxemacs xemacs)) | '(emacs gnus type codename) | '(emacs gnus type)) | "Which information should be exposed in the User-Agent header. |=20 | Can be a list of symbols or a string. Valid symbols are `gnus' | \(show Gnus version\) and `emacs' \(show Emacs version\). In | addition to the Emacs version, you can add `codename' \(show | \(S\)XEmacs codename\) or either `config' \(show system | configuration\) or `type' \(show system type\). If you set it to | a string, be sure to use a valid format, see RFC 2616." |=20 | :version "21.4" | :group 'gnus-message | :type '(choice (list (set :inline t | (const gnus :tag "Gnus version") | (const emacs :tag "Emacs version") | (choice :tag "system" | (const type :tag "system type") | (const config :tag "system configuration")) | (const codename :tag "Emacs codename"))) | (string))) `---- > Is there any benefit of using `running-[s]xemacs' instead of (featurep > '[s]xemacs)? Not really. Four less keystrokes :-) > + ((or (featurep 'sxemacs) (featurep 'xemacs)) You could write this as: ((featurep '(or sxemacs xemacs)) But I'm not sure how GNU/Emacs would cope with that. In this instance it probably shouldn't matter because GNU/Emacs wouldn't get to this part of the code. > -(defcustom gnus-user-agent 'emacs-gnus-type > +(defcustom gnus-user-agent '(emacs gnus type) I'd prefer my suggestion above (defaulting to including codename for (S)XEmacs).=20 Other than that, I think your patch is great! And works well. --=20 |---------------------| | Te audire no possum. | | Musa sapientum fixa est in aure. | |-------------------------------------| --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Eicq - The XEmacs ICQ Client iEYEABECAAYFAkHhuZgACgkQHSfbS6lLMAMohgCg3m4eBbYBN3v/Dnlv/4EaR3No c88An00RhRtLp/4aXt9YtWyll64OIOJo =RO+q -----END PGP SIGNATURE----- --=-=-=--