Bug 1151448 - Cross-posts won't send becuase Newsgroups: groups are separated with comma+space, not just comma. r=jcranmer, a=rkent a=IanN for SEAMONKEY_2_35_RELEASE_BRANCH CLOSED TREE SEAMONKEY_2_35_RELEASE_BRANCH
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Sun, 21 Jun 2015 21:40:16 +0300
branchSEAMONKEY_2_35_RELEASE_BRANCH
changeset 26113 fd8425db2bfe02489a306d876411a11f99aa1a3e
parent 26112 0b3c0bc49ac94a6b55f7e760dd6f8711e6d1124a
child 26114 da4fcbb68d85687553e60d0abde02d2df8996712
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjcranmer, rkent, IanN
bugs1151448
Bug 1151448 - Cross-posts won't send becuase Newsgroups: groups are separated with comma+space, not just comma. r=jcranmer, a=rkent a=IanN for SEAMONKEY_2_35_RELEASE_BRANCH CLOSED TREE
mailnews/compose/test/unit/test_messageHeaders.js
mailnews/mime/src/extraMimeParsers.jsm
--- a/mailnews/compose/test/unit/test_messageHeaders.js
+++ b/mailnews/compose/test/unit/test_messageHeaders.js
@@ -264,17 +264,17 @@ function* testNewsgroups() {
     .subscribeToNewsgroup("mozilla.test");
   let identity = getSmtpIdentity("from@tinderbox.invalid",
     getBasicSmtpServer());
   fields.newsgroups = "mozilla.test, mozilla.test.multimedia";
   fields.followupTo = "mozilla.test";
   yield richCreateMessage(fields, [], identity);
   checkDraftHeaders({
     // The identity should override the compose fields here.
-    "Newsgroups": "mozilla.test, mozilla.test.multimedia",
+    "Newsgroups": "mozilla.test,mozilla.test.multimedia",
     "Followup-To": "mozilla.test",
     "X-Mozilla-News-Host": "localhost",
   });
 }
 
 function* testSendHeaders() {
   let fields = new CompFields();
   let identity = getSmtpIdentity("from@tinderbox.invalid",
--- a/mailnews/mime/src/extraMimeParsers.jsm
+++ b/mailnews/mime/src/extraMimeParsers.jsm
@@ -12,17 +12,17 @@ function parseNewsgroups(headers) {
 
 function emitNewsgroups(groups) {
   // Don't encode the newsgroups names in RFC 2047...
   if (groups.length == 1)
     this.addText(groups[0], false);
   else {
     this.addText(groups[0], false);
     for (let i = 1; i < groups.length; i++) {
-      this.addText(", ", true);
+      this.addText(",", false); // only comma, no space!
       this.addText(groups[i], false);
     }
   }
 }
 
 jsmime.headerparser.addStructuredDecoder("Newsgroups", parseNewsgroups);
 jsmime.headerparser.addStructuredDecoder("Followup-To", parseNewsgroups);
 jsmime.headeremitter.addStructuredEncoder("Newsgroups", emitNewsgroups);