Backout 641bb40dff30 (Bug 1154521) to use a different approach, a=rkent
authorR Kent James <rkent@caspia.com>
Thu, 07 May 2015 17:46:09 -0700
changeset 22310 b838face42aeecc1ae54176917d81d84332e7657
parent 22309 03b2f3f3f02aefcb1f8784f90b42352b2ee957e2
child 22311 28d5709c389ded4f4207d07d736c892b3c331dfa
push idunknown
push userunknown
push dateunknown
reviewersrkent
bugs1154521
backs out641bb40dff303a518bce7ab4f75198361a8f5839
Backout 641bb40dff30 (Bug 1154521) to use a different approach, a=rkent
mailnews/mime/jsmime/jsmime.js
mailnews/mime/jsmime/test/test_structured_headers.js
--- a/mailnews/mime/jsmime/jsmime.js
+++ b/mailnews/mime/jsmime/jsmime.js
@@ -251,25 +251,16 @@ addHeader("Resent-Message-ID", parseMess
 // Miscellaneous headers (those that don't fall under the above schemes):
 
 // RFC 2047
 structuredDecoders.set("Content-Transfer-Encoding", function (values) {
   return values[0].toLowerCase();
 });
 structuredEncoders.set("Content-Transfer-Encoding", writeUnstructured);
 
-// Some clients like outlook.com send non-compliant References headers that
-// separate values using commas. Temporarily replace commas with spaces until
-// full references header parsing is implemented. See bug 1154521.
-function replaceCommasWithSpaces(values) {
-  return values[0].replace(/,/g, " ");
-}
-structuredDecoders.set("References", replaceCommasWithSpaces);
-structuredDecoders.set("In-Reply-To", replaceCommasWithSpaces);
-
 return Object.freeze({
   decoders: structuredDecoders,
   encoders: structuredEncoders,
   spellings: preferredSpellings,
 });
 
 });
 def('headerparser', function(require) {
--- a/mailnews/mime/jsmime/test/test_structured_headers.js
+++ b/mailnews/mime/jsmime/test/test_structured_headers.js
@@ -133,28 +133,16 @@ suite('Structured headers', function () 
   let date_tests = [
     ["Thu, 06 Sep 2012 08:08:21 -0700", new Date("2012-09-06T08:08:21-0700")],
     ["This is so not a date", new Date(NaN)],
   ];
   date_headers.forEach(function (header) {
     testHeader(header, date_tests);
   });
 
-  let multiple_unstructured_headers = ['In-Reply-To', 'References'];
-  let multiple_unstructured_tests = [
-    ["<asdasdasd@asdasdasd.com>", "<asdasdasd@asdasdasd.com>"],
-    ["<asd@asd.com> <asdf@asdf.com>", "<asd@asd.com> <asdf@asdf.com>"],
-
-    // This test is needed for clients sending non-compliant headers, see bug 1154521
-    ["<asd@asd.com>,<asdf@asdf.com>,<asdfg@asdfg.com>", "<asd@asd.com> <asdf@asdf.com> <asdfg@asdfg.com>"],
-  ];
-  multiple_unstructured_headers.forEach(function (header) {
-    testHeader(header, multiple_unstructured_tests);
-  });
-
   let unstructured_headers = ['Comments', 'Content-Description', 'Keywords',
     'Subject'];
   let unstructured_tests = [
     ["", ""],
     ["This is a subject", "This is a subject"],
     [["Subject 1", "Subject 2"], "Subject 1"],
     ["=?UTF-8?B?56eB44Gv5Lu25ZCN5Y2I5YmN?=",
       "\u79c1\u306f\u4ef6\u540d\u5348\u524d"],