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

9597 Коммитов

Автор SHA1 Сообщение Дата
Jesse Schwartzentruber f66bf9dbc1 Bug 1731721 - Preliminary HTTP/3 fuzzing target r=dragana,decoder,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D126177
2021-11-24 18:04:45 +00:00
Nika Layzell acedd82927 Bug 1734739 - Part 3: Stop providing pids in places where it's not needed/used, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128220
2021-11-24 17:56:01 +00:00
Nika Layzell c8c4669312 Bug 1734739 - Part 2: Stop requiring the OtherPid to create Endpoint, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128219
2021-11-24 17:56:00 +00:00
Kershaw Chang 6e99fd9b3f Bug 1740856 - When 0RTT fails, poll should be called to drive handshake, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D131808
2021-11-24 12:37:24 +00:00
ssummar b9d6fce436 Bug 1530209 - Removed context argument from various methods. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D129797
2021-11-24 11:25:41 +00:00
Gijs Kruitbosch 324af6151f Bug 1742787 - remove unused SecureUpgradeChannelURI method from InterceptedChannel, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D132010
2021-11-24 11:08:00 +00:00
Butkovits Atila 824ba655d3 Backed out changeset a62dd031768d (bug 1731721) for causing build bustages complaining about static_prefs. 2021-11-23 20:04:58 +02:00
Jesse Schwartzentruber c8e6fdac85 Bug 1731721 - Preliminary HTTP/3 fuzzing target r=dragana,decoder,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D126177
2021-11-23 17:27:19 +00:00
Manuel Bucher 7056b2cb0c Bug 1734132 - Map necko priorities to http3 priorities r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D127834
2021-11-23 17:22:30 +00:00
Neil Deakin 9ca75dedc1 Bug 1719892, add a default value for content disposition, so that it can be explicitly set to inline, r=kershaw
Differential Revision: https://phabricator.services.mozilla.com/D131002
2021-11-23 14:56:16 +00:00
Kershaw Chang 89050e7a2e Bug 1738664 - Add peerId to nsITransportSecurityInfo, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D130034
2021-11-23 11:59:47 +00:00
Kershaw Chang 1cbf39ee90 Bug 1734609 - Make sure to not reuse a connection that has a mSpdySession, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D131617
2021-11-22 13:34:47 +00:00
Kershaw Chang 14db165b22 Bug 1734609 - Fix the test:testAllRecordsInHttp3ExcludedList, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D130637
2021-11-18 10:22:15 +00:00
Kershaw Chang 743032056b Bug 1734609 - Make sure we don't dispatch a transaction more than once, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D130250
2021-11-18 10:22:15 +00:00
Cristian Tuns acd5a045f9 Backed out 3 changesets (bug 1734132) for causing hybrid/build bustages on Http3Stream.cpp CLOSED TREE
Backed out changeset 51a131c3817b (bug 1734132)
Backed out changeset aee682c3af71 (bug 1734132)
Backed out changeset 51ba73eb5bc2 (bug 1734132)
2021-11-17 11:55:11 -05:00
Manuel Bucher 9dc81abf3e Bug 1734132 - Map necko priorities to http3 priorities r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D127834
2021-11-17 16:26:30 +00:00
Dragana Damjanovic 22d71cbd86 Bug 1740687 - Enable 103 EarlyHints with the socket process enabled r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D131221
2021-11-17 05:56:41 +00:00
Alexandru Michis d844e2f9a5 Backed out 3 changesets (bug 1734132) for causing bustages in Http3Stream.cpp
CLOSED TREE

Backed out changeset 511af4b42efc (bug 1734132)
Backed out changeset 9516eb1214d8 (bug 1734132)
Backed out changeset 513d740d6477 (bug 1734132)
2021-11-16 20:26:52 +02:00
Manuel Bucher e1ce16359b Bug 1734132 - Map necko priorities to http3 priorities r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D127834
2021-11-16 17:01:07 +00:00
Dragana Damjanovic 2ed21be3b6 Bug 1740208 - mEarlyHintObserver needs to be called with a lock. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D131223
2021-11-16 12:28:13 +00:00
Dragana Damjanovic 89e1663bd8 Bug 1740208 - Implement an EarlyHint listener r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D130729
2021-11-16 12:28:13 +00:00
Andreea Pavel caa6cc4f0b Backed out changeset 3d28e4c556d7 (bug 1740208) for ThreadSanitizer failures in assign_assuming_AddRef on a CLOSED TREE 2021-11-16 11:35:29 +02:00
Dragana Damjanovic d30cb41384 Bug 1740208 - Implement an EarlyHint listener r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D130729
2021-11-16 08:45:09 +00:00
Andi-Bogdan Postelnicu c8e0f87391 Bug 1519636 - First reformat with clang-format 13.0.0. r=firefox-build-system-reviewers,sylvestre,mhentges
Updated with clang-format version 13.0.0 (taskcluster-OgjH5lasS5K_fvefdRcJVg)

Depends on D131114

Differential Revision: https://phabricator.services.mozilla.com/D129119
2021-11-16 08:07:30 +00:00
Valentin Gosu 8cc35ede6b Bug 1696867 - Use info-pages.css in about:cache r=dao
Differential Revision: https://phabricator.services.mozilla.com/D130625
2021-11-15 08:56:28 +00:00
Kershaw Chang 3fb2a0addf Bug 1734609 - Avoid crashing when mConnection is null, r=necko-reviewers,valentin
Given the high amount of the crashes, I think we should land this first to stop crashing.

Differential Revision: https://phabricator.services.mozilla.com/D130759
2021-11-10 16:39:16 +00:00
Kershaw Chang b7dcc16500 Bug 1666557 - Make TRR NAT64 prefixing work with socket process, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D130686
2021-11-10 13:02:59 +00:00
Valentin Gosu 1956ff62e0 Bug 1740457 - Allow network.http.spdy.chunk-size to be larger than 16K r=nhnt11
According to https://datatracker.ietf.org/doc/html/rfc7540#section-4.2


   The size of a frame payload is limited by the maximum size that a
   receiver advertises in the SETTINGS_MAX_FRAME_SIZE setting.  This
   setting can have any value between 2^14 (16,384) and 2^24-1
   (16,777,215) octets, inclusive.

Our previous clamping to 0x3fff prevented us from writing more than
16K bytes at a time for HTTP/2.
See bug 1596576 comment 61 and bug 1596576 comment 54.

This patch doesn't change the default value of the pref, it just allows
us to experiment with a larger chunk size.

Differential Revision: https://phabricator.services.mozilla.com/D130856
2021-11-10 12:08:24 +00:00
Cristian Tuns 91f08a1fbe Backed out changeset 8000eadc16ec (bug 1666557) for causing hybrid bustages on TRRServiceChild.cpp CLOSED TREE 2021-11-10 06:35:42 -05:00
Kershaw Chang 11eb300224 Bug 1666557 - Make TRR NAT64 prefixing work with socket process, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D130686
2021-11-10 11:15:40 +00:00
Gerald Squelart 5399574d8b Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-08 23:59:35 +00:00
Dimi 56505f3e46 Bug 1729640 - P1. Extend AddHighValuePermission to support 'highValueHasSavedLogin' and 'highValueIsLoggedIn' permission. r=necko-reviewers,farre,kershaw
This patch:
1. adds two 'highValueHasSavedLogin' and 'highValueIsLoggedIn' permission
2. moves 'AddHighValuePermission' from HttpBaseChannel to ProcessIsolation
   to support more high-value permission type.

Differential Revision: https://phabricator.services.mozilla.com/D127101
2021-11-05 17:11:31 +00:00
Cristian Tuns 1aeac93d23 Backed out 5 changesets (bug 1738627) for causing xpcshell failures on test_ext_geckoProfiler_schema.js CLOSED TREE
Backed out changeset 42d385d7da97 (bug 1738627)
Backed out changeset edeb3a338954 (bug 1738627)
Backed out changeset 98f02e35134d (bug 1738627)
Backed out changeset 711daa6dd24b (bug 1738627)
Backed out changeset 49e12753a40c (bug 1738627)
2021-11-05 05:12:28 -04:00
Gerald Squelart 7fa084ae7c Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-05 05:52:28 +00:00
Csoregi Natalia d2f8488b6a Backed out 7 changesets (bug 1729640) for causing permafailures on browser_web_process_isolation.js. a=backout
Backed out changeset 5b2a1799ce4e (bug 1729640)
Backed out changeset fcd4b833ad73 (bug 1729640)
Backed out changeset 5ff8d3adc6eb (bug 1729640)
Backed out changeset b8fd0343ca42 (bug 1729640)
Backed out changeset fbd6928e34ef (bug 1729640)
Backed out changeset 4ce2eebab0c4 (bug 1729640)
Backed out changeset c7c50c85f911 (bug 1729640)
2021-11-04 23:44:26 +02:00
Dimi 3718fbdc11 Bug 1729640 - P1. Extend AddHighValuePermission to support 'highValueHasSavedLogin' and 'highValueIsLoggedIn' permission. r=necko-reviewers,farre,kershaw
This patch:
1. adds two 'highValueHasSavedLogin' and 'highValueIsLoggedIn' permission
2. moves 'AddHighValuePermission' from HttpBaseChannel to ProcessIsolation
   to support more high-value permission type.

Differential Revision: https://phabricator.services.mozilla.com/D127101
2021-11-04 11:17:03 +00:00
Norisz Fay 47a4e47af2 Backed out 7 changesets (bug 1729640) for causing Bp-hybrid bustages on LoginDetectionService.o CLOSED TREE
Backed out changeset 4d3532da5652 (bug 1729640)
Backed out changeset 9ec5346cf9d9 (bug 1729640)
Backed out changeset 43dd05680186 (bug 1729640)
Backed out changeset f44a8f37d84c (bug 1729640)
Backed out changeset 66376bee8cef (bug 1729640)
Backed out changeset c7ffe85380d7 (bug 1729640)
Backed out changeset ae9c5de3902a (bug 1729640)
2021-11-02 16:33:01 +02:00
Dimi fc57da5280 Bug 1729640 - P1. Extend AddHighValuePermission to support 'highValueHasSavedLogin' and 'highValueIsLoggedIn' permission. r=necko-reviewers,farre,kershaw
This patch:
1. adds two 'highValueHasSavedLogin' and 'highValueIsLoggedIn' permission
2. moves 'AddHighValuePermission' from HttpBaseChannel to ProcessIsolation
   to support more high-value permission type.

Differential Revision: https://phabricator.services.mozilla.com/D127101
2021-11-02 13:47:47 +00:00
Kershaw Chang 541d91f0ba Bug 1703933 - Avoid racing on mIsHttp3Used, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D130006
2021-11-01 11:51:31 +00:00
Sean Feng 5283aecc5d Bug 1468476 - Make soft reload only force validates top level document r=necko-reviewers,nika,dragana,asuth
Currently, soft reload uses the `VALIDATE_ALWAYS` flag to not only
force revalidate the top level document, but also subresources.
This causes content to be refetched from the web even if there
are caches that are still valid and can be used.

Chrome already has such behaviour to not revalidate all resources.

Differential Revision: https://phabricator.services.mozilla.com/D122270
2021-10-28 16:11:56 +00:00
somdatta 7f3ac3954b Bug 271386- Make some functions private in nsHttpResponseHead r=necko-reviewers,kershaw
Make the following functions private because they are only used in nsHttpResponseHead.cpp for compiler optimization-
GetDateValue,GetAgeValue,GetMaxAgeValue,GetExpiresValue.
GetLastModifiedValue cannot be made private since it is being used in CachePushChecker.cpp and ParseDateHeader is already private.

Differential Revision: https://phabricator.services.mozilla.com/D129664
2021-10-28 11:07:55 +00:00
Alexandru Michis 363dc1e112 Backed out 3 changesets (bug 1732792, bug 1733481) for causing talos crashes in ConditionVariableImpl and xpcshell failures in test_remote_settings_utils.js.
CLOSED TREE

Backed out changeset 309190b4a49d (bug 1732792)
Backed out changeset 600e6dfd7436 (bug 1732792)
Backed out changeset 834441a08cc0 (bug 1733481)
2021-10-27 22:37:07 +03:00
Noemi Erli 0ac4387461 Backed out 2 changesets (bug 1734573) per developer's request CLOSED TREE
Backed out changeset 7d7d9674f18f (bug 1734573)
Backed out changeset 0e5afef7d074 (bug 1734573)
2021-10-27 21:43:19 +03:00
Shane Caraveo b683ebea88 Bug 1733481 retry telemetry requests when a proxy fails r=chutten,robwu,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D127170
2021-10-27 16:16:50 +00:00
Valentin Gosu 6b419daeb0 Bug 1702529 - Pass NetAddr pointers to rust instead of a serialization r=necko-reviewers,dragana
It seems that the serialization generated by inet_ntop_internal via
getnameinfo is sometimes wrong, returning `?` instead of serializing the
IP we pass in.
It's also inefficient to keep passing the serialization to and from rust
code - instead it's much easier to just pass a pointer to the NetAddr
union and build a proper SocketAddr instance on the rust side from
from the bytes instead of parsing the serialization

Differential Revision: https://phabricator.services.mozilla.com/D129489
2021-10-27 15:28:41 +00:00
Cristian Tuns d766fa0f20 Backed out changeset ba94ff2a7696 (bug 1702529) for causing build bustages. CLOSED TREE 2021-10-27 07:07:17 -04:00
Valentin Gosu 609bf1922f Bug 1702529 - Pass NetAddr pointers to rust instead of a serialization r=necko-reviewers,dragana
It seems that the serialization generated by inet_ntop_internal via
getnameinfo is sometimes wrong, returning `?` instead of serializing the
IP we pass in.
It's also inefficient to keep passing the serialization to and from rust
code - instead it's much easier to just pass a pointer to the NetAddr
union and build a proper SocketAddr instance on the rust side from
from the bytes instead of parsing the serialization

Differential Revision: https://phabricator.services.mozilla.com/D129489
2021-10-27 10:44:46 +00:00
Marian-Vasile Laza 84fc0a136f Backed out changeset 3882acd862fc (bug 1733481) for causing build bustages on HttpBaseChannel.cpp. CLOSED TREE 2021-10-27 01:37:32 +03:00
Shane Caraveo 863c48338b Bug 1733481 retry telemetry requests when a proxy fails r=chutten,robwu,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D127170
2021-10-26 20:32:52 +00:00
Kershaw Chang 6f8690e393 Bug 1734573 - Add a new activity type to report proxy response header, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D127824
2021-10-26 19:39:27 +00:00
Narcis Beleuzu 331a8b2a4f Backed out changeset 054e0b5325a3 (bug 1733481) for xpcshell failures on /test_failover_retry.js CLOSED TREE 2021-10-26 21:57:33 +03:00
Shane Caraveo 5b177fc77d Bug 1733481 retry telemetry requests when a proxy fails r=chutten,robwu,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D127170
2021-10-26 18:16:38 +00:00
Sandor Molnar 799be2330b Backed out changeset 5a4d9d296d42 (bug 1733481) for causing xpc failures in unit/test_failover_retry. CLOSED TREE 2021-10-26 18:39:07 +03:00
Shane Caraveo 15e1356e3b Bug 1733481 retry telemetry requests when a proxy fails r=chutten,robwu,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D127170
2021-10-26 14:41:11 +00:00
Hannah Peuckmann 09b6c3a033 Bug 1567443 - Added flag for indicating secure Chrome UI in nsIAboutModule. r=pbz,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D128188
2021-10-26 13:32:31 +00:00
criss 7c13c79ea0 Backed out 2 changesets (bug 1734573) for causing failures on browser_net_brotli.js. CLOSED TREE
Backed out changeset 1b2194a0e1ec (bug 1734573)
Backed out changeset 51a00e9f45a3 (bug 1734573)
2021-10-26 15:02:41 +03:00
Kershaw Chang 6d485bbb43 Bug 1723946 - Avoid racing on sSocketProcessChild, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D129502
2021-10-26 11:22:56 +00:00
Kershaw Chang b02f15305b Bug 1734573 - Add a new activity type to report proxy response header, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D127824
2021-10-26 11:21:43 +00:00
Valentin Gosu 44713199ad Bug 1436503 - Check if pointer is null r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D129479
2021-10-26 08:04:13 +00:00
Valentin Gosu 44e308670b Bug 1733274 - Skip CORP check for TYPE_SAVEAS_DOWNLOAD r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D129395
2021-10-25 14:03:20 +00:00
Cristian Tuns 0b4f04d43f Backed out changeset 177e6f28d348 (bug 1567443) for causing mochitest failures on browser_check_identity_state.js. CLOSED TREE 2021-10-25 06:45:43 -04:00
Hannah Peuckmann 06382f1212 Bug 1567443 - Using nsIAboutModule flag instead of regex to indicate secure about page. r=pbz,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D128188
2021-10-25 09:34:06 +00:00
Dragana Damjanovic c512e95729 Bug 1732424 - Add SSL_ERROR_BAD_MAC_ALERT error as a reason to disable 0RTT on a HTTP/2 or HTTP/1.1 connection. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D127881
2021-10-22 11:28:39 +00:00
Narcis Beleuzu 36015f8532 Merge autoland to mozilla central. a=merge 2021-10-22 06:04:37 +03:00
Andrei Oprea e42054f5c0 Bug 1733357 - Expose Nimbus API to all platforms r=necko-reviewers,valentin,k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D127938
2021-10-21 13:48:04 +00:00
Michael[tm] Smith 95631783b8 Bug 1736026 - Show HTTP status code in CORS messages r=necko-reviewers,emilio,valentin
Differential Revision: https://phabricator.services.mozilla.com/D128596
2021-10-21 02:55:15 +00:00
Iulian Moraru 01e3da82fb Backed out changeset 6abb8df4efef (bug 1733357) for causing android gtest failures. CLOSED TREE 2021-10-21 05:18:17 +03:00
Andrei Oprea 0de35978e5 Bug 1733357 - Expose Nimbus API to all platforms r=necko-reviewers,valentin,k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D127938
2021-10-20 17:30:59 +00:00
Alexandru Michis 431ca1e92e Backed out changeset eb276ce17c77 (bug 1733357) for causing bustages in nsHttpHandler.cpp
CLOSED TREE
2021-10-20 19:01:36 +03:00
Andrei Oprea 95c17cfae4 Bug 1733357 - Expose Nimbus API to all platforms r=necko-reviewers,valentin,k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D127938
2021-10-20 12:47:34 +00:00
Valentin Gosu 182d9a39b1 Bug 1735299 - We don't need to proxy release of URIs r=nhnt11
Previously nsIURIs were not thread safe. Now they are, so releasing them on
any thread is fine.

Differential Revision: https://phabricator.services.mozilla.com/D128178
2021-10-19 13:44:25 +00:00
Valentin Gosu cc8b1ac579 Bug 1735299 - Use fewer NS_ADDREF in netwerk/ r=nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D128176
2021-10-19 13:44:24 +00:00
Valentin Gosu 8344ba5368 Bug 1735306 - Add nsCStringASCIICaseInsensitiveHashKey r=xpcom-reviewers,necko-reviewers,nika,hsivonen,dragana
Differential Revision: https://phabricator.services.mozilla.com/D116217
2021-10-19 10:49:46 +00:00
Gerald Squelart df50ece611 Bug 1735697 - Remove profiler_can_accept_markers(), use profiler_thread_is_being_profiled() instead - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D128577
2021-10-18 23:11:30 +00:00
criss f46d6ec78d Backed out changeset c9da45719e55 (bug 1736026) for causing mochitest failures. CLOSED TREE 2021-10-16 14:51:08 +03:00
Michael[tm] Smith 6b6358f7fc Bug 1736026 - Show HTTP status code in CORS messages r=necko-reviewers,emilio,valentin
Differential Revision: https://phabricator.services.mozilla.com/D128596
2021-10-16 11:05:41 +00:00
Yury Delendik 04ca8c2532 Bug 1487113 - nsICacheInfoChannel.alternativeDataInputStream as attribute. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117360
2021-10-15 21:13:43 +00:00
Valentin Gosu bf91b5a3a9 Bug 1733922 - Specialize TransportSetup into Primary/BackupTransportSetup r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D127410
2021-10-14 12:58:01 +00:00
Valentin Gosu 4cd661b6a5 Bug 1733356 - Fix non-unified build errors in netwerk/protocol/http/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127407
2021-10-14 12:58:01 +00:00
Valentin Gosu 9ea7bf77a1 Bug 1733356 - Fix non-unified build errors in netwerk/protocol/websocket/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127406
2021-10-14 12:58:01 +00:00
Valentin Gosu 07015ff750 Bug 1733356 - Fix non-unified build errors in netwerk/protocol/res/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127405
2021-10-14 12:58:00 +00:00
Valentin Gosu 32c2d19bc8 Bug 1733356 - Fix non-unified build errors in netwerk/protocol/gio r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127404
2021-10-14 12:58:00 +00:00
Valentin Gosu 21a182cb3c Bug 1733356 - Fix non-unified build errors in netwerk/protocol/about/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127403
2021-10-14 12:57:59 +00:00
Valentin Gosu 966339c56f Bug 1733356 - Fix non-unified build errors in netwerk/dns/ r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D127399
2021-10-14 12:57:58 +00:00
Dragana Damjanovic 4aff9977b4 Bug 1734198 - Close transactions with NS_ERROR_NET_RESET if a stateless reset is received on a HTTP/3 connection. r=necko-reviewers,valentin
This is an appropriate error to set and it may cause transactions to be restarted if possible (e.g. no data has been received already and the method is safe).

Differential Revision: https://phabricator.services.mozilla.com/D127877
2021-10-14 12:55:35 +00:00
Cosmin Sabou 8d444b25a5 Backed out 10 changesets (bug 1733356, bug 1733922) for causing windows hybrid bustages. CLOSED TREE
Backed out changeset 85b747a60e73 (bug 1733922)
Backed out changeset 4af7a3a697ad (bug 1733356)
Backed out changeset 3b2e02c99090 (bug 1733356)
Backed out changeset b481b801250e (bug 1733356)
Backed out changeset 88c33cdcb8aa (bug 1733356)
Backed out changeset 3d31e8c8e194 (bug 1733356)
Backed out changeset 616f676e8f94 (bug 1733356)
Backed out changeset 3f8e9b14879d (bug 1733356)
Backed out changeset 241c7cdb3f6b (bug 1733356)
Backed out changeset 7f9e266070c6 (bug 1733356)
2021-10-14 01:54:30 +03:00
Valentin Gosu efa69e929d Bug 1733922 - Specialize TransportSetup into Primary/BackupTransportSetup r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D127410
2021-10-13 19:39:09 +00:00
Valentin Gosu a549c09e13 Bug 1733356 - Fix non-unified build errors in netwerk/protocol/http/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127407
2021-10-13 19:39:08 +00:00
Valentin Gosu 5e47f46683 Bug 1733356 - Fix non-unified build errors in netwerk/protocol/websocket/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127406
2021-10-13 19:39:08 +00:00
Valentin Gosu 0432edd8e1 Bug 1733356 - Fix non-unified build errors in netwerk/protocol/res/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127405
2021-10-13 19:39:07 +00:00
Valentin Gosu 288c3f2619 Bug 1733356 - Fix non-unified build errors in netwerk/protocol/gio r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127404
2021-10-13 19:39:07 +00:00
Valentin Gosu 5c58b8c434 Bug 1733356 - Fix non-unified build errors in netwerk/protocol/about/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127403
2021-10-13 19:39:07 +00:00
Valentin Gosu 37b7da41fd Bug 1733356 - Fix non-unified build errors in netwerk/dns/ r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D127399
2021-10-13 19:39:05 +00:00
Sean Feng d275bc2c1f Bug 1722759 - Make devtools network panel to display images that are loaded by the image cache r=necko-reviewers,dragana,tnikkel,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D121122
2021-10-12 22:30:46 +00:00
Valentin Gosu 0cbc1f290d Bug 1312057 - Fix prefetch telmetry r=mayhemer,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D11518
2021-10-12 15:41:15 +00:00
Kershaw Chang 40dab11b6b Bug 1544127 - Always release load info on main thread, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D127675
2021-10-12 14:20:41 +00:00
Cristian Tuns 2be2d6077e Backed out 10 changesets (bug 1733922, bug 1733356) for causing hybrid build bustages on nsAboutProtocolHandler.cpp. CLOSED TREE
Backed out changeset 293ff1a22c98 (bug 1733922)
Backed out changeset b640749ee844 (bug 1733356)
Backed out changeset d2e3dc1b492a (bug 1733356)
Backed out changeset cd6c19829601 (bug 1733356)
Backed out changeset ef8145f88447 (bug 1733356)
Backed out changeset 366e2d375980 (bug 1733356)
Backed out changeset 14563275a25b (bug 1733356)
Backed out changeset 7700cd82bdf2 (bug 1733356)
Backed out changeset 4e198c3d5ef3 (bug 1733356)
Backed out changeset c26481d0f689 (bug 1733356)
2021-10-11 10:02:20 -04:00
Luca Greco e0845722c3 Bug 1706594 - Add nsICancelable out param to nsBaseChannel::BeginAsyncRead virtual method. r=nika,necko-reviewers,valentin
This patch introduces:

- a second nsICancelable out param in nsBaseChannel::BeginAsyncRead, which is meant to be non-null
  when the subclass is unable to set the nsIRequest out param right away (e.g because there is
  some async work needed before the subclass is able to get an nsIRequest instance).
  The nsICancelable does only allow the channel to cancel the underlying request (and stream pump),
  but it doesn't allow the channel to be suspended and resumed, but that was already the case
  for the subclasses that were already not returning an nsIRequest instance (e.g. like the
  ExtensionProtocolHandler was doing when it is asynchrously retriving a stream from the parent
  process).

- require NotNull<nsCOMPtr<...>> in the SimpleChannel's BeginAsyncRead callback signature, to make harder
  to overlook the requirement of returning an nsIRequest or nsICancelable.

- a diagnostic assertion (from SimpleChannel's BeginAsyncRead method) to more visible fail if we still end
  up with neither an nsIRequest or nsICancelable result as SimpleChannel callback result.

- changes to ExtensionProtocolHandler, PageThumbProtocolHandler and nsAnnoProtocolHandler to adapt them
  to the new nsBaseChannel::BeginAsyncRead signature.

Differential Revision: https://phabricator.services.mozilla.com/D125545
2021-10-11 11:06:47 +00:00
Valentin Gosu 20b1871337 Bug 1733922 - Specialize TransportSetup into Primary/BackupTransportSetup r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D127410
2021-10-11 10:40:09 +00:00
Valentin Gosu d837d118aa Bug 1733356 - Fix non-unified build errors in netwerk/protocol/http/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127407
2021-10-11 10:40:08 +00:00
Valentin Gosu 785d39e366 Bug 1733356 - Fix non-unified build errors in netwerk/protocol/websocket/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127406
2021-10-11 10:40:08 +00:00
Valentin Gosu 784e5ea947 Bug 1733356 - Fix non-unified build errors in netwerk/protocol/res/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127405
2021-10-11 10:40:08 +00:00
Valentin Gosu 124455da74 Bug 1733356 - Fix non-unified build errors in netwerk/protocol/gio r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127404
2021-10-11 10:40:07 +00:00
Valentin Gosu c3c10a9de5 Bug 1733356 - Fix non-unified build errors in netwerk/protocol/about/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D127403
2021-10-11 10:40:07 +00:00
Valentin Gosu 6480795f4b Bug 1733356 - Fix non-unified build errors in netwerk/dns/ r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D127399
2021-10-11 10:40:05 +00:00
Jens Stutte 2216dc0a3d Bug 1731564: Use motivated SpinEventLoopUntil inside netwerk/*. r=necko-reviewers,valentin
Depends on D127102

Differential Revision: https://phabricator.services.mozilla.com/D127225
2021-10-07 08:06:12 +00:00
june wilde 692c22b993 Bug 1670058 - support Global Privacy Control signal; r=smaug,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D126966
2021-10-07 07:55:30 +00:00
Marian-Vasile Laza 18fb16c542 Backed out 18 changesets (bug 1731564) for causing build bustages on SpinEventLoopUntil. CLOSED TREE
Backed out changeset 0464dbdc8584 (bug 1731564)
Backed out changeset 0d996df13545 (bug 1731564)
Backed out changeset 5630a0e7a109 (bug 1731564)
Backed out changeset 37b41d187cdb (bug 1731564)
Backed out changeset d37700fa60b6 (bug 1731564)
Backed out changeset b0ce7db44b99 (bug 1731564)
Backed out changeset aa5ec3aa1535 (bug 1731564)
Backed out changeset 73b648f1fa70 (bug 1731564)
Backed out changeset bb8fb0f9833e (bug 1731564)
Backed out changeset 0d8905144f5d (bug 1731564)
Backed out changeset 2cfb094a1ec3 (bug 1731564)
Backed out changeset 78d3b0257a6a (bug 1731564)
Backed out changeset e9d32926e93c (bug 1731564)
Backed out changeset 874cab520ce5 (bug 1731564)
Backed out changeset d8071cc32bd9 (bug 1731564)
Backed out changeset 283c5393cbbc (bug 1731564)
Backed out changeset 317bc38e3de5 (bug 1731564)
Backed out changeset 53e3f4862439 (bug 1731564)
2021-10-07 00:09:19 +03:00
Jens Stutte b3a8e550fe Bug 1731564: Use motivated SpinEventLoopUntil inside netwerk/*. r=necko-reviewers,valentin
Depends on D127102

Differential Revision: https://phabricator.services.mozilla.com/D127225
2021-10-06 19:45:14 +00:00
Alexandru Michis 485a54ca75 Backed out changeset b61b692cfbce (bug 1670058) for causing bustages in nsHttpChannel.cpp
CLOSED TREE
2021-10-05 19:49:52 +03:00
june wilde e864a69420 Bug 1670058 - support Global Privacy Control signal; r=smaug,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D126966
2021-10-05 15:00:30 +00:00
Noemi Erli 55b2633c97 Backed out 3 changesets (bug 1733356) for causing bustages in CookieStorage.cpp CLOSED TREE
Backed out changeset e94611929d92 (bug 1733356)
Backed out changeset f1866e615f08 (bug 1733356)
Backed out changeset b87b34fa8a6f (bug 1733356)
2021-10-05 12:57:44 +03:00
Valentin Gosu 822cd925d0 Bug 1733356 - Fix non-unified build errors in netwerk/dns/ r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D127399
2021-10-05 08:22:00 +00:00
Gijs Kruitbosch dd394d57a2 Bug 1733558 - stop duplicating append redirect history entry logic everywhere, r=ckerschb,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D127251
2021-10-04 13:24:15 +00:00
Emilio Cobos Alvarez 3e78dd6549 Bug 1030660 - Disable ClearBogusContentEncodingIfNeeded. r=necko-reviewers,valentin
Other browsers don't do this and it causes compat issues.

Differential Revision: https://phabricator.services.mozilla.com/D127255
2021-10-02 16:40:36 +00:00
Dragana Damjanovic 00a3938779 Bug 1718520 - Retry a HttpTransaction if early data are used and a SSL_ERROR_PROTOCOL_VERSION_ALERT is received r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D126558
2021-10-01 17:22:54 +00:00
Dragana Damjanovic 04599ffe8f Bug 1718520 - Disable early-data if a SSL_ERROR_PROTOCOL_VERSION_ALERT is received r=mt
If amount of origins that have early-data disabled exceeds certain amount, disable early-data for all origins

This is controlled by prefs.

Differential Revision: https://phabricator.services.mozilla.com/D126555
2021-10-01 12:14:21 +00:00
Alexandru Michis 611ed75183 Merge mozilla-central to autoland a=merge 2021-09-30 17:47:10 +03:00
Alexandru Michis 584991b4bd Backed out changeset 5bb05a86bd2e (bug 1732885) for causing networking crashes. a=backout 2021-09-30 17:31:53 +03:00
Kershaw Chang 01b5dd1808 Bug 1733247 - Check the http3 pref when selecting an npnToken, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D127015
2021-09-30 12:18:47 +00:00
Kershaw Chang 833394b32b Bug 1732584 - Make sure NS_HTTP_DISALLOW_HTTP3 is set when proxy is used, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D126907
2021-09-30 12:17:49 +00:00
Dragana Damjanovic 33e8e81aa8 Bug 1732885 - Add assertions to make sure certificates are set if a handshake succeeds. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D126837
2021-09-29 21:18:12 +00:00
Dennis Schubert e6d9617889 Bug 1732875 - Call the ExperimentUserAgentUpdated() handler once direcly in nsHttpHandler::Init(). r=cpeterson,necko-reviewers,valentin
This is needed to make sure the experimental User Agent string is applied immediately after starting the browser, not just whenever the Nimbus data changes as part of the NimbusFeatures::OnUpdate handler.

Differential Revision: https://phabricator.services.mozilla.com/D126774
2021-09-28 17:11:26 +00:00
Shane Caraveo efe27c108e Bug 1732388 support proxyBypass flag on http channels r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D126550
2021-09-27 21:01:53 +00:00
Dragana Damjanovic 5add3e9091 Bug 1732256 - When TLS handshake completion is pending it may happen that nss and necko are out of sync. r=necko-reviewers,kershaw,valentin
The previous check was incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D126496
2021-09-23 13:10:23 +00:00
Valentin Gosu 373cbe05bd Bug 1732249 - Check if secInfo->GetServerCert returns a null cert r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D126453
2021-09-23 09:00:18 +00:00
Sean Feng a1b9c83581 Bug 1731831 - Rename timedChannel to timedChannelInfo for ReplacementChannelConfig r=dragana,necko-reviewers
`timedChannel` is wrong because it implies it is a channel, however it
is in fact a `TimedChannelInfo`.

Differential Revision: https://phabricator.services.mozilla.com/D126254
2021-09-22 19:07:56 +00:00
Dragana Damjanovic a33c6961ed Bug 1382886 - Consider that mTransport may be nullptr when Handshake done callback is called r=necko-reviewers,kershaw
Also set mEarlyDataState to done earlier.

Differential Revision: https://phabricator.services.mozilla.com/D126264
2021-09-22 09:19:32 +00:00
Dragana Damjanovic 4148d02518 Bug 1382886 - Fix fuzzing build, also we cannot set SecurityInfo during read r=necko-reviewers,kershaw
Before this bug TLS handshake was only driven by forcing writes. SecurtyInfo was set during a write code path. That is not anymore true and the TLS handshake can be driven by reading from a socket. That causes an issue where the SecurtyInfo was not set in case a TLS handshake fails. This bug added the setting of the SecurtyInfo to the read code path, but that causes problems when the transaction is closed due to corrupted response.
This patch fixes this by moving the setting of SecurtyInfo to Close() function.

Do not call HandshakeDoneInternal if the connection has been closed between posting the HandshakeDoneInternal runable and executing it.

Differential Revision: https://phabricator.services.mozilla.com/D125666
2021-09-22 09:19:32 +00:00
Dragana Damjanovic 1f317abe34 Bug 1382886 - Remove a busy-wait if the early-data is negotiated and http/1.1 is used but the transaction cannot send early-data. r=necko-reviewers,kershaw
In this case necko should poll for read (not for write) and reset the poll flags when the handshake is done.
The other option is to inspect the resumption ticket before adding it to the nss socket and find out which alpn will be used and disable the early-data if the version is http/1.1 and the transaction cannot send early-data. This currently only works on Nightly. When we roll out the necko’s token cache we can consider making this change.

Additional changes:
Consolidate mEarlyDataNegotiated and mWaitingFor0RTTResponse into mEarlyDataState

Differential Revision: https://phabricator.services.mozilla.com/D123928
2021-09-22 09:19:32 +00:00
Dragana Damjanovic df4152feaf Bug 1382886 - Make sure that nsHttpConnection immediately knows that the handshake is done. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D123919
2021-09-22 09:19:31 +00:00
Dragana Damjanovic 985c02c2f1 Bug 1382886 - Use HandshakeDone to signal that a handshake is done r=necko-reviewers,keeler,kershaw
HandshakeDone will be called after a handshake is finished and also after the certificate verifications are done.
The code relies on HandshakeDone to signal that the handshake is done. When early-data is not available HandshakeDone is responsible for setting up a Http2 session if needed. There are 2 outcomes when early-data is used:
1) early-data is accepted and transaction continues polling for read,
2) early-data is rejected. In this case, the transaction is restarted as well as polling flags, i.e. the connection will stop polling for read and start polling for write.
Another difference is that a transaction that is started during the early-data period will behave as a normal transaction, i.e. it will write data and continue polling for read to receive response. The special cases during early-data(mWaitingFor0RTTResponse==true) are removed from nsHttpConnection::OnSocketWritable().

EnsureNPNComplete is only responsible for driving handshake and checking the early-data availability. All logic for finishing a handshake (i.e. checking whether early-data is accepted and checking alpn value) has been moved to HandshakeDone.
The patch also extracts FinishNPNSetup that is responsible for the bookkeeping after a handshake is done or fails, e.g. resetting transactions if 0Rtt is used but handshake fails, updating timings and sending telemetry.

HandshakeDone needs to be dispatched so that it is not called inside nss locks. The side effect of this is that nsHttpConnection::OnSocketWritable() may be called in between  HandshakeDone being dispatched and executed. Therefore we still need to keep CheckCanWrite0RTTData(). This can be fixed in a follow up patch.

Side cleanups:
Remove mNotTrustedMitmDetected - his was used for ESNI, but it is not used anymore

Differential Revision: https://phabricator.services.mozilla.com/D123824
2021-09-22 09:19:31 +00:00
Dragana Damjanovic 18800f98eb Bug 1382886 - Don’t use a special way to write 0RTT data. Reuse the standard code path r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D123680
2021-09-22 09:19:30 +00:00
Dragana Damjanovic c116b60b2c Bug 1382886 - Add a callback when the handshake is done. r=necko-reviewers,kershaw,keeler
Differential Revision: https://phabricator.services.mozilla.com/D123601
2021-09-22 09:19:30 +00:00
Dragana Damjanovic 96de623086 Bug 1382886 - Refactor EnsureNPNComplete r=necko-reviewers,kershaw
Extract Check0RttEnabled
The old code checks 0RTT state then does a DriveHandshake then checks 0RTT again. This is done in this way because before DriveHandshake is called for the first time 0RTT states are not set.  DriveHandshake is sometimes called as a side effect by IsAlive() check. The new code makes this less complex and just calls DriveHandshaek before checking 0RTT.
Extract code for setting 0RTT telemetry values.
Remove some code that set timing because the same code is called a bit later again.

Differential Revision: https://phabricator.services.mozilla.com/D123645
2021-09-22 09:19:29 +00:00
Kershaw Chang 3ab686eb88 Bug 1730418 - Fetch HTTPS RR in nsHttpChannel::MaybeUseHTTPSRRForUpgrade, r=necko-reviewers,dragana
Before this patch, we fetch HTTPS RR in `nsHttpChannel::MaybeStartDNSPrefetch`, which is too early. It's possible that this http request is blocked by an extension but we still send the query for HTTPS RR.
To improve this, we move the time of fetching HTTPS RR a bit late.

Differential Revision: https://phabricator.services.mozilla.com/D125931
2021-09-21 08:58:24 +00:00
Kershaw Chang 0017d6ff11 Bug 1726528 - Make sure we don't fallback to a record without echConfig, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D125074
2021-09-20 14:24:15 +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
Kershaw Chang 5ed5b6c43a Bug 1729431 - Use an enum as the index of connection info's hash key, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D124752
2021-09-20 14:02:49 +00:00
Kershaw Chang 3146e59eaf Bug 1667102 - Make sure nsHttpTransaction::mConnection is released on socket thread, r=necko-reviewers,dragana
Since `nsHttpTransaction::mConnection` could be `Http2Session` and `Http2Session` supports weak reference, we should make sure `Http2Session` to be always released on socket thread.

Differential Revision: https://phabricator.services.mozilla.com/D125510
2021-09-20 13:57:29 +00:00
Kershaw Chang f9ebc6ad69 Bug 1667102 - Add some diagnostic assertions, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D124753
2021-09-20 13:57:29 +00:00
Butkovits Atila e097708c27 Backed out 7 changesets (bug 1382886) for causing very frequent networking crashes. a=backout DONTBUILD
Backed out changeset e0d76ea1bdd2 (bug 1382886)
Backed out changeset 1db60c600b97 (bug 1382886)
Backed out changeset c922a30d444e (bug 1382886)
Backed out changeset 7f2260b49e60 (bug 1382886)
Backed out changeset 0c049a8ee4a8 (bug 1382886)
Backed out changeset 632eefa7e529 (bug 1382886)
Backed out changeset fe6b8f41ca83 (bug 1382886)
2021-09-18 12:37:24 +03:00
Marian-Vasile Laza 381c254e6d Backed out 3 changesets (bug 1487113) for causing hazard bustages. CLOSED TREE
Backed out changeset 13bf04fc644f (bug 1487113)
Backed out changeset 5b7fe5d564aa (bug 1487113)
Backed out changeset 02236ccd64b4 (bug 1487113)
2021-09-17 22:58:33 +03:00
Dragana Damjanovic 4bd11b491f Bug 1382886 - Fix fuzzing build, also we cannot set SecurityInfo during read r=necko-reviewers,kershaw
Before this bug TLS handshake was only driven by forcing writes. SecurtyInfo was set during a write code path. That is not anymore true and the TLS handshake can be driven by reading from a socket. That causes an issue where the SecurtyInfo was not set in case a TLS handshake fails. This bug added the setting of the SecurtyInfo to the read code path, but that causes problems when the transaction is closed due to corrupted response.
This patch fixes this by moving the setting of SecurtyInfo to Close() function.

Do not call HandshakeDoneInternal if the connection has been closed between posting the HandshakeDoneInternal runable and executing it.

Differential Revision: https://phabricator.services.mozilla.com/D125666
2021-09-17 13:19:02 +00:00
Dragana Damjanovic 99717c8156 Bug 1382886 - Remove a busy-wait if the early-data is negotiated and http/1.1 is used but the transaction cannot send early-data. r=necko-reviewers,kershaw
In this case necko should poll for read (not for write) and reset the poll flags when the handshake is done.
The other option is to inspect the resumption ticket before adding it to the nss socket and find out which alpn will be used and disable the early-data if the version is http/1.1 and the transaction cannot send early-data. This currently only works on Nightly. When we roll out the necko’s token cache we can consider making this change.

Additional changes:
Consolidate mEarlyDataNegotiated and mWaitingFor0RTTResponse into mEarlyDataState

Differential Revision: https://phabricator.services.mozilla.com/D123928
2021-09-17 13:19:02 +00:00
Dragana Damjanovic 3f98b48466 Bug 1382886 - Make sure that nsHttpConnection immediately knows that the handshake is done. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D123919
2021-09-17 13:19:01 +00:00
Dragana Damjanovic 72ccc52dcc Bug 1382886 - Use HandshakeDone to signal that a handshake is done r=necko-reviewers,keeler,kershaw
HandshakeDone will be called after a handshake is finished and also after the certificate verifications are done.
The code relies on HandshakeDone to signal that the handshake is done. When early-data is not available HandshakeDone is responsible for setting up a Http2 session if needed. There are 2 outcomes when early-data is used:
1) early-data is accepted and transaction continues polling for read,
2) early-data is rejected. In this case, the transaction is restarted as well as polling flags, i.e. the connection will stop polling for read and start polling for write.
Another difference is that a transaction that is started during the early-data period will behave as a normal transaction, i.e. it will write data and continue polling for read to receive response. The special cases during early-data(mWaitingFor0RTTResponse==true) are removed from nsHttpConnection::OnSocketWritable().

EnsureNPNComplete is only responsible for driving handshake and checking the early-data availability. All logic for finishing a handshake (i.e. checking whether early-data is accepted and checking alpn value) has been moved to HandshakeDone.
The patch also extracts FinishNPNSetup that is responsible for the bookkeeping after a handshake is done or fails, e.g. resetting transactions if 0Rtt is used but handshake fails, updating timings and sending telemetry.

HandshakeDone needs to be dispatched so that it is not called inside nss locks. The side effect of this is that nsHttpConnection::OnSocketWritable() may be called in between  HandshakeDone being dispatched and executed. Therefore we still need to keep CheckCanWrite0RTTData(). This can be fixed in a follow up patch.

Side cleanups:
Remove mNotTrustedMitmDetected - his was used for ESNI, but it is not used anymore

Differential Revision: https://phabricator.services.mozilla.com/D123824
2021-09-17 13:19:01 +00:00
Dragana Damjanovic eebb396d61 Bug 1382886 - Don’t use a special way to write 0RTT data. Reuse the standard code path r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D123680
2021-09-17 13:19:01 +00:00
Dragana Damjanovic 1f0044c034 Bug 1382886 - Add a callback when the handshake is done. r=necko-reviewers,kershaw,keeler
Differential Revision: https://phabricator.services.mozilla.com/D123601
2021-09-17 13:19:00 +00:00
Dragana Damjanovic e5fd2cf6d3 Bug 1382886 - Refactor EnsureNPNComplete r=necko-reviewers,kershaw
Extract Check0RttEnabled
The old code checks 0RTT state then does a DriveHandshake then checks 0RTT again. This is done in this way because before DriveHandshake is called for the first time 0RTT states are not set.  DriveHandshake is sometimes called as a side effect by IsAlive() check. The new code makes this less complex and just calls DriveHandshaek before checking 0RTT.
Extract code for setting 0RTT telemetry values.
Remove some code that set timing because the same code is called a bit later again.

Differential Revision: https://phabricator.services.mozilla.com/D123645
2021-09-17 13:19:00 +00:00
Yury Delendik 19b0d24e7f Bug 1487113 - nsICacheInfoChannel.alternativeDataInputStream as attribute. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117360
2021-09-17 12:16:23 +00:00
Valentin Gosu 72c414923b Bug 1730494 - Add error codes for COOP and COEP errors r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D125671
2021-09-16 08:31:04 +00:00
Valentin Gosu 13ab902ec7 Bug 1730494 - Show error in webconsole when resource is blocked by CORP headers r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D125392
2021-09-16 08:31:03 +00:00
Valentin Gosu c1f1effff8 Bug 1699373 - Call ProcessCrossOrigin*Header methods after loading cached headers r=necko-reviewers,dragana
Previously we called `ProcessCrossOriginEmbedderPolicy` in
`nsHttpChannel::ContinueProcessResponse1`, but we only loaded the cached
response headers in `ContinueProcessResponse3`, meaning that we incorrectly
reported a missing header for the revalidated resource.

This change moves the header checking calls to `ContinueProcessNormal` and
`AsyncProcessRedirection` instead, so they get executed after processing
the cached headers.

Differential Revision: https://phabricator.services.mozilla.com/D125184
2021-09-16 08:31:03 +00:00
Cristian Tuns f2f6eac4d6 Backed out 3 changesets (bug 1487113) for causing mochitest failures. CLOSED TREE
Backed out changeset b20e5d76c77e (bug 1487113)
Backed out changeset b0b2b27dcb68 (bug 1487113)
Backed out changeset 9214b396eb84 (bug 1487113)
2021-09-14 17:38:32 -04:00
Yury Delendik 0b78665a0e Bug 1487113 - nsICacheInfoChannel.alternativeDataInputStream as attribute. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117360
2021-09-14 20:12:51 +00:00
Manuel Bucher ecf25dc8fa Bug 1730672 - Update neqo to 0.5.0 r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D125528
2021-09-14 13:37:19 +00:00
Nicklas Boman ad454095ed Bug 1308103 - Replace PL_strcmp/PL_strncmp with strcmp/strncmp in netwerk/ r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D123877
2021-09-09 19:36:10 +00:00
Kershaw Chang 1956da361f Bug 1725766 - Disallow view-source URI to open external apps, r=necko-reviewers,dragana,valentin
Differential Revision: https://phabricator.services.mozilla.com/D123825
2021-09-09 07:42:59 +00:00
Nika Layzell 3211ad72e0 Bug 1723797 - Add a separate pref to control process isolation strategy when fission.autostart is enabled, r=farre,johannh,necko-reviewers,dragana
This new pref will be used on android to enable high-value-only process
isolation. An initial version of high-value-only process isolation is
also implemented in this bug, using the permission manager to track
whether a site is high-value due to having served a
`Cross-Origin-Opener-Policy` header.

Future high-value permissions due to things like logging into a site and
OAuth flows can be tracked in the same way, by adding the permission to
the permissions database.

In the future, it might be valuable to provide UI for visualizing what
sites are considered high-value at any point in time, but this works
fine for now.

Differential Revision: https://phabricator.services.mozilla.com/D123127
2021-09-08 17:45:31 +00:00
Valentin Gosu 009064a050 Bug 1729497 - Return error code in nsHttpChannelAuthProvider::GetAuthenticator if we return a null authenticator r=necko-reviewers,kershaw
This can happen during shutdown, when in `nsHttpNegotiateAuth::GetOrCreate()`
we assign `gSingleton` to a `new nsHttpNegotiateAuth` object but then it gets
cleared immediately by `mozilla::ClearOnShutdown` because we're already
shutting down.

Differential Revision: https://phabricator.services.mozilla.com/D124893
2021-09-08 09:40:33 +00:00
Benjamin Peterson 634755298f Bug 1729609 - Fix typo in Http2Session.cpp comment. r=necko-reviewers,valentin DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D124873
2021-09-08 08:00:16 +00:00
Kershaw Chang 5ea2a6408c Bug 1716566 - Make websocket work when socket process is enabled, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D123108
2021-09-07 14:42:44 +00:00
Florian Quèze ba40523537 Bug 1728760 - move the nsHttpChannel nsITimerCallback implementation to a nested subclass to avoid issues when an object implements both nsIChannel and nsIRequest, r=smaug,necko-reviewers,kershaw.
Differential Revision: https://phabricator.services.mozilla.com/D124385
2021-09-07 08:01:18 +00:00
Florian Quèze 998adb18ea Bug 1728760 - require all nsITimerCallback native implementations to also implement nsINamed, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D124349
2021-09-07 08:01:18 +00:00
Kershaw Chang 95f5b8933d Bug 1727173 - Make h3/h2 excluded list synced between socket process and parent process, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D123376
2021-09-03 20:14:39 +00:00
Dragana Damjanovic 9c5412108c Bug 1718719 - Disable the TLS early-data if proxy is use r=necko-reviewers,keeler,kershaw
Currently we do not use the early-data when a proxy is used, but we do not disable it in the nss layer.

Differential Revision: https://phabricator.services.mozilla.com/D123492
2021-09-01 19:57:10 +00:00
Sandor Molnar 1a9baf6591 Backed out changeset 028b3aadad28 (bug 1718719) for causing bustages in build fuzzing. CLOSED TREE 2021-09-01 17:46:12 +03:00
Dragana Damjanovic 75908ae9b0 Bug 1718719 - Disable the TLS early-data if proxy is use r=necko-reviewers,keeler,kershaw
Currently we do not use the early-data when a proxy is used, but we do not disable it in the nss layer.

Differential Revision: https://phabricator.services.mozilla.com/D123492
2021-09-01 13:05:12 +00:00
Csoregi Natalia 839df28cb3 Backed out changeset 509bc61da667 (bug 1725766) for failures on test_bug1725766.js. CLOSED TREE 2021-08-31 14:16:05 +03:00
Kershaw Chang 0ae88a030e Bug 1725766 - Disallow view-source URI to open external apps, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D123825
2021-08-31 10:14:56 +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
Iulian Moraru 82d6cf3080 Backed out changeset 23c30486969a (bug 1382886) as requested by Dragana. 2021-08-25 12:22:27 +03:00
Kershaw Chang cbd511ebe8 Bug 1726418 - Make the speculative connection as private if it's from a private window, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D123533
2021-08-25 07:56:47 +00:00
Andi-Bogdan Postelnicu 9945b94835 Bug 1519636 - Reformat recent changes to the Google coding style. r=emilio
Updated with clang-format version 12.0.1 (taskcluster-dNZqCRqWRTqa6cZxPKxh7Q)

Differential Revision: https://phabricator.services.mozilla.com/D122814
2021-08-23 09:30:23 +00:00
Julien Wajsberg 33162b590a Bug 1697901 - [network markers] Move the START marker slightly later so that we don't add it for canceled requests r=necko-reviewers,dragana
Requests may be canceled before AsyncOpen is even called. In that case
we don't want to add START markers, and we don't want to add CANCEL
markers for these requests that didn't even start yet.

Depends on D123255

Differential Revision: https://phabricator.services.mozilla.com/D123256
2021-08-23 08:56:54 +00:00
Julien Wajsberg bf4f00022e Bug 1697901 - [network markers] Support channel cancelation in service workers too r=necko-reviewers,kershaw
Intercepted requests can also be canceled.

Depends on D122111

Differential Revision: https://phabricator.services.mozilla.com/D123254
2021-08-23 08:56:53 +00:00
Julien Wajsberg 4bc6caa649 Bug 1697901 - [network markers] Support channel cancelation r=valentin,gerald,necko-reviewers
This patch supports channel cancelations with network markers.

Because of all the possible ways to stop a channel and hence all
possible end markers, it also introduces a new boolean to reduce the
complexity. Indeed it happens that 2 "end functions" are called, but we
need to insert only 1 end marker to have a well-formed result in the
Profiler frontend.

Differential Revision: https://phabricator.services.mozilla.com/D122111
2021-08-23 08:56:52 +00:00
Eden Chuang 69e4ba3cbc Bug 1693074 - Adding telemetry for evaluating the duration of fetch event dispatching and response synthesizing. r=dom-worker-reviewers,asuth
This patch tries to record the fetch event dispatching time, the response's synthesizing time, and interception resetting time.

Fetch event dispatching time is the time duration between interception starts, which is the time point of InterceptedHttpChannel::AsyncOpenInternal(), and the fetch handler starts. It includes the InterceptedHttpChannel setup time, ServiceWorker launch time, FetchEventOp propagation through IPC, a FetchEvent creation, initialization, and dispatching/scheduling on worker scope.

Response synthesizing time is the time duration between the fetch handler finishes, which is the resolving/rejecting promise of respondWith(), to the finish of pumping the synthesized response to InterceptedHttpChannel, which is the time point of calling InterceptedHttpChannel::OnStopRequest(). It includes the response propagation through IPC, response header and body synthesis, and pumping synthesized response to the channel.

Interception resetting time is the time duration between the fetch handler finishes and redirecting InterceptedHttpChannel to a normal HTTP channel.

Since the fetch handler is executed on the process where the service worker spawned, the timestamps related to the fetch handler need to be get on that process. So this patch adds the FetchHandlerStart and FetchHandlerFinish on IPCFetchEventRespondWithResult related types to propagate the timestamps to the parent process.

Depends on D118398

Differential Revision: https://phabricator.services.mozilla.com/D118399
2021-08-22 11:02:18 +00:00
Eden Chuang 4d477a5d36 Bug 1693074 - Adding telemetry for evaluating whole fetch interception duration. r=dom-worker-reviewers,asuth
Class InterceptionTimeStamps is introduced to help to record fetch-related timing. It is a private class of InterceptedHttpChannel since should use it in InterceptedHttpChannel only.

We are probably not only interested in the resource type, navigation or subresource, but also the final status of fetching, Synthesized, Reset, Canceled, or Redirected. So the fetch's final status also be appended on the sub-key of telemetry.

Depends on D118397

Differential Revision: https://phabricator.services.mozilla.com/D118398
2021-08-22 11:02:18 +00:00
Eden Chuang 43495b894c Bug 1693074 - Remove child interception telemetries related codes. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D118396
2021-08-22 11:02:17 +00:00
Dragana Damjanovic 3dafd2ce8f Bug 1723218 - Change flow control limits in HTTP/3 r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D121427
2021-08-19 14:34:30 +00:00
Kershaw Chang ad767f9fe2 Bug 1721303 - Avoid exposing Alt-Used to service workers, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D122608
2021-08-17 14:48:04 +00:00
Dragana Damjanovic 1237fd4677 Bug 1382886 - Poll for READ during 0RTT r=necko-reviewers,valentin
Polling for write will in most cases always return immediately which causes necko to basically busy wait for the handshake to finish. To avoid thiis we will poll for READ and call OnSocketWritable to drive the haandshake.

Differential Revision: https://phabricator.services.mozilla.com/D122582
2021-08-17 08:19:15 +00:00
Valentin Gosu 78e48c51d2 Bug 669675 - Use Tokenizer in ParseRealm r=necko-reviewers,dragana
We also import the testcases from http://test.greenbytes.de/tech/tc/httpauth/
as unit tests.

This patch adds a network.auth.use_new_parse_realm pref in case this change
causes any regressions.

Depends on D112605

Differential Revision: https://phabricator.services.mozilla.com/D112594
2021-08-12 12:39:25 +00:00
Valentin Gosu 0cfda7bb4a Bug 1705659 - Static-analysis check auto fix for auth code r=necko-reviewers,dragana
Depends on D112604

Differential Revision: https://phabricator.services.mozilla.com/D112605
2021-08-12 12:39:25 +00:00
Valentin Gosu d2935ca6c0 Bug 1705659 - Make Host() and ProxyHost() return const nsCString& r=necko-reviewers,dragana
Depends on D112603

Differential Revision: https://phabricator.services.mozilla.com/D112604
2021-08-12 12:39:24 +00:00
Valentin Gosu f7f3868d80 Bug 1705659 - nsHttpNTLMAuth::GenerateCredentials should avoid raw strings r=necko-reviewers,dragana
Depends on D112599

Differential Revision: https://phabricator.services.mozilla.com/D112601
2021-08-12 12:39:23 +00:00
Valentin Gosu 71a0ff738d Bug 1705659 - Use a nsTArray<CString> instead of custom linked list r=necko-reviewers,dragana
Depends on D112598

Differential Revision: https://phabricator.services.mozilla.com/D112599
2021-08-12 12:39:23 +00:00
Valentin Gosu 6066fc3664 Bug 1705659 - Make auth code use nsACString instead of raw char pointers r=necko-reviewers,dragana
Depends on D112597

Differential Revision: https://phabricator.services.mozilla.com/D112598
2021-08-12 12:39:22 +00:00
Valentin Gosu b3d74be7b8 Bug 1705659 - Make GetAuthenticator work with nsACString r=necko-reviewers,dragana
Depends on D112602

Differential Revision: https://phabricator.services.mozilla.com/D112597
2021-08-12 12:39:22 +00:00
Valentin Gosu b874482b5b Bug 1705659 - Make nsHttpDigestAuth::ParseChallenge work with a nsACString without extra copy r=necko-reviewers,dragana
Depends on D112595

Differential Revision: https://phabricator.services.mozilla.com/D112602
2021-08-12 12:39:21 +00:00
Valentin Gosu e37d5caec6 Bug 1705659 - Use Tokenizer in nsHttpChannelAuthProvider::GetCredentials r=necko-reviewers,dragana
- Also uses nsACString in nsHttpDigestAuth::ParseChallenge

Depends on D112912

Differential Revision: https://phabricator.services.mozilla.com/D112595
2021-08-12 12:39:20 +00:00
Valentin Gosu 4079feca22 Bug 1705659 - Use nsACString& in ParseRealm and GetCredentialsForChallenge r=necko-reviewers,dragana
- The use of PromiseFlatCString is temporary. It is removed in the next patches in the stack.

Depends on D112911

Differential Revision: https://phabricator.services.mozilla.com/D112912
2021-08-12 12:39:20 +00:00
Valentin Gosu 00eaa14812 Bug 1705659 - Make DigestLength a function r=necko-reviewers,dragana
Depends on D112596

Differential Revision: https://phabricator.services.mozilla.com/D112911
2021-08-12 12:39:20 +00:00
Glenn Strauss b24f5ca014 Bug 472823 - support SHA-256 HTTP Digest auth r=necko-reviewers,dragana
fixes:
Bug 472823 SHA 256 Digest Authentication
Original patch by Teun van Eijsden
Tests added by Vit Hampl <mozilla@bugear.com>
Original patch updated and tests fixed by gstrauss

fixes:
Bug 281851 CVE-2005-2395 Wrong scheme used when server offers both Basic and Digest auth

fixes:
Bug 669675 failure to skip unknown HTTP authentication schemes in WWW-Authenticate

Differential Revision: https://phabricator.services.mozilla.com/D106241
2021-08-12 12:39:19 +00:00
Manuel Bucher 6cdb3ae33a Bug 1663836 - Treat invalid HTTP response header names over HTTP2 as malformed r=necko-reviewers,dragana
Relevant section in the spec: https://datatracker.ietf.org/doc/html/rfc7540#section-10.3

Differential Revision: https://phabricator.services.mozilla.com/D120969
2021-08-12 09:34:20 +00:00
Valentin Gosu 57e3894d7d Bug 1722925 - Avoid unnecessary string copies by nsCString constructor r=necko-reviewers,kershaw CLOSED TREE
Since the Find method does not exist on nsACString, I had to use std::search
to find the "data:" substring in the spec.

Differential Revision: https://phabricator.services.mozilla.com/D122082
2021-08-12 07:40:58 +00:00
Valentin Gosu d97def2f41 Bug 1722925 - Remove NS_MutatorMethod in favor of templated nsIURIMutator::Apply r=necko-reviewers,kershaw
This basically reverts the changes in 5caa81103c00 (bug 1435671). In that bug
we switched from having a templated method to using a templated function
that returned a lambda because the templated method caused a binary size
regression on windows (MSVC). Since Firefox 67 we no longer support MSVC.
Using a lambda also required capturing the arguments by value, so it was
slightly inefficient.

This patch removes NS_MutatorMethod and makes the Apply method a template.
This improves perfomance as we can just pass the arguments to the called
function, without worrying about needing to copy them.
Since MSVC is not supported anymore, and clang and gcc didn't report a
binary size regression, this is a much better solution.

Differential Revision: https://phabricator.services.mozilla.com/D122081
2021-08-12 07:40:58 +00:00
Iulian Moraru 32090542c0 Backed out 2 changesets (bug 1722925) for causing reftest failures in color_quads. CLOSED TREE
Backed out changeset 95a6eacbef27 (bug 1722925)
Backed out changeset 2e2a98aeca5c (bug 1722925)
2021-08-12 12:22:34 +03:00
Valentin Gosu 32b251ca35 Bug 1722925 - Avoid unnecessary string copies by nsCString constructor r=necko-reviewers,kershaw
Since the Find method does not exist on nsACString, I had to use std::search
to find the "data:" substring in the spec.

Differential Revision: https://phabricator.services.mozilla.com/D122082
2021-08-12 07:40:58 +00:00
Valentin Gosu c6b1fa7e03 Bug 1722925 - Remove NS_MutatorMethod in favor of templated nsIURIMutator::Apply r=necko-reviewers,kershaw
This basically reverts the changes in 5caa81103c00 (bug 1435671). In that bug
we switched from having a templated method to using a templated function
that returned a lambda because the templated method caused a binary size
regression on windows (MSVC). Since Firefox 67 we no longer support MSVC.
Using a lambda also required capturing the arguments by value, so it was
slightly inefficient.

This patch removes NS_MutatorMethod and makes the Apply method a template.
This improves perfomance as we can just pass the arguments to the called
function, without worrying about needing to copy them.
Since MSVC is not supported anymore, and clang and gcc didn't report a
binary size regression, this is a much better solution.

Differential Revision: https://phabricator.services.mozilla.com/D122081
2021-08-12 07:40:58 +00:00
Manuel Bucher 158540519c Bug 1713650 - Fix UDP sockets not showing up in about:networking#sockets r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D122200
2021-08-11 16:07:54 +00:00
Paul Zuehlcke 099c7a952f Bug 1658578 - Remove nsContentUtils::IsThirdPartyWindowOrChannel. r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D122272
2021-08-11 10:37:18 +00:00
Shane Caraveo 728ee84a7d Bug 1722942 use beConservative for proxy failover to direct r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D121234
2021-08-10 16:29:06 +00:00
Magnus Melin 8bb66bef55 Bug 1724635 - fix Thunderbird build bustage from bug 1719070 - mozilla/browser/NimbusFeatures.h can't be found. r=cpeterson,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D122055
2021-08-09 20:21:13 +00:00
Kershaw Chang 8422e6d448 Bug 1720614 - Remove HTTPS_RR_WAITING_TIME, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D122123
2021-08-09 20:20:33 +00:00
Kershaw Chang 32f8d51ddb Bug 1721781 - Make HTTP3 work when we use DIRECT proxy connection, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D120805
2021-08-09 12:25:54 +00:00
Alexandru Michis 7cbf0f089a Backed out changeset 2166ec680875 (bug 1724635) for causing bc failures in browser_navigator.js
CLOSED TREE
2021-08-09 15:57:07 +03:00
Magnus Melin 585aa81edd Bug 1724635 - fix Thunderbird build bustage from bug 1719070 - mozilla/browser/NimbusFeatures.h can't be found. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D122055
2021-08-09 08:18:08 +00:00
Chris Peterson 162a8620f1 Bug 1719070 - UA: Add support for a Nimbus experiment to override Firefox's User-Agent string. r=andreio,necko-reviewers,dragana
The ANDROID #ifdefs are necessary because Nimbus does not yet support Android in Gecko. The planned UA experiment won't include Android, so that's not a problem.

Differential Revision: https://phabricator.services.mozilla.com/D121112
2021-08-08 01:07:51 +00:00
Dragana Damjanovic df42c51758 Bug 1724240 - Setup fallback timer if a speculative connection is created for a fallback r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D121903
2021-08-06 12:40:12 +00:00
Valentin Gosu cf6459027c Bug 1724166 - Add pref for large keepalive factor r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D121839
2021-08-06 07:09:36 +00:00
Nicklas Boman 558464ac5b Bug 1308106 - Replace PL_strstr with a safer Gecko string class or function r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D116931
2021-08-05 09:31:30 +00:00
Nicklas Boman 5a72708d0a Bug 1308104 - Replace PL_strchr with a safer Gecko string class or function netwerk/ r=necko-reviewers,dragana,valentin
Differential Revision: https://phabricator.services.mozilla.com/D89326
2021-08-05 09:25:15 +00:00
Gijs Kruitbosch 17d7c7ad5a Bug 1723807 - make getURLSpecFromFile [noscript] and clarify its idl comments to discourage use more forcefully, r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D121781
2021-08-05 08:52:28 +00:00
Valentin Gosu b870386af7 Bug 1713941 - Properly handle duplicated headers in a 304 revalidation r=necko-reviewers,dragana
Going through each of the headers in the 304 response and setting it on the
cached response head will cause us to only keep the last instance when
duplicate header names are present.

We should instead use the GetHeader method which properly handles merging the
response.

Differential Revision: https://phabricator.services.mozilla.com/D121527
2021-08-04 12:07:37 +00:00
Gijs Kruitbosch 1e4a561ac0 Bug 1721627 - crash on requests to non-existing chrome: and resource: files on infra, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D120557
2021-08-03 16:46:34 +00:00
Iulian Moraru 608ae27f89 Backed out 2 changesets (bug 1719070) for causing bc failures on browser_navigator.js. CLOSED TREE
Backed out changeset ab01c8a94b77 (bug 1719070)
Backed out changeset abf70d233377 (bug 1719070)
2021-08-03 13:57:56 +03:00
Chris Peterson 602ac635a3 Bug 1719070 - UA: Add support for a Nimbus experiment to override Firefox's User-Agent string. r=andreio,necko-reviewers,dragana
The ANDROID #ifdefs are necessary because Nimbus does not yet support Android in Gecko. The planned UA experiment won't include Android, so that's not a problem.

Differential Revision: https://phabricator.services.mozilla.com/D121112
2021-08-03 06:58:58 +00:00
Dorel Luca 24feffa455 Backed out 2 changesets (bug 1721627) for Talos failures. CLOSED TREE
Backed out changeset bc5e08d27347 (bug 1721627)
Backed out changeset a670f5679e0b (bug 1721627)
2021-08-03 03:57:21 +03:00
Tim Huang 4cca7fc573 Bug 1720869 - Part 1: Add a telemetry probe for referrer policy. r=ckerschb,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D121344
2021-08-02 19:24:54 +00:00
Gijs Kruitbosch 50385d763f Bug 1721627 - crash on requests to non-existing chrome: and resource: files on infra, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D120557
2021-08-02 16:55:35 +00:00
Gijs Kruitbosch 99251553e0 Bug 1717314 - do not force a dialog for https-redirect-to-external-protocol links from external sources, r=nika,pbz,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D120879
2021-08-02 12:14:23 +00:00
Sandor Molnar 9a31129771 Backed out changeset bb055da29523 (bug 1717314) for causing bc failures in browser_protocol_ask_dialog_external. CLOSED TREE 2021-07-31 01:14:15 +03:00
Gijs Kruitbosch e83ab3f744 Bug 1717314 - do not force a dialog for https-redirect-to-external-protocol links from external sources, r=nika,pbz,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D120879
2021-07-30 21:24:33 +00:00
Paul Zuehlcke d64a25c382 Bug 1721858 - Enable WebSocket connection partitioning if first party isolation is enabled. r=nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D120742
2021-07-29 08:10:38 +00:00
Julien Wajsberg d23918ae85 Bug 1717047 - [profiler, netwerk] Support all redirections in the parent process r=canaltinova,necko-reviewers,dragana
This moves the adding of the end marker for redirects in nsHttpChannel
to SetupReplacementChannel, so that all redirects are properly caught.
Without that, some requests will show as unfinished in the profiler
frontend.

Some of the redirects are internal and we may be able to flag and ignore
them in the frontend, but that's work for the future.

Because all redirections get a "REDIRECT" end marker, including the
internal redirection to the service worker's intercepted channel, we now
need an additional "START" marker there as well.

All existing profiler tests related to service workers needed to be
updated because there's an extra redirect marker in all these requests,
as well as several pairs of markers that all have the same id.

This also adds a new profiler test for handling the http->https case
that we wouldn't catch before this patch.

Differential Revision: https://phabricator.services.mozilla.com/D118836
2021-07-27 15:12:53 +00:00
Kershaw Chang 298fea6ff9 Bug 1719135 - Make gTRRService atomic and also avoid doing trrLookup when trr service is not ready, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D120621
2021-07-26 09:37:37 +00:00
Kershaw Chang 960dae5209 Bug 1683062 - Make sure HttpChannelChild::mSuspendCount be updated correctly even if the remote channel is not existed, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D119947
2021-07-26 09:32:30 +00:00
Kashav Madan 5781dca888 Bug 1720688 - Support extended attribute syntax in protocol declarations, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D119975
2021-07-22 02:24:43 +00:00
Shane Caraveo 28025bf825 Bug 1720221 use failover proxy for NET_RESET errors r=kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D120523
2021-07-21 20:55:19 +00:00
Mike Kaply ace9eb01d5 Bug 1720390 - Match any .live.com domain for Windows single sign on. r=nhnt11,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D120350
2021-07-21 15:32:33 +00:00
Manuel Bucher 3918a58a02 Bug 1721459 - Remove nsIDeprecationWarner r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D120474
2021-07-21 15:19:15 +00:00
Paul Zuehlcke f97e49d85c Bug 1713748 - Partition WebSocket nsWSAdmissionManager queue. r=timhuang,nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D119534
2021-07-21 12:44:40 +00:00
Shane Caraveo 0d1451a345 Bug 1720221 proxy failover to direct for system requests r=kershaw,necko-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D119695
2021-07-19 17:24:29 +00:00
Florian Quèze 4f4eb91a27 Bug 1720851 - fix includes in NetworkMarker.cpp, r=gerald,necko-reviewers,kershaw.
Differential Revision: https://phabricator.services.mozilla.com/D120062
2021-07-16 15:26:23 +00:00
Alexandru Michis 6b34ce568e Backed out changeset 2307d0bebc26 (bug 1720221) for causing python failures in configure/lint.py
CLOSED TREE
2021-07-16 17:59:23 +03:00
Shane Caraveo f8ad91a90e Bug 1720221 proxy failover to direct for system requests r=kershaw,necko-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D119695
2021-07-16 14:33:29 +00:00
Chris Peterson df25aeaae0 Bug 1720633 - Remove old "network.http.spdy.bug1563538" pref checks. r=necko-reviewers,kershaw
h2 proxy bug 1563538 added a temporary "network.http.spdy.bug1563538" pref in case its tunnel stream fix needed to be disabled quickly. That was almost two years ago (Firefox 68) and we haven't needed to disable this pref yet, so we can probably remove this pref and the old code paths now.

Differential Revision: https://phabricator.services.mozilla.com/D119942
2021-07-16 05:33:15 +00:00
Florian Quèze 3c58a9068f Bug 1720289 - fix the OpaqueResponseUtils includes, r=kershaw,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D120013
2021-07-15 22:04:24 +00:00
Florian Quèze 4f6e64dec4 Bug 1720289 - remove MOZ_GECKO_PROFILER ifdefs around network markers, r=necko-reviewers,gerald,kershaw.
Differential Revision: https://phabricator.services.mozilla.com/D119740
2021-07-15 22:04:21 +00:00
Nika Layzell e620d25a35 Bug 1715167 - Part 6: Use the unsandboxed result principal as precursor for sandbox principals, r=ckerschb,ngogge
This change stores a generated nsID directly on the LoadInfo, rather
than the full SandboxedLoadingPrincipal. This allows for the sandboxed
principal to be constructed from GetChannelResultPrincipal using the
unsandboxed result principal as a precursor, rather than the loading
principal.

The nsID is reset by HttpChannelBase whenever a non-internal redirect
occurs to reduce the chance of multiple null result principals during a
redirect with the same nsID, but different precursors.

Depends on D119692

Differential Revision: https://phabricator.services.mozilla.com/D119693
2021-07-15 21:09:15 +00:00
Nika Layzell dd4aed4589 Bug 1715167 - Part 4: Set precursor for redirect principal to inherit, r=ckerschb,necko-reviewers,ngogge,kershaw
When a navigation redirects, the principalToInherit is reset back to a null
principal for security reasons. This helps prevent a redirect from loading
attacker controlled content with the wrong principal. This patch gives this new
principalToInherit a precursor origin based on the resource which is being
redirected.

One time when this may come up is when an extension redirects a http: request
to a `data:` URI through the request API. Before this change, the load would
complete with a precursorless null principal, but after this change the
precursor refers to the redirected-from URL.

Depends on D119690

Differential Revision: https://phabricator.services.mozilla.com/D119691
2021-07-15 21:09:14 +00:00
Kershaw Chang 6d7d02f5f7 Bug 1720648 - Make necko work with neqo 0.4.28, r=nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D119991
2021-07-15 19:19:55 +00:00
Tom Ritter 1f7af19d9b Bug 1666222: Remove the DelayQueue thing as part of removing Fuzzyfox 3/5 r=necko-reviewers,kershaw
This leaves the AsyncOpenFinal function because it is
used for Socket Process launch.

It adds some includes to fix Unified Builds.

Differential Revision: https://phabricator.services.mozilla.com/D119638
2021-07-14 18:18:16 +00:00
Tom Ritter 701266cef6 Bug 1666222: Remove added Fuzzyfox Files Patch 1/5 r=smaug,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D119636
2021-07-14 18:18:15 +00:00
Nihanth Subramanya 9b75bb157e Bug 1720079 - Don't advance Http3Session's ProcessEvents loop without getting the next event. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D119719
2021-07-13 20:08:48 +00:00
Kershaw Chang bba712b93d Bug 1654507 - Part2: Plumbing for echRetry, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D119403
2021-07-13 09:24:26 +00:00
Kershaw Chang 3b354571f5 Bug 1654507 - Part1: Plumbing for setting ech config, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D119402
2021-07-13 09:24:25 +00:00