+2003-10-20 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-msg.el (nnspool-rejected-article-hook): Remove defvar.
+ (xemacs-codename): Move defvar to gnus-util.el.
+
+ * gnus-util.el (xemacs-codename): Defvar when compiling.
+
+2003-10-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * spam-report.el (spam-report-url-ping-plain): Include a
+ User-Agent.
+
+ * gnus-msg.el (gnus-extended-version): Use it.
+
+ * gnus-util.el (gnus-emacs-version): Separated out into own
+ function.
+
2003-10-19 Reiner Steib <Reiner.Steib@gmx.de>
* message.el (message-mode-field-menu): Added
2003-10-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * gnus-sum.el (gnus-nov-parse-line): Remove condition-cases.
+
* mml.el (mml-insert-mime): Quote mml.
2003-10-19 Katsumi Yamaoka <yamaoka@jpl.org>
(concat gnus-v " " mime-edit-user-agent-value)
gnus-v)))
(t
- (let* ((system-v
- (cond
- ((eq gnus-user-agent 'emacs-gnus-config)
- system-configuration)
- ((eq gnus-user-agent 'emacs-gnus-type)
- (symbol-name system-type))
- (t nil)))
- (emacs-v
- (cond
- ((eq gnus-user-agent 'gnus)
- nil)
- ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$"
- emacs-version)
- (concat (format (if (boundp 'MULE)
- "Mule/2.3 (based on Emacs %s)"
- "Emacs/%s")
- (match-string 1 emacs-version))
- (if system-v
- (concat " (" system-v ")")
- "")))
- ((string-match
- "\\([A-Z]*[Mm][Aa][Cc][Ss]\\)[^(]*\\(\\((beta.*)\\|'\\)\\)?"
- emacs-version)
- (concat
- (match-string 1 emacs-version)
- (format "/%d.%d" emacs-major-version emacs-minor-version)
- (if (match-beginning 3)
- (match-string 3 emacs-version)
- "")
- (if (boundp 'xemacs-codename)
- (concat
- " (" xemacs-codename
- (if system-v
- (concat ", " system-v ")")
- ")"))
- "")))
- (t emacs-version))))
- (setq user-agent (if (stringp gnus-user-agent)
- gnus-user-agent
- (concat gnus-v
+ (setq user-agent (if (stringp gnus-user-agent)
+ gnus-user-agent
+ (concat gnus-v
+ (let ((emacs-v (gnus-emacs-version)))
(when emacs-v
(concat " " emacs-v))))))))
(when max-column
(push (pop list1) res)))
(nconc (nreverse res) list1 list2))))
+(eval-when-compile
+ (defvar xemacs-codename))
+
+(defun gnus-emacs-version ()
+ (let ((system-v
+ (cond
+ ((eq gnus-user-agent 'emacs-gnus-config)
+ system-configuration)
+ ((eq gnus-user-agent 'emacs-gnus-type)
+ (symbol-name system-type))
+ (t nil))))
+ (cond
+ ((eq gnus-user-agent 'gnus)
+ nil)
+ ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version)
+ (concat (format (if (boundp 'MULE)
+ "Mule/2.3 (based on Emacs %s)"
+ "Emacs/%s")
+ (match-string 1 emacs-version))
+ (if system-v
+ (concat " (" system-v ")")
+ "")))
+ ((string-match
+ "\\([A-Z]*[Mm][Aa][Cc][Ss]\\)[^(]*\\(\\((beta.*)\\|'\\)\\)?"
+ emacs-version)
+ (concat
+ (match-string 1 emacs-version)
+ (format "/%d.%d" emacs-major-version emacs-minor-version)
+ (if (match-beginning 3)
+ (match-string 3 emacs-version)
+ "")
+ (if (boundp 'xemacs-codename)
+ (concat
+ " (" xemacs-codename
+ (if system-v
+ (concat ", " system-v ")")
+ ")"))
+ "")))
+ (t emacs-version))))
+
(provide 'gnus-util)
;;; gnus-util.el ends here
80))
(error "Could not open connection to %s" host))
(set-marker (process-mark tcp-connection) (point-min))
- (process-send-string tcp-connection
- (format "GET %s HTTP/1.1\nHost: %s\n\n"
- report host)))))
+ (process-send-string
+ tcp-connection
+ (format "GET %s HTTP/1.1\nUser-Agent: %s (spam-report.el)\nHost: %s\n\n"
+ report (gnus-emacs-version) host)))))
(defun spam-report-url-ping-mm-url (host report)
"Ping a host through HTTP, addressing a specific GET resource. Use