Bug 1328131 - reset charset since protocol object is reused by NNTP. r=mkmelin a=jorgk
authorJorg K <jorgk@jorgk.com>
Mon, 02 Jan 2017 14:32:00 +0100
changeset 26898 338dac1c7ce578e18d673c4f33afe7e89f203d04
parent 26897 de155f344653691010e5305d2a983b754e111f93
child 26899 9b2680b7eb92d136fd52b6ba5575ad8592637773
push id1834
push userclokep@gmail.com
push dateMon, 23 Jan 2017 21:48:40 +0000
treeherdercomm-beta@293cffe83e59 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, jorgk
bugs1328131
Bug 1328131 - reset charset since protocol object is reused by NNTP. r=mkmelin a=jorgk
mailnews/base/util/nsMsgProtocol.cpp
--- a/mailnews/base/util/nsMsgProtocol.cpp
+++ b/mailnews/base/util/nsMsgProtocol.cpp
@@ -73,16 +73,20 @@ nsresult nsMsgProtocol::InitFromURI(nsIU
   nsCOMPtr <nsIMsgMailNewsUrl> mailUrl = do_QueryInterface(aUrl);
   if (mailUrl)
   {
     mailUrl->GetLoadGroup(getter_AddRefs(m_loadGroup));
     nsCOMPtr<nsIMsgStatusFeedback> statusFeedback;
     mailUrl->GetStatusFeedback(getter_AddRefs(statusFeedback));
     mProgressEventSink = do_QueryInterface(statusFeedback);
   }
+
+  // Reset channel data in case the object is reused and initialised again.
+  mCharset.Truncate();
+
   return NS_OK;
 }
 
 nsMsgProtocol::~nsMsgProtocol()
 {}
 
 
 static bool gGotTimeoutPref;