Граф коммитов

67 Коммитов

Автор SHA1 Сообщение Дата
Kershaw Chang 62cd9065c3 Bug 1720601 - Allow token cache to store more than one token per key, r=necko-reviewers,dragana
1. Allow to store more than one token per key.
2. Allow to use the token only once. The token will be removed after reading it.
3. Add a gtest.

Differential Revision: https://phabricator.services.mozilla.com/D153605
2022-10-06 12:56:01 +00:00
Andreea Pavel 9f24806607 Backed out 2 changesets (bug 1768250, bug 1720601) for multiple failures CLOSED TREE
Backed out changeset d6caea480d4d (bug 1768250)
Backed out changeset 97eccf466bf3 (bug 1720601)
2022-09-20 16:50:29 +03:00
Kershaw Chang 137b76a861 Bug 1720601 - Allow token cache to store more than one token per key, r=necko-reviewers,dragana
1. Allow to store more than one token per key.
2. Allow to use the token only once. The token will be removed after reading it.
3. Add a gtest.

Differential Revision: https://phabricator.services.mozilla.com/D153605
2022-09-20 12:58:06 +00:00
Nika Layzell 33c017ff93 Bug 1754004 - Part 9: Remove PartiallySeekableInputStream, r=asuth,necko-reviewers,kershaw
This interface is misleading, as it doesn't allow seeking the entire type
despite providing a `nsISeekableStream` interface, and is no longer necessary
due to the changes in an earlier part.

Differential Revision: https://phabricator.services.mozilla.com/D141046
2022-05-13 14:16:12 +00:00
Noemi Erli 45276205df Backed out 22 changesets (bug 1696894, bug 1759569, bug 1754031, bug 1759563, bug 1759572, bug 1754004) for causing leack failures CLOSED TREE
Backed out changeset 673ecd5337e1 (bug 1754004)
Backed out changeset ecbf5f3c51de (bug 1754004)
Backed out changeset fc6c39f56d21 (bug 1754004)
Backed out changeset 5b3d58fbaf9d (bug 1696894)
Backed out changeset 2e56c89cf55d (bug 1754004)
Backed out changeset b7723490f025 (bug 1754004)
Backed out changeset 1dfbf61ff5dd (bug 1754004)
Backed out changeset e73abb071bb3 (bug 1754004)
Backed out changeset f9abe4fbf501 (bug 1754004)
Backed out changeset ee7aeb631cd9 (bug 1754004)
Backed out changeset d66aacfcf983 (bug 1754004)
Backed out changeset 5c2872ad6912 (bug 1754004)
Backed out changeset e1ae48f30d2c (bug 1754004)
Backed out changeset 849b63707d7f (bug 1754004)
Backed out changeset 36563e3b1e04 (bug 1754004)
Backed out changeset ccb4be659107 (bug 1754004)
Backed out changeset 659581d4159b (bug 1754004)
Backed out changeset 611ea76d7a9c (bug 1754004)
Backed out changeset 9b24b561698c (bug 1759572)
Backed out changeset f820e0f209ff (bug 1759563)
Backed out changeset 8d82066fa181 (bug 1759569)
Backed out changeset a2835afab1ad (bug 1754031)
2022-05-11 06:16:25 +03:00
Nika Layzell 8d59d55b57 Bug 1754004 - Part 9: Remove PartiallySeekableInputStream, r=asuth,necko-reviewers,kershaw
This interface is misleading, as it doesn't allow seeking the entire type
despite providing a `nsISeekableStream` interface, and is no longer necessary
due to the changes in an earlier part.

Differential Revision: https://phabricator.services.mozilla.com/D141046
2022-05-10 22:27:45 +00:00
Sebastian Hengst 7ddbeea9d6 Backed out 17 changesets (bug 1696894, bug 1754004) for causing crashes e.g. bug 1767808, and hanging Gmail (bug 1767918). a=backout DONTBUILD
Backed out changeset 63f17a06eba9 (bug 1754004)
Backed out changeset 017e1552d549 (bug 1754004)
Backed out changeset 010dfd821cf3 (bug 1696894)
Backed out changeset 96a39c2ba7a3 (bug 1754004)
Backed out changeset a147df47a0e3 (bug 1754004)
Backed out changeset 9018dd592230 (bug 1754004)
Backed out changeset 234ff9e092c2 (bug 1754004)
Backed out changeset c4f1e86992b6 (bug 1754004)
Backed out changeset 51bd50b57dd5 (bug 1754004)
Backed out changeset d95e7ad0eafa (bug 1754004)
Backed out changeset 35a69828091c (bug 1754004)
Backed out changeset 6802a4326963 (bug 1754004)
Backed out changeset e40e810e18fc (bug 1754004)
Backed out changeset 82b38c12b298 (bug 1754004)
Backed out changeset 0a6cf0817bf5 (bug 1754004)
Backed out changeset 6d8e51b3e8d7 (bug 1754004)
Backed out changeset 2059c2d0d880 (bug 1754004)
2022-05-05 11:27:42 +02:00
Nika Layzell e530c9b112 Bug 1754004 - Part 9: Remove PartiallySeekableInputStream, r=asuth,necko-reviewers,kershaw
This interface is misleading, as it doesn't allow seeking the entire type
despite providing a `nsISeekableStream` interface, and is no longer necessary
due to the changes in an earlier part.

Differential Revision: https://phabricator.services.mozilla.com/D141046
2022-05-03 23:30:35 +00:00
Butkovits Atila d0dadcb6f5 Backed out 19 changesets (bug 1759569, bug 1754004, bug 1759563, bug 1754031, bug 1696894, bug 1759572) for causing wpt failures. CLOSED TREE
Backed out changeset 110a8dce4b5d (bug 1696894)
Backed out changeset a62dab05c6cd (bug 1754004)
Backed out changeset 7cf122f6e19f (bug 1754004)
Backed out changeset 2aa9a0a9adbc (bug 1754004)
Backed out changeset cde16b2cdbfb (bug 1754004)
Backed out changeset 452fe0a15c99 (bug 1754004)
Backed out changeset eace8d4756ef (bug 1754004)
Backed out changeset 5e1fad91e935 (bug 1754004)
Backed out changeset eb6de0b1ab8e (bug 1754004)
Backed out changeset 1ac1908ed3d0 (bug 1754004)
Backed out changeset 473cad5b22ab (bug 1754004)
Backed out changeset 1923922be138 (bug 1754004)
Backed out changeset c7966d91f89e (bug 1754004)
Backed out changeset df5ce1f6712c (bug 1754004)
Backed out changeset a3f3f9761ada (bug 1754004)
Backed out changeset c8ec86e0a33b (bug 1759572)
Backed out changeset 6c102f8e3d4a (bug 1759563)
Backed out changeset bd3a2fcf4f0c (bug 1759569)
Backed out changeset 2541d8face65 (bug 1754031)
2022-05-03 06:00:22 +03:00
Nika Layzell dfc233bd1a Bug 1754004 - Part 9: Remove PartiallySeekableInputStream, r=asuth,necko-reviewers,kershaw
This interface is misleading, as it doesn't allow seeking the entire type
despite providing a `nsISeekableStream` interface, and is no longer necessary
due to the changes in an earlier part.

Differential Revision: https://phabricator.services.mozilla.com/D141046
2022-05-02 20:44:25 +00:00
Manuel Bucher c7f41c8706 Bug 1740688 - Add testing for LinkHeader parser r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D132696
2021-12-03 15:11:15 +00:00
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +00:00
Valentin Gosu f2f9847964 Bug 1733356 - Fix non-unified build errors in netwerk/test/gtest/ r=necko-reviewers,kershaw
Depends on D129500

Differential Revision: https://phabricator.services.mozilla.com/D129501
2021-10-27 08:52:26 +00:00
Manuel Bucher 56fa275000 Bug 1543811 - Add test cases for EncodeRequest with padding r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D126953
2021-10-07 10:55:21 +00:00
Kershaw Chang 21d1774ea9 Bug 1726528 - Add a pref to control whether to enable echConfig for http3, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D123125
2021-09-20 14:24:14 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Valentin Gosu ec5835855a Bug 1707036 - Remove nsFTPDirListingConv r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D113788
2021-04-30 06:50:14 +00:00
Valentin Gosu bd3be306ce Bug 1700866 - Call UpdatePrivateBrowsing() unconditionally in AsyncOpen r=necko-reviewers,dragana
See https://bugzilla.mozilla.org/show_bug.cgi?id=1670506#c10
The loadInfo mPrivateBrowsingId value could have changed between the creation
of the channel and calling AsyncOpen, so it's best to call it unconditionally.

Differential Revision: https://phabricator.services.mozilla.com/D111109
2021-04-12 11:07:51 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
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
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
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
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
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
2020-10-21 21:27:27 +00:00
Kershaw Chang a841171067 Bug 1652655 - P2: Use HTTPSSVC record for the request without an AltSvc or a HSTS entry, r=dragana,necko-reviewers,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D85122
2020-08-21 18:59:07 +00:00
Andrea Marchesini 45f7415671 Bug 1650811 - Make Base64 compatible with ReadSegments() with small buffers, r=asuth,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D82522
2020-07-13 08:34:07 +00:00
Andrea Marchesini 20ad814e4c Bug 1636823 - nsInputTransport must support blocking and async source - part 4 - gtest for inputStreamTransport, r=smaug,necko-reviewers,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D78236
2020-06-13 06:30:52 +00:00
Andrea Marchesini ad5c1e46d5 Bug 1636823 - nsInputTransport must support blocking and async source - part 3 - move gtests, r=smaug,necko-reviewers,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D78235
2020-06-12 22:48:03 +00:00
Narcis Beleuzu f5fcf19b63 Backed out 4 changesets (bug 1636823) for bustages on TestReadStreamToString.cpp . CLOSED TREE
Backed out changeset 13ab343d2c45 (bug 1636823)
Backed out changeset 50dd67f96214 (bug 1636823)
Backed out changeset 9cdc2e31ee04 (bug 1636823)
Backed out changeset 7d220fd9ac49 (bug 1636823)
2020-06-13 01:13:40 +03:00
Andrea Marchesini 4d26a02b74 Bug 1636823 - nsInputTransport must support blocking and async source - part 4 - gtest for inputStreamTransport, r=smaug,necko-reviewers,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D78236
2020-06-12 20:22:07 +00:00
Andrea Marchesini d7b59f05bc Bug 1636823 - nsInputTransport must support blocking and async source - part 3 - move gtests, r=smaug,necko-reviewers,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D78235
2020-06-12 15:51:42 +00:00
Csoregi Natalia d321aa4f0b Backed out 4 changesets (bug 1636823) for build bustages. CLOSED TREE
Backed out changeset 1de589017a6b (bug 1636823)
Backed out changeset 007bbe713359 (bug 1636823)
Backed out changeset 2f5c418cb7a9 (bug 1636823)
Backed out changeset 43aa94cc6640 (bug 1636823)
2020-06-12 18:45:45 +03:00
Andrea Marchesini 0e8537429f Bug 1636823 - nsInputTransport must support blocking and async source - part 4 - gtest for inputStreamTransport, r=smaug,necko-reviewers,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D78236
2020-06-12 14:22:58 +00:00
Andrea Marchesini b4f1512ac4 Bug 1636823 - nsInputTransport must support blocking and async source - part 3 - move gtests, r=smaug,necko-reviewers,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D78235
2020-06-12 14:22:38 +00:00
Kershaw Chang 634eba0f2c Bug 1636930 - Add missing data members in serialise/deserialise code of nsHttpResponseHead r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D74653
2020-05-14 12:21:41 +00:00
Honza Bambas 13a16f0e2d Bug 1596799 - Have a preference to force remote TCP/UDP port remapping for easier local network testing, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D59917

--HG--
extra : moz-landing-system : lando
2020-01-16 17:22:36 +00:00
Dorel Luca d29d22d6dc Backed out changeset 84f69fc66690 (bug 1596799) for Browser-chrome failures in /builds/worker/workspace/build/src/netwerk/base/nsSocketTransportService2.cpp. CLOSED TREE 2020-01-15 21:31:46 +02:00
Honza Bambas 0e35da72e0 Bug 1596799 - Have a preference to force remote TCP/UDP port remapping for easier local network testing, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D59917

--HG--
extra : moz-landing-system : lando
2020-01-15 18:30:42 +00:00
Jeremy Lempereur c3d1703996 Bug 1580157 - Add tests to network attributes sorting. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D45893

--HG--
extra : moz-landing-system : lando
2019-09-17 18:58:39 +00:00
Kershaw Chang 0b4a4597ab Bug 1545226 - Enable gtests r=valentin
This patch fixes some build issues on Android and also enables some gtests.

Differential Revision: https://phabricator.services.mozilla.com/D30386

--HG--
extra : moz-landing-system : lando
2019-05-08 20:56:51 +00:00
Edwin Gao 4b2a06ae0f Bug 1544961 - disable tests that cause gtest harness to crash on windows10-aarch64 r=jmaher,gbrown
Changes:
- most tests are skipped using `moz.build` configuration file.
- `MultiWriterQueue` had to be skipped with `define` clauses in the test file due to build bustages when its `moz.build` file was used.

Differential Revision: https://phabricator.services.mozilla.com/D27944

--HG--
extra : moz-landing-system : lando
2019-04-17 23:12:19 +00:00
Geoff Brown 8d88b9a596 Bug 1318091 - Disable failing android gtests; r=bc
Disable gtests observed to fail on Android. Some of these are simple build
failures and failures due to file permissions or paths, while other failures
are more obscure.
Once Android gtests are running on mozilla-central, I will file follow-up
bugs inviting teams to investigate the failures and re-enable Android gtests
that are important to them.

Differential Revision: https://phabricator.services.mozilla.com/D26606

--HG--
extra : moz-landing-system : lando
2019-04-08 20:58:21 +00:00
Jan Varga 4ecb0bc14c Bug 1526891 - Part 2: Make it possible to use MozURL by QuotaManager for all URIs (instead of using nsIPrincipal); r=nika,asuth
Differential Revision: https://phabricator.services.mozilla.com/D20906
2019-02-23 10:13:08 +01:00
Kris Maglione 27975ea3b6 Bug 1478124: Part 4b - Support loading components from static lookup tables. r=froydnj
This patch essentially creates a separate, static component database for
statically-defined CID and contract ID entries, and gives it precedence over
the runtime DB. It combines the two separate databases by updating existing
code to use lookup functions which understand both databases, and then access
all entries through wrappers which defer to the appropriate underlying type.

Static component entries require no runtime relocations, and require no
writable data allocation aside from one pointer-sized BSS entry per CID, and
one bit of BSS per contract ID.

To achieve this, all strings in the static lookup tables are stored as indexes
into a static string table, all constructor functions live in a switch
statement which compiles to a relative jump table, and all writable data for
static entries is accessed by indexed lookups into BSS arrays.

We also avoid creating nsIFactory entries for static components when possible
by adding a CreateInstance method to nsFactoryEntry and the corresponding
entry wrapper to directly call the appropriate constructor method, and only
create a factory object when required by external code.

Differential Revision: https://phabricator.services.mozilla.com/D15035

--HG--
extra : rebase_source : 903a6f31c6290d0090e6765e0e317d1f749c5855
extra : source : b8d2dfdfc324c53ce5aacc822ce52d4e2bfdc31a
2018-12-18 20:30:13 -08:00
arthur.iakab c1fae83952 Backed out 16 changesets (bug 1478124) for failing android geckoview-junit CLOSED TREE
Backed out changeset fce62c77a56b (bug 1478124)
Backed out changeset eb2fa3b5edf7 (bug 1478124)
Backed out changeset 8dacce59fcc0 (bug 1478124)
Backed out changeset 012fd0107204 (bug 1478124)
Backed out changeset 496aaf774697 (bug 1478124)
Backed out changeset 21f4fda03159 (bug 1478124)
Backed out changeset b0444e0bc801 (bug 1478124)
Backed out changeset d94039b19943 (bug 1478124)
Backed out changeset 5d85deac61c2 (bug 1478124)
Backed out changeset 929fd654c9df (bug 1478124)
Backed out changeset 1ddd80d9e91a (bug 1478124)
Backed out changeset b8d2dfdfc324 (bug 1478124)
Backed out changeset f500020a273a (bug 1478124)
Backed out changeset dd00365ebb55 (bug 1478124)
Backed out changeset 538e40c5ee13 (bug 1478124)
Backed out changeset bedaa9c437ad (bug 1478124)
2019-01-29 10:03:06 +02:00
Kris Maglione 43481fed07 Bug 1478124: Part 4b - Support loading components from static lookup tables. r=froydnj
This patch essentially creates a separate, static component database for
statically-defined CID and contract ID entries, and gives it precedence over
the runtime DB. It combines the two separate databases by updating existing
code to use lookup functions which understand both databases, and then access
all entries through wrappers which defer to the appropriate underlying type.

Static component entries require no runtime relocations, and require no
writable data allocation aside from one pointer-sized BSS entry per CID, and
one bit of BSS per contract ID.

To achieve this, all strings in the static lookup tables are stored as indexes
into a static string table, all constructor functions live in a switch
statement which compiles to a relative jump table, and all writable data for
static entries is accessed by indexed lookups into BSS arrays.

We also avoid creating nsIFactory entries for static components when possible
by adding a CreateInstance method to nsFactoryEntry and the corresponding
entry wrapper to directly call the appropriate constructor method, and only
create a factory object when required by external code.

Differential Revision: https://phabricator.services.mozilla.com/D15035

--HG--
extra : rebase_source : 8d02ff3b67b8078d1ac837d8c12f54786155c6b6
extra : absorb_source : 0fe36ca220c9270e634abf5b1f320a01878e0ce7
extra : histedit_source : 51521ceae2c1b3e4e8bf63d4ed1e2e67e9468780
2018-12-18 20:30:13 -08:00
Jeremy Lempereur 695604da1d Bug 1481014 - WIP - Rewrite net_IsValidIPv4Addr in rust. r=valentin,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D3713

--HG--
extra : moz-landing-system : lando
2018-12-13 12:07:26 +00:00
Polly Shaw 226a5beff6 Bug 356831 - Proxy autodiscovery doesn't check DHCP (option 252) r=bagder,valentin
This patch addresses an issue with Firefox's proxy detection on networks which
do not have their a proxy auto-configuration (PAC) file hosted at
http://wpad/wpad.dat, and instead make use of DHCP option 252 for broadcasting
the address of the PAC file. See https://findproxyforurl.com/wpad-introduction/
for an introduction to the protocol.

Prior to this patch, proxy auto-detect missed out the DHCP query stage, and just
 looked for a PAC file at http://wpad/wpad.dat


This patch only addresses the issue for Firefox on Windows, although it defines a
DHCP client interface which could be implemented on other platforms.

The high-level components of this patch are:
 * nsIDHCPClient.idl - this is an interface which has been defined for querying the
   DHCP server.
 * nsPACMan.cpp - where previously when the PAC URL was simply set to a constant of
   http://wpad/wpad.dat, it now dispatches an asynchronous command to the proxy
   thread. The class ExecutePACThreadAction has been augmented to include an
   instruction to 'ConfigureWPAD' (Configure Web-proxy auto-detect), and a new class,
   'ConfigureWPADComplete' has been created to relay the result (the URL of the PAC
   file) back to the nsPACMan object.
 * nsProtocolProxyService.cpp
   Minor changes to reflect the fact that the PAC URL not being set does not always
   mean there is no PAC to be used; instead it could be in the process of being
   detected.
 * TestPACMan.cpp
   This is a new file, and tests only the DHCP auto-detect functionality.
   Some tests use multiple threads, as they test the non-blocking proxy detection.
 * DHCPUtils.cpp
   A class containing the main logic for querying DHCP.
 * WindowsNetworkFunctionsWrapper.cpp
   A very thin wrapper around the Windows API calls needed by DHCPUtils.
   This class was introduced so it could be mocked out in tests.
 * nsWindowsDHCPClient.cpp
 * An implementation of the interface defined in nsIDHCPClient.idl. Fairly thin:
   most logic is implemented in DHCPUtils.
 * TestDHCPUtils.cpp
   Tests for DHCPUtils and nsWindowsDHCPClient

MozReview-Commit-ID: 4xFQz3tOLEx

--HG--
extra : rebase_source : dfd5c588406a8b0d92f91cc8a0038ca722b7140a
2018-06-07 23:07:28 +01:00
Andreea Pavel 86dffac409 Backed out changeset a7a1006e2f52 (bug 356831) for braking marionette on win asan on a CLOSED TREE 2018-07-10 18:42:01 +03:00
Polly Shaw b18d1fbc4a Bug 356831 - Proxy autodiscovery doesn't check DHCP (option 252) r=bagder,valentin
This patch addresses an issue with Firefox's proxy detection on networks which
do not have their a proxy auto-configuration (PAC) file hosted at
http://wpad/wpad.dat, and instead make use of DHCP option 252 for broadcasting
the address of the PAC file. See https://findproxyforurl.com/wpad-introduction/
for an introduction to the protocol.

Prior to this patch, proxy auto-detect missed out the DHCP query stage, and just
 looked for a PAC file at http://wpad/wpad.dat


This patch only addresses the issue for Firefox on Windows, although it defines a
DHCP client interface which could be implemented on other platforms.

The high-level components of this patch are:
 * nsIDHCPClient.idl - this is an interface which has been defined for querying the
   DHCP server.
 * nsPACMan.cpp - where previously when the PAC URL was simply set to a constant of
   http://wpad/wpad.dat, it now dispatches an asynchronous command to the proxy
   thread. The class ExecutePACThreadAction has been augmented to include an
   instruction to 'ConfigureWPAD' (Configure Web-proxy auto-detect), and a new class,
   'ConfigureWPADComplete' has been created to relay the result (the URL of the PAC
   file) back to the nsPACMan object.
 * nsProtocolProxyService.cpp
   Minor changes to reflect the fact that the PAC URL not being set does not always
   mean there is no PAC to be used; instead it could be in the process of being
   detected.
 * TestPACMan.cpp
   This is a new file, and tests only the DHCP auto-detect functionality.
   Some tests use multiple threads, as they test the non-blocking proxy detection.
 * DHCPUtils.cpp
   A class containing the main logic for querying DHCP.
 * WindowsNetworkFunctionsWrapper.cpp
   A very thin wrapper around the Windows API calls needed by DHCPUtils.
   This class was introduced so it could be mocked out in tests.
 * nsWindowsDHCPClient.cpp
 * An implementation of the interface defined in nsIDHCPClient.idl. Fairly thin:
   most logic is implemented in DHCPUtils.
 * TestDHCPUtils.cpp
   Tests for DHCPUtils and nsWindowsDHCPClient

MozReview-Commit-ID: 4xFQz3tOLEx

--HG--
extra : rebase_source : 4fb364432625418acf743b67a2caadc5a92caf7c
2018-06-07 23:07:28 +01:00
Andrea Marchesini f0fb8aa183 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 6 - nsMIMEInputStream exposes nsIInputStreamLength, r=mayhmer 2018-05-23 07:12:35 +02:00