Mercurial > emacs
comparison lisp/mail/rmail.el @ 6389:9b45e828c2a7
(rmail-convert-to-babyl-format): Check Content-Length field for consistency.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 17 Mar 1994 23:29:16 +0000 |
parents | 85693b7d5231 |
children | 185b1fd3a525 |
comparison
equal
deleted
inserted
replaced
6388:c82a7e9ae93b | 6389:9b45e828c2a7 |
---|---|
926 (forward-char -1) | 926 (forward-char -1) |
927 (and (search-forward "\ncontent-length: " | 927 (and (search-forward "\ncontent-length: " |
928 header-end t) | 928 header-end t) |
929 (let ((beg (point)) | 929 (let ((beg (point)) |
930 (eol (progn (end-of-line) (point)))) | 930 (eol (progn (end-of-line) (point)))) |
931 (read (buffer-substring beg eol))))))) | 931 (string-to-int (buffer-substring beg eol))))))) |
932 (and size (numberp size) (>= size 0) | 932 (and size |
933 (goto-char (+ header-end size)))) | 933 (if (and (natnump size) |
934 (<= (+ header-end size) (point-max)) | |
935 ;; Make sure this would put us at a position | |
936 ;; that we could continue from. | |
937 (save-excursion | |
938 (goto-char (+ header-end size)) | |
939 (skip-chars-forward "\n") | |
940 (or (eobp) | |
941 (and (looking-at "BABYL OPTIONS:") | |
942 (search-forward "\n\^_" nil t)) | |
943 (and (looking-at "\^L") | |
944 (search-forward "\n\^_" nil t)) | |
945 (let ((case-fold-search t)) | |
946 (looking-at mmdf-delim1)) | |
947 (looking-at "From ")))) | |
948 (goto-char (+ header-end size)) | |
949 (message "Ignoring invalid Content-Length field") | |
950 (sit-for 1 0 t)))) | |
934 | 951 |
935 (if (re-search-forward | 952 (if (re-search-forward |
936 (concat "^[\^_]?\\(" | 953 (concat "^[\^_]?\\(" |
937 rmail-unix-mail-delimiter | 954 rmail-unix-mail-delimiter |
938 "\\|" | 955 "\\|" |