Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Cc: Florian Weimer <fw@deneb.enyo.de>, ding@gnus.org
Subject: Re: Large *.pif base64 attachments and Gnus...
Date: Sun, 05 Aug 2001 01:36:48 +0200	[thread overview]
Message-ID: <ilud76bs8hb.fsf@barbar.josefsson.org> (raw)
In-Reply-To: <m3zo9f4mx3.fsf@SnowWhite.SuSE.cz> (Pavel@Janik.cz's message of "Sat, 04 Aug 2001 21:58:48 +0200")

Pavel@Janik.cz (Pavel Janík) writes:

>    From: Florian Weimer <fw@deneb.enyo.de>
>
>   > It is a bug in 'base64-decode-region'.  Perhaps it's fixed in Emacs
>   > 21, I don't know.  The base64 encoding is indeed incorrect, and that's
> 
> huh, I use 21 :-( So I will report this bug to appropriate mailing
> list. Thank you.

No, there's nothing wrong with `base64-decode-region', Gnus simply
catches the error and message it.  Does the following help?

Btw, the error with the b64 encoding is that it ends with "===", which
is invalid. Maybe the b64 parser should be made able to cope with that
simple error.

Index: mm-decode.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/mm-decode.el,v
retrieving revision 6.48
diff -u -u -w -u -w -r6.48 mm-decode.el
--- mm-decode.el	2001/08/04 00:33:18	6.48
+++ mm-decode.el	2001/08/04 23:31:56
@@ -891,20 +891,22 @@
       (if (member (mm-handle-media-supertype handle) '("text" "message"))
 	  (with-temp-buffer
 	    (insert-buffer-substring (mm-handle-buffer handle))
+	    (prog1
 	    (mm-decode-content-transfer-encoding
 	     (mm-handle-encoding handle)
 	     (mm-handle-media-type handle))
 	    (let ((temp (current-buffer)))
 	      (set-buffer cur)
-	      (insert-buffer-substring temp)))
+		(insert-buffer-substring temp))))
 	(mm-with-unibyte-buffer
 	  (insert-buffer-substring (mm-handle-buffer handle))
+	  (prog1
 	  (mm-decode-content-transfer-encoding
 	   (mm-handle-encoding handle)
 	   (mm-handle-media-type handle))
 	  (let ((temp (current-buffer)))
 	    (set-buffer cur)
-	    (insert-buffer-substring temp)))))))
+	      (insert-buffer-substring temp))))))))
 
 (defun mm-file-name-delete-whitespace (file-name)
   "Remove all whitespace characters from FILE-NAME."
@@ -959,7 +961,8 @@
 
 (defun mm-save-part-to-file (handle file)
   (mm-with-unibyte-buffer
-    (mm-insert-part handle)
+    (or (mm-insert-part handle)
+	(error "Error with message"))
     (let ((coding-system-for-write 'binary)
 	  ;; Don't re-compress .gz & al.  Arguably we should make
 	  ;; `file-name-handler-alist' nil, but that would chop




  reply	other threads:[~2001-08-04 23:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-31 23:10 Pavel Janík
2001-08-03  0:57 ` Russ Allbery
2001-08-03  7:19   ` Pavel Janík
2001-08-04 15:51     ` Florian Weimer
2001-08-04 19:58       ` Pavel Janík
2001-08-04 23:36         ` Simon Josefsson [this message]
2001-08-05  7:42           ` Florian Weimer
2001-08-05  9:11           ` Pavel Janík
2001-08-09 19:36             ` Simon Josefsson
2001-08-10 14:57               ` Florian Weimer
2001-08-11 22:12                 ` Simon Josefsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ilud76bs8hb.fsf@barbar.josefsson.org \
    --to=jas@extundo.com \
    --cc=ding@gnus.org \
    --cc=fw@deneb.enyo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).