From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/45830 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: Non-MML forwarding strips Content-Transfer-Encoding Date: Fri, 26 Jul 2002 20:10:02 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1027707072 9737 127.0.0.1 (26 Jul 2002 18:11:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 26 Jul 2002 18:11:12 +0000 (UTC) Cc: ding@gnus.org Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17Y9YU-0002Ww-00 for ; Fri, 26 Jul 2002 20:11:10 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17Y9Xs-0001gb-00; Fri, 26 Jul 2002 13:10:32 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 26 Jul 2002 13:10:57 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id NAA28518 for ; Fri, 26 Jul 2002 13:10:41 -0500 (CDT) Original-Received: (qmail 18146 invoked by alias); 26 Jul 2002 18:10:07 -0000 Original-Received: (qmail 18141 invoked from network); 26 Jul 2002 18:10:06 -0000 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net (HELO yxa.extundo.com) (217.13.230.178) by gnus.org with SMTP; 26 Jul 2002 18:10:06 -0000 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.5/8.12.5) with ESMTP id g6QIA2kd031447; Fri, 26 Jul 2002 20:10:02 +0200 Original-To: Hrvoje Niksic Mail-Copies-To: nobody In-Reply-To: (Hrvoje Niksic's message of "Tue, 23 Jul 2002 15:47:21 +0200") User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-debian-linux-gnu) X-Hashcash: 020726:hniksic@xemacs.org:fccdc20bb5f95b58 X-Hashcash: 020726:ding@gnus.org:fef65465957dd614 X-Hashcash: 020726:hniksic@xemacs.org:3644bf03a63d2516 X-Hashcash: 020726:ding@gnus.org:750e1ac4c1ab4208 Original-Lines: 64 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:45830 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:45830 Hrvoje Niksic writes: > [ Please Cc the responses to me as I'm not on the list. ] > > A bug in the forwarding code has just bit me. > > I set `message-forward-show-mml' to nil because I prefer to forward > mails as they are. Recently something broke, though. If you set > `message-forward-show-mml' to nil and try to forward a message encoded > as base64 (e.g. one that contains only a picture), the > Content-Transfer-Encoding header gets stripped from the embedded > message. You end up with a buffer that looks like this: > > [#part type=message/rfc822 raw=t bla bla ...] > X-From-Line: ... > > > <... base64 body ...> > [#/part] > > Obviously, stripping Content-Transfer-Encoding is wrong. The > resulting message is corrupted because its body will be interpreted to > contain 7bit data. It is also wrong in principle -- when > `message-forward-show-mml' is unset, I expect little or no tinkering > with the embedded message. Gnus should just make sure it is correctly > embedded as a part, and the rest will follow from that. Yup. Removing it is Right when message-forward-show-mml is non-nil, the default, though. So it is probably only a matter of not testing that combination. This should fix that particular problem. --- message.el.~6.240.~ 2002-06-29 16:38:03.000000000 +0200 +++ message.el 2002-07-26 19:07:45.000000000 +0200 @@ -5190,7 +5190,9 @@ (or (search-forward "\n\n" nil t) (point))) (delete-region (point-min) (point-max))) (when (and (not current-prefix-arg) - message-forward-ignored-headers) + message-forward-ignored-headers + ;; don't remove CTE, X-Gnus etc when doing "raw" forward: + message-forward-show-mml) (save-restriction (narrow-to-region b e) (goto-char b) > The one place where Content-Transfer-Encoding is removed is in > message-forward-make-body. I tried the obvious fix of removing > Content-Transfer-Encoding from message-forward-ignored-headers and > having message-forward-make-body manually remove > Content-Transfer-Encoding when message-forward-show-mml is t: ... > But even with this fix, something is *still* removing the > Content-Transfer-Encoding header. `message-encode-message-body' and > `message-send-mail-partially' both do it, but I'm not sure how or > whether they get called. > > Can someone please help? The above is sufficient for me. m-e-m-b only removes the header in the new message, not in the forwarded one, it seems, so there shouldn't be a need to modify it. If this isn't sufficient for you, I'm not sure what to do except debugging every step of sending the mail to track what is happening.