Bug 651072 addendum - Make the extension manager treat text/html update responses as errors. r=dtownsend.
authorHenri Sivonen <hsivonen@iki.fi>
Wed, 16 Nov 2011 09:38:51 +0200
changeset 80301 5135cc4e6a368f6261ebb90eb727dcd38731100d
parent 80300 75ace50df0089eaffb8137850e0c49458cd890b7
child 80302 b534bab26edf837a8ea65313ad502086febfec11
push id3396
push userhsivonen@iki.fi
push dateWed, 16 Nov 2011 07:43:40 +0000
treeherdermozilla-inbound@b534bab26edf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdtownsend
bugs651072
milestone11.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 651072 addendum - Make the extension manager treat text/html update responses as errors. r=dtownsend.
toolkit/mozapps/extensions/content/extensions.xml
--- a/toolkit/mozapps/extensions/content/extensions.xml
+++ b/toolkit/mozapps/extensions/content/extensions.xml
@@ -1344,17 +1344,19 @@
             self._relNotesLoading.hidden = true;
             self._relNotesError.hidden = false;
             self._relNotesLoaded = false; // allow loading to be re-tried
             sendToggleEvent();
           }
 
           function handleResponse(aEvent) {
             var req = aEvent.target;
-            if (req.responseXML &&
+            var ct = req.getResponseHeader("content-type");
+            if ((!ct || ct.indexOf("text/html") < 0) &&
+                req.responseXML &&
                 req.responseXML.documentElement.namespaceURI != XMLURI_PARSE_ERROR) {
               if (req == dataReq)
                 relNotesData = req.responseXML;
               else
                 transformData = req.responseXML;
               showRelNotes();
             } else {
               handleError();