Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebExtensions API in Firefox - Causes browser lockup with latest version of nghttpx #1030

Closed
yegors opened this issue Oct 18, 2017 · 3 comments

Comments

@yegors
Copy link

yegors commented Oct 18, 2017

We use nghttpx as a forwarding proxy, with squid + radius auth as the backend. We recently upgraded 1.9.1 to 1.26.0 which is causing unexpected behavior - it locks up the browser networking and requires a restart.

This only occurs when using the WebExtensions API and does NOT occur with the old API which is being deprecated, nor does it occur in Chrome.

The root cause appears to be when the proxy hostname is accessed directly, previously it returned a 400 error. Now the behavior has changed, and it returns a 407. This seems to cause an infinite loop, which locks up the networking component in Firefox 56, 57, 58 nightly.

Is there a way to revert to old behavior, so it returns a 400 error? I realize this is a Firefox bug, but getting it fixed by Mozilla may take a while, and FF57 is being released in under 1 month, which deprecates the old API.

Response headers from 1.9.1

                            HTTP/1.1 400 Bad Request
                            Server: nghttpx nghttp2/1.9.2
                            Content-Length: 143
                            Date: Wed, 18 Oct 2017 18:56:22 GMT
                            Content-Type: text/html; charset=UTF-8
                            Connection: close

Response headers from 1.26.1

                           HTTP/1.1 407
                           status: 407
                           mime-version: 1.0
                           date: Wed, 18 Oct 2017 18:55:22 GMT
                           content-type: text/html;charset=utf-8
                           content-length: 12929
                           x-squid-error: ERR_CACHE_ACCESS_DENIED 0
                           vary: Accept-Language
                           content-language: en-us
                           proxy-authenticate: Basic realm="Web-Proxy"
                           server: squid/3.5.12

It seems before the requests never reached the backend, however now they do, which throws a 407 error and causes an infinite loop.

@tatsuhiro-t
Copy link
Member

Could you tell me how to reproduce this?

@yegors
Copy link
Author

yegors commented Oct 19, 2017

See https://bugzilla.mozilla.org/show_bug.cgi?id=1409858

1.26.1 - locks up the browser

function FindProxyForURL(url, host) {
                    return "HTTPS ro-003.windscribe.com";
}

1.9.1 - behaves correctly

function FindProxyForURL(url, host) {
                    return "HTTPS ro-002.windscribe.com";
}

We also just tried 1.21.0 and the behavior is the same as in 1.9.1, so this changed fairly recently.

@tatsuhiro-t
Copy link
Member

There are too many changes between v1.9.1 and v1.26.0. Could you find the exact version which introduced this issue? Perhaps, bisecting nghttpx build?

@yegors yegors closed this as completed Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants