[HTTPS-Everywhere] compatibility with other add-on

Loic J. Duros lduros at gnu.org
Fri Apr 20 20:05:16 PDT 2012


Hi Peter and Justin:

Many thanks to both of you for your answers and support. As long as I 
can figure out pairs between originalURI and the new URI, it can work out!

The solution seems pretty robust, I'm not too concern if some of it 
falls through the crack from time to time.

Thanks again,

Loic

On 04/20/2012 02:27 PM, Justin Samuel wrote:
>> On Fri, Apr 20, 2012 at 01:39:16PM -0400, Loic J. Duros wrote:
>>> I have read that to remedy to the issue of incompatibility,
>>> https-everywhere has set up a custom notification
>>> "https-everywhere-uri-rewrite". Do you have any concrete examples on
>>> how this works, or do you know any extension or add-on that make use
>>> of this and have achieved compatibility with https-everywhere?
> Hi Loic,
>
> Here's how RequestPolicy uses this notification.
>
> First, RequestPolicy registers to observe the
> "https-everywhere-uri-rewrite" topic:
>
> https://github.com/RequestPolicy/requestpolicy/blob/master/src/components/requestpolicyService.js#L499
>
> Once registered to observe this topic, here is where RequestPolicy
> receives notifications:
>
> https://github.com/RequestPolicy/requestpolicy/blob/master/src/components/requestpolicyService.js#L1619
>
> that in turn calls here which just stores the old and new URIs for later usage:
>
> https://github.com/RequestPolicy/requestpolicy/blob/master/src/components/requestpolicyService.js#L1581
>
> the stored old and new URIs are used by RequestPolicy in its
> implementation of nsIContentPolicy::shouldLoad(). When RequestPolicy
> is checking whether there are rules which match the request, if it
> doesn't find any rules it checks whether the destination URI has been
> mapped to an https URI. If there is a URI mapping, it calls
> shouldLoad() again with the new (https) destination. This check is
> done here:
>
> https://github.com/RequestPolicy/requestpolicy/blob/master/src/components/requestpolicyService.js#L2218
>
> This approach has made RequestPolicy and HTTPS Everywhere work
> together in many cases but there are still problems that I haven't had
> time to investigate (e.g.
> https://github.com/RequestPolicy/requestpolicy/issues/292).
>
> Justin
>
>





More information about the HTTPS-everywhere mailing list