[tbb-bugs] #21999 [Applications/Tor Browser]: The "request English language web pages"-prompt is not working in 7.0a3

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Jun 19 13:14:44 UTC 2017

#21999: The "request English language web pages"-prompt is not working in 7.0a3
 Reporter:  gk                                   |          Owner:  tbb-
                                                 |  team
     Type:  defect                               |         Status:
                                                 |  needs_revision
 Priority:  Medium                               |      Milestone:
Component:  Applications/Tor Browser             |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  ff52-esr, tbb-e10s, tbb-7.0-must,    |  Actual Points:
  TorBrowserTeam201706, tbb-7.0-issues, tbb-     |
  regression                                     |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
Changes (by gk):

 * status:  needs_review => needs_revision
 * keywords:
     ff52-esr, tbb-e10s, tbb-7.0-must, TorBrowserTeam201706R,
     tbb-7.0-issues, tbb-regression
     ff52-esr, tbb-e10s, tbb-7.0-must, TorBrowserTeam201706,
     tbb-7.0-issues, tbb-regression


 Replying to [comment:12 arthuredelstein]:
 > Makes sense to me. Here's a different patch that I think preserves the
 behavior from before. One problem is that with e10s, the
 nsIWebProgressListener no longer delays the request. But "http-on-modify-
 request" observers correctly delays the request until their observe()
 function returns, so I am using one of those instead.

 Sounds like a good idea. While testing this for a while I found two
 possible outcomes both of them being suboptimal:

 1) The dialog does not get shown at all. This happens when the Torbutton
 update check is the first request captured by the observer. Subsequent
 surfing to different websites does not bring the dialog up either. Not
 sure why that is happening.

 2) I get the dialog shown with the `about:tor` page (triggered by the
 updater check). This is pretty confusing as it boils down to a modal
 dialog during the start-up process, a thing we should avoid if possible.

 I think what we could do is to use the `setTimeout()` call which we need
 for the homepage case anyway and apply it generally. There should not be
 any automatic requests on start-up besides the update checks for
 extensions and the browser itself and the Torbutton version check. As
 those happen often on start-up and there is no need to show localized web
 content in a response basically exempting those requests seems fine to me.

 > The only drawback I see with this approach is that sometimes Firefox
 makes a background http request (such as checking for updates) and I'm not
 sure whether or not we want to show the prompt when that happens, and what
 the criteria should be for ignoring such requests.

 The prompt is shown once. And it is not really important for background
 update requests/checks as the response content displayed in the browser
 (if it is displayed at all) is not dependent on the `Accept-Language`
 header. So it seems fine to me we can ignore this kind of requests.

 > https://github.com/arthuredelstein/torbutton/commit/21999+2

 Apart from the suggestion above there are some nits:

     // add a web progress listener that will show a "request English
     // web pages?" prompt the first time an http or https page is opened.
 But we have no web progress listener anymore.
 +function torbutton_http_connection_observed(aRequest, aData) {
 +    // If we are loading an HTTP page, show the
 +  // "request English language web pages?" prompt.

Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21999#comment:13>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online

More information about the tbb-bugs mailing list