Open msxfm opened 10 years ago
Comment by bz922x Thursday Jan 03, 2013 at 21:51 GMT
I am having a similar problem with the Amazon "Add To Wishlist" button not loading while using HTTPS-Everywhere 3.1 RequestPolicy 0.5.27b2 Firefox 18.0 (beta)
For example this page: http://www.amazon.com/gp/product/B004TS1J18 should have an add-to-wishlist button below the add-to-cart button, but the image does not load.
Comment by rnav Sunday Jan 20, 2013 at 08:01 GMT
May not be the same problem, but it is an issue between Https-Everywhere and RequestPolicy. I don't see the 'Add to Wishlist' button on amazon.com, but more importantly, I can't see the ratings (the stars next to each review) on product pages. This goes away if I select 'temporarily allow all requests' (or disable blocking in v1b3), but not if I only say 'temporarily allow requests from *.amazon.com'. Seen in both v0.5 and v1b3 with the latest Https-Everywhere.
I could reproduce what @rnav described (rating stars at amazon). While investigating I found this commit to HTTPS Everywhere and recognized that the notifyObservers
function has been removed in Nov 2013 in this commit. Reverting the removal would probably fix this issue, but maybe there's another solution without depending on HTTPS Everywhere.
In case the notifyObservers
function has to be reintroduced, it needs to be called after the nsIHttpChannel.redirectTo() function here.
Okay, I'm quite sure this can be fixed without changing HTTPS Everywhere. The trick is to observe http-on-examine-response
, http-on-examine-cached-response
and http-on-examine-merged-response
, see the following code:
RequestPolicyService.prototype = {
// ...
_register : function() {
var os = CC['@mozilla.org/observer-service;1'].
getService(CI.nsIObserverService);
os.addObserver(this, "http-on-examine-response", false);
os.addObserver(this, "http-on-examine-cached-response", false);
os.addObserver(this, "http-on-examine-merged-response", false);
// ...
},
_unregister : function() {
os.removeObserver(this, "http-on-examine-response");
os.removeObserver(this, "http-on-examine-cached-response");
os.removeObserver(this, "http-on-examine-merged-response");
// ...
},
// ...
observe : function(subject, topic, data) {
switch (topic) {
// see https://developer.mozilla.org/en-US/docs/Observer_Notifications#HTTP_requests
case "http-on-examine-response" :
this._requestProcessor._examineHttpResponse(subject);
// fall through!
case "http-on-examine-cached-response":
case "http-on-examine-merged-response":
try {
var httpChannel = subject.QueryInterface(CI.nsIHttpChannel);
var channel = subject.QueryInterface(CI.nsIChannel);
} catch (e) {
break;
}
if (channel.URI.spec != channel.originalURI.spec) {
this._requestProcessor.handleHttpChannelRedirect(httpChannel);
}
break;
//
// ...
//
}
},
// ...
};
Now the difficulty is the implementation of RequestProcessor.handleHttpChannelRedirect(httpChannel);
.
Btw @futpib, this might be interesting for you as well if you want to support HTTPS Everywhere compatibility in your extension.
Issue by alok0 Tuesday Oct 02, 2012 at 18:24 GMT Originally opened as https://github.com/RequestPolicy/requestpolicy/issues/347
Currently on HTTPS Everywhere 2.2.1 Request Policy 1.0.0b3
As expected I use request policy to block non-https from loading on https pages.
But for examples on a page like this: https://developer.android.com/about/dashboards/index.html The images get changed to https in my HTTPS-Everywhere rules, but they are still blocked from loading.