[WIP] Clarify the behavior of onBeforeRequest
Type: code issue
Domain: *
Assuming we have HTTP and HTTPS requests only.
Let canonical_url be the URL going to be processed by HTTPSE, newuristr be the rewritten URL. Any URL is called non-secure if it satisfies the following requirement. URLs are otherwise secure (i.e. the requests can be performed even in httpNowhereOn mode).
https://github.com/EFForg/https-everywhere/blob/66da135ab14ea967873f6fafecc0d251830146f5/chromium/background.js#L243-L250
Only exception is that when the request is main_frame requests, we try to force the URL protocol be HTTPS if it is not secure
Blah blah blah.. WORK IN PROGRESS. PLEASE COMMENT AND REVIEW LATER.
Thanks! Your edit helped me out. I'll take it from here now.