Merge m-c to inbound.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 17 Oct 2012 15:33:10 -0400
changeset 110711 e85d04cf1ed522c22da04a793af6110bd1cbb166
parent 110710 e78db739d5896d2b023f3c05f64169ff4470db47 (current diff)
parent 110662 a76c1f4c411280cb6b91d2d5b7e56f29dbf75a2c (diff)
child 110712 c01e44583414e9b98560d60391c2033eec714e1b
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
milestone19.0a1
Merge m-c to inbound.
--- a/dom/telephony/test/marionette/manifest.ini
+++ b/dom/telephony/test/marionette/manifest.ini
@@ -16,24 +16,25 @@ qemu = true
 #[test_outgoing_busy.js]
 #expectedfailure = true
 [test_outgoing_reject.js]
 [test_voicemail_statuschanged.py]
 [test_voicemail_number.js]
 [test_incoming_hold_resume.js]
 # Bug 790463
 #[test_outgoing_hold_resume.js]
-[test_incoming_already_connected.js]
+#[test_incoming_already_connected.js]
 [test_incoming_answer_remote_hangup.js]
 [test_incoming_connecting_hangup.js]
 [test_incoming_connecting_remote_hangup.js]
 [test_incoming_hangup_held.js]
 [test_incoming_remote_cancel.js]
 [test_incoming_remote_hangup_held.js]
 [test_outgoing_already_held.js]
 [test_outgoing_answer_local_hangup.js]
-[test_outgoing_remote_hangup_held.js]
+# Bug 790463
+#[test_outgoing_remote_hangup_held.js]
 [test_incoming_already_held.js]
 [test_swap_held_and_active.js]
 [test_incoming_onstatechange.js]
 [test_outgoing_onstatechange.js]
 [test_redundant_operations.js]
 
--- a/toolkit/mozapps/update/nsUpdateService.js
+++ b/toolkit/mozapps/update/nsUpdateService.js
@@ -2731,18 +2731,29 @@ Checker.prototype = {
     // This is here to let unit test code override XHR
     if (this._request.wrappedJSObject) {
       this._request = this._request.wrappedJSObject;
     }
     this._request.open("GET", url, true);
     var allowNonBuiltIn = !getPref("getBoolPref",
                                    PREF_APP_UPDATE_CERT_REQUIREBUILTIN, true);
     this._request.channel.notificationCallbacks = new gCertUtils.BadCertHandler(allowNonBuiltIn);
+    // Prevent the request from reading from the cache.
+    this._request.channel.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE;
+    // Prevent the request from writing to the cache.
+    this._request.channel.loadFlags |= Ci.nsIRequest.INHIBIT_CACHING;
+
     this._request.overrideMimeType("text/xml");
+    // The Cache-Control header is only interpreted by proxies and the
+    // final destination. It does not help if a resource is already
+    // cached locally.
     this._request.setRequestHeader("Cache-Control", "no-cache");
+    // HTTP/1.0 servers might not implement Cache-Control and
+    // might only implement Pragma: no-cache
+    this._request.setRequestHeader("Pragma", "no-cache");
 
     var self = this;
     this._request.addEventListener("error", function(event) { self.onError(event); } ,false);
     this._request.addEventListener("load", function(event) { self.onLoad(event); }, false);
     this._request.addEventListener("progress", function(event) { self.onProgress(event); }, false);
 
     LOG("Checker:checkForUpdates - sending request to: " + url);
     this._request.send(null);