* 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? ,----[ 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 | | 3.8 Product Tokens | | 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. | | product = token ["/" product-version] | product-version = token | | Examples: | | User-Agent: CERN-LineMode/2.15 libwww/2.17b3 | Server: Apache/0.8.4 | | 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. > 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. | | 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." | | :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). Other than that, I think your patch is great! And works well. -- |---------------------| | Te audire no possum. | | Musa sapientum fixa est in aure. | |-------------------------------------|