Absolutely!! Please commit it!
We rely on the message-id being correct (i.e. the original message).
Therefore when saveChanges() updates it, you don't have the original
message anymore. This makes threading the message (if it's passed on) a
lot more difficult. 

-- Jason

> -----Original Message-----
> From: Danny Angus [mailto:[EMAIL PROTECTED]] 
> Sent: 05 February 2003 14:53
> To: James Developers List
> Subject: Message-ID bug
> 
> 
> Guys, specially Serge,
>  please examine this patch and tell me why I shouldn't commit it.
> 
> The symptom: setting headers on a MimeMessageWrapper object 
> appeared to cause the message-id to change
> 
> The problem: MimeMessageWrapper was calling saveChanges() in 
> writeTo(), and saveChanges() sets a new Message_Id every 
> time, regardless.
> 
> The solution: remove saveChanges from writeTo() 
> 
> Any other solution to the same problem would be OK by me, but 
> its my firm belief that we should not change message-ID's 
> unless we clone the message.
> 
> d.
> 
> Index: MimeMessageWrapper.java 
> ===================================================================
> RCS file: 
> /home/cvs/jakarta-james/src/java/org/apache/james/core/MimeMes
> sageWrapper.java,v
> retrieving revision 1.19
> diff -u -r1.19 MimeMessageWrapper.java
> --- MimeMessageWrapper.java   7 Jan 2003 11:06:35 -0000       1.19
> +++ MimeMessageWrapper.java   5 Feb 2003 14:44:35 -0000
> @@ -200,7 +200,10 @@
>              }
>              in.close();
>          } else {
> -            message.saveChanges();
> +            if(message.getMessageID()!=null){
> +
> +            }
> +           // message.saveChanges();
>              message.writeTo(os);
>          }
>      }
> @@ -263,7 +266,7 @@
>              MimeMessageWrapper wrapper = (MimeMessageWrapper)message;
>              wrapper.writeTo(headerOs, bodyOs, ignoreList);
>          } else {
> -            message.saveChanges();
> +            //message.saveChanges();
>  
>              //Write the headers (minus ignored ones)
>              Enumeration headers = 
> message.getNonMatchingHeaderLines(ignoreList);
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to