The test was using network.dns.localDomains to check that we don't
call into the platform DNS resolver when the network.dns.disabled pref
was set - but since the localDomains pref rewrites hostnames to localhost
and we now don't call into GetAddrInfo for local domains, the test
failed.
I changed it so it uses the NativeDNSResolverOverride to register an IP for
foo.bar instead of relying on localDOmains.
Depends on D94726
Differential Revision: https://phabricator.services.mozilla.com/D94727
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Previously it was possible to not have mBoundarySet so we just bailed in
OnStopRequest - but after Bug 1321612 that is not possible, and we
call OnStopRequest with NS_ERROR_CORRUPTED_CONTENT.
This patch removes the check for the boundary, allowing the code to call
`mFinalListener->OnStopRequest(request, aStatus)` instead of hanging.
Differential Revision: https://phabricator.services.mozilla.com/D93340
The problem occurs when a response does not have a body. In this case the transaction will never be closed. if a transaction only has read headers, WriteSegments will return 0 bytes written(bug 1646701) and WriteSegments will not be called again and the transaction will not pickup the FIN bit.
Some code improvements:
- calling WriteSegments in a loop has been moved to Http3Stream. This is more appropriate place
- remove RECEIVED_RESET, because it is not used
- add test and add head_http3.js for setting up http3 tests (e.g. making sure that an alt-svc mapping is setup)
- fix handling of a response that has more data than its content-length header indicates.
Differential Revision: https://phabricator.services.mozilla.com/D92990
This patch adds a task that is dispatched to the background thread when TRR
is first enabled. This may mean during the TRRService initialization at
startup or later when the pref is flipped.
The task will call into rust_parse_etc_hosts which does the actual file
opening and parsing. We pass the path to the file, that being either
/etc/hosts or the Windows equivalent obtained by calling
SHGetSpecialFolderPathA.
The rust code opens the file and proceeds to read it line by line while
accumulating all the hostnames in an array. Since these files can be
quite large, on the order of several megabytes, we need to make sure we
don't block shutdown doing this - so once more than 100 domains have
accumulated in the array we call back into C++ code to add them to the
exclusion list. The callback will return true if we should continue to
parse the file or false otherwise.
We also change the tests to use "excluded" rather than localhost when
testing the excluded-domains prefs, since localhost is unually present
in /etc/hosts and may interfere with the test.
We also use an atomic sTRRServicePtr to make sure that we don't have
a data race between the TRRService being freed and the callbacks of the
parsing.
Differential Revision: https://phabricator.services.mozilla.com/D90663