зеркало из https://github.com/mozilla/gecko-dev.git
40d01075ce
The problem with CaptiveDetect was that it uses an XMLHttpRequest, and apparently xhr.status is 0 for failed requests, which here includes cert errors, redirect loops, etc. Getting the XHR to not follow redirects was tricky, so a hacky fix was to set nsIHttpChannel.redirectionLimit = 0; For any redirect the XHR would now fail with NS_ERROR_REDIRECT_LOOP, which we need to handle separately. I also included tests for: * redirect to https with invalid cert * redirect to same URL causing redirect loop * redirect to different URL with different content * redirect to different URL with canonical content All of these cases should be detected as locked captive portals. Differential Revision: https://phabricator.services.mozilla.com/D33706 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
test/unit | ||
CaptiveDetect.jsm | ||
components.conf | ||
moz.build | ||
nsICaptivePortalDetector.idl |