return \n.\n.\n at the end of articles. Protect against that.
(nntp-with-open-group): Allow debugging.
2005-05-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * nntp.el (nntp-next-result-arrived-p): Some news servers may
+ return \n.\n.\n at the end of articles. Protect against that.
+ (nntp-with-open-group): Allow debugging.
+
* nnheader.el (mail-header-set-extra): Make into a function
because I just could't understand how to quote the list properly.
;; a line with only a "." on it.
((eq (char-after) ?2)
(if (re-search-forward "\n\\.\r?\n" nil t)
- t
+ (progn
+ ;; Some broken news servers add another dot at the end.
+ ;; Protect against inflooping there.
+ (while (looking-at "^\\.\r?\n")
+ (forward-line 1))
+ t)
nil))
;; A result that starts with a 3xx or 4xx code is terminated
;; by a newline.
(condition-case nil
(progn ,@forms)
(quit
- (nntp-close-server)
+ (unless debug-on-quit
+ (nntp-close-server))
(signal 'quit nil))))
(when timer
(nnheader-cancel-timer timer)))