Bug 1322054 - Suppress writing of empty Content-Language: header. r=aceman a=jorgk
authorJorg K <jorgk@jorgk.com>
Mon, 05 Dec 2016 08:04:38 +0100
changeset 31363 4da63141cb902adf573947586a2e52915ad4ebb1
parent 31362 98e75b3d030b0fb0ac52bc97a9db0b4e48175b1a
child 31379 56522f871e48bce916715f7951e6e9385ae08408
push id1
push userclokep@gmail.com
push dateMon, 07 May 2018 22:45:56 +0000
treeherdercomm-esr60@57eacde5ef40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaceman, jorgk
bugs1322054
Bug 1322054 - Suppress writing of empty Content-Language: header. r=aceman a=jorgk
mailnews/compose/src/nsMsgCompUtils.cpp
--- a/mailnews/compose/src/nsMsgCompUtils.cpp
+++ b/mailnews/compose/src/nsMsgCompUtils.cpp
@@ -352,24 +352,16 @@ nsresult mime_generate_headers(nsIMsgCom
     int32_t deliveryFormat;
     fields->GetDeliveryFormat(&deliveryFormat);
     draftInfo.AppendLiteral("deliveryformat=");
     draftInfo.AppendInt(deliveryFormat);
 
     finalHeaders->SetRawHeader(HEADER_X_MOZILLA_DRAFT_INFO, draftInfo, nullptr);
   }
 
-  // Set Content-Language header.
-  char* contentLanguage = nullptr;
-  fields->GetContentLanguage(&contentLanguage);
-  if (contentLanguage) {
-    finalHeaders->SetRawHeader(HEADER_CONTENT_LANGUAGE,
-                               nsDependentCString(contentLanguage), nullptr);
-  }
-
   nsCOMPtr<nsIHttpProtocolHandler> pHTTPHandler = do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv);
   if (NS_SUCCEEDED(rv) && pHTTPHandler)
   {
     nsAutoCString userAgentString;
     pHTTPHandler->GetUserAgent(userAgentString);
 
     if (!userAgentString.IsEmpty())
       finalHeaders->SetUnstructuredHeader("User-Agent",