Commit Graph

229 Commits

Author SHA1 Message Date
Boris Zbarsky
9691e7ba88 Bug 1507540 part 3. Use more notxpcom attributes in netwerk/. r=valentin 2018-11-19 20:17:53 -05:00
Kershaw Chang
1d281934cf Bug 1452535 - Move some logs to level 1 r=mayhemer
WPT parses HTTP log and create a HAR file. To reduce the overhead of logging, this patch moves some logs that are used by WPT parser to level 1.

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

--HG--
extra : moz-landing-system : lando
2018-11-16 16:35:52 +00:00
Nicholas Hurley
a4d48c1eb9 Bug 1505867 - Add pref for hpack table dumps. r=bagder
Now that h2 is pretty well stable, and we're fairly confident in our hpack table implementation, it's worth hiding this logging without some extra hoops, as it's just a lot of noise in logs.

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

--HG--
extra : moz-landing-system : lando
2018-11-09 07:23:17 +00:00
Nicholas Hurley
27190f4a59 Bug 1434137 - Implement websockets over http/2 - RFC 8441 r=michal,dragana
https://tools.ietf.org/html/rfc8441

This uses our existing http/2 CONNECT infrastructure (modified) to
enable the new extended CONNECT form defined by 8441, and pretend for
the websocket's sake that an http/2 stream is actually a socket. From
the websocket's point of view, this is relatively non-invasive - a few
things have changed (http response code, absence of some headers) versus
http/1.1 websockets, but for the most part, the websocket code doesn't
care.

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

--HG--
extra : moz-landing-system : lando
2018-11-06 19:29:57 +00:00
Nicholas Hurley
7ce9475d3c Bug 1496611 - Send NO_ERROR when closing h2 session at shutdown. r=dragana
Previously, we were sending INTERNAL_ERROR, but that's not really true. Firefox hasn't hit an error, we're just shutting down. It makes more sense to tell the peer we're not messed up, just going away nicely.

Depends on D8437

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

--HG--
extra : moz-landing-system : lando
2018-10-25 20:47:19 +00:00
Nicholas Hurley
a2d8c9ef38 Bug 1355858 - Blacklist hosts from spdy who are very poorly behaved. r=dragana
In certain cases (such as the case from bug 1050329, where a server claims to speak h2, but really doesn't), we will end up trying every connection to that server as h2 before falling back to http/1.1. Once we know a server is very badly behaved, it doesn't make sense to keep trying h2 (at least for the current browsing session). This adds an in-memory blacklist of origins & conninfos to not try h2 on, so we don't waste round trips trying h2, failing, and then dialing back with http/1.1 except for the first connection to an origin.

Depends on D8436

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

--HG--
extra : moz-landing-system : lando
2018-10-25 20:52:59 +00:00
Nicholas Hurley
2319ff8d81 Bug 1050329 - part 2 - Add error page for h2 goaway. r=dragana,bzbarsky
This is kind of like the previous patch (where we had a not-very-friendly user experience shutting down misbehaving h2 sessions), but in this case the server has proven to us that it can speak a minimum of h2, so we don't want to just fallback. Instead, when we send a GOAWAY frame because we have detected some error on the part of the server, if it's a top-level page load, we'll show an error page explaining that the server spoke bad http/2, and the site admin(s) need to be contacted. We already did this for INADEQUATE_SECURITY (which is its own special case still), but that didn't cover all the cases.

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

--HG--
extra : moz-landing-system : lando
2018-10-25 20:46:46 +00:00
Nicholas Hurley
669d078042 Bug 1050329 - part 1 - Re-start transactions on totally busted h2 sessions. r=francois,dragana
Previously, we would just let these fail. But, when a peer claims to speak h2 via ALPN, and then plainly doesn't speak h2 (by not doing the opening handshake properly), we should re-try any transactions dispatched to that session using http/1.1 only. No use in giving the user a horrible experience. We will also collect telemetry on how often we have sessions where this happens, so we can see how big of a problem this is (and thus if we need to do any kind of outreach).

Depends on D8432

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

--HG--
extra : moz-landing-system : lando
2018-10-25 20:46:24 +00:00
Nicholas Hurley
1bbb1ab938 Bug 1050329 - (prereq) Make RETURN_SESSION_ERROR a method. r=dragana
Previously this was a macro, but in later patches in this series, I want to make the macro a bit smarter. There's no particular need to have it as a macro (and macros that return from functions are often considered no-nos), so this makes it a method on the session, instead.

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

--HG--
extra : moz-landing-system : lando
2018-10-25 20:46:01 +00:00
Nicholas Hurley
dad8d53ed9 Bug 1496224 - Followup to 1409570 - fix clang-tidy complaint r=bagder
Differential Revision: https://phabricator.services.mozilla.com/D7652

--HG--
extra : moz-landing-system : lando
2018-10-04 08:43:54 +00:00
Nicholas Hurley
44ca650a2b Bug 1493204 - Add pushed streams to the priority tree. r=dragana
Previously, we had not put pushed streams in the priority tree, we just
let them be top-level items in the tree. With this change, we will put
them into the tree initially based on the priority of the associated
stream. The only exception is if the associated stream is either a
Leader or Urgent Start (in which case, we will turn the pushed streams
into followers).

Once the pushed stream is matched with a request generated by gecko,
that pushed stream will be re-prioritized based on the priority gecko
has for the request, just like a regular pulled stream.

This also allows us to re-prioritize pushed streams into the background
on tab switch (we assume that, before they are matched, they belong to
the same window as the associated stream).

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

--HG--
extra : moz-landing-system : lando
2018-10-03 09:40:23 +00:00
Nicholas Hurley
a3fcc3c708 Bug 1409570 - Ensure that transactions matched with http/2 pushed streams are properly finished. r=bagder
There was an earlier fix to this, that fixed part of the issue, but that
fix was racy. In the case where the transaction was matched with the
pushed stream before the pushed stream received its END_STREAM, and the
response headers did not include a content-length, the transaction would
never notice that the data was done being sent. When that transaction
was necessary for the load event to fire, the page would get stuck in
the loading state until the user explicitly cancelled.

This new patch ensures that the transaction will notice the EOS by
making sure the pushed stream gets inserted into the list of push
streams with data in the case described above. (The previous patch,
which is still in the tree, is still necessary, but not sufficient, to
fix the issue.)

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

--HG--
extra : moz-landing-system : lando
2018-10-01 21:52:57 +00:00
Nicholas Hurley
d17d1224fd Bug 1492484 - Do not reprioritize pushed streams on tab switch. r=kershaw
Right now, pushed streams don't get put in the priority hierarchy
anyway, and with the code as it was, we were sending an illegal PRIORITY
frame for stream 0. This prevents that from happening. We should
probably think about putting pushed streams in the priority hierarchy at
some point.

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

--HG--
extra : moz-landing-system : lando
2018-09-24 15:16:22 +00:00
Daniel Stenberg
f55cab35f3 bug 1486137 - fix the stream ID check when counting TRR streams r=nwgh
MozReview-Commit-ID: DzOu1dRlWtg

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

--HG--
extra : moz-landing-system : lando
2018-09-13 14:48:46 +00:00
Nicholas Hurley
dd1853e164 Bug 1483294 - Always advertise h2 if TLS 1.3 is being offered. r=dragana
Previously (under TLS 1.2), we would avoid advertising h2 support if the
spec-mandatory suite was disabled. That suite is only required for TLS
1.2, though. We would like to offer h2 in more cases, so only check for
the mandatory suite if someone has turned off TLS 1.3.

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

--HG--
extra : moz-landing-system : lando
2018-08-27 18:56:44 +00:00
Daniel Stenberg
9eb175b4cb bug 1470853 - Add Telemetry::DNS_TRR_REQUEST_PER_CONN r=nwgh
Count number of requests/streams per connection done when the connection
was used for TRR.

MozReview-Commit-ID: 50NVSCcd6jy

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

--HG--
extra : moz-landing-system : lando
2018-08-23 18:13:34 +00:00
Brindusan Cristian
edd591c4d4 Backed out changeset 89117b6b5799 (bug 1470853) for xpcshell failures on dom/push/test/xpcshell/test_notification_http2.js. CLOSED TREE 2018-08-20 19:20:20 +03:00
Daniel Stenberg
70b6a3456b bug 1470853 - Add Telemetry::DNS_TRR_REQUEST_PER_CONN r=nwgh
Count number of requests/streams per connection done when the connection
was used for TRR.

MozReview-Commit-ID: H7X06h8gVZY

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

--HG--
extra : moz-landing-system : lando
2018-08-20 15:11:14 +00:00
Dipen Patel
7641beb1f8 Bug 1475647 - Remove nsISSLStatusProvider interface. r=baku,Gijs,jchen,jryans,keeler,mcmanus
- Access nsISSLStatus directly as a member of nsITransportSecurityInfo
and nsISecureBrowserUI.  This is part of a larger effort to consolidate
nsISSLStatus and nsITransportSecurityInfo.
- The TabParent implementation of GetSecInfo will always return null.
- Removed unnecessary QueryInterface calls
- Style adherence updates

MozReview-Commit-ID: Dzy6t2zYljL

--HG--
extra : rebase_source : 9c400bed3c9d29a186fc987c9bd0ffceb37bfd94
2018-07-13 11:48:55 -07:00
Andreea Pavel
d0f6470c17 Backed out changeset c235d6f86c22 (bug 1475647) for breaking firefox ui at testing/firefox-ui/tests/puppeteer/test_tabbar.py on a CLOSED TREE 2018-07-25 19:34:58 +03:00
Dipen Patel
8670057dd5 Bug 1475647 - Remove nsISSLStatusProvider interface. r=baku,Gijs,jchen,jryans,keeler,mcmanus
- Access nsISSLStatus directly as a member of nsITransportSecurityInfo
and nsISecureBrowserUI.  This is part of a larger effort to consolidate
nsISSLStatus and nsITransportSecurityInfo.
- The TabParent implementation of GetSecInfo will always return null.
- Removed unnecessary QueryInterface calls
- Style adherence updates

MozReview-Commit-ID: Dzy6t2zYljL

--HG--
extra : rebase_source : fbfbcf7608efbfb35c9be4018ff0f4e70b2768d2
2018-07-13 11:48:55 -07:00
shindli
70ab23ecd2 Backed out changeset d126a6593e8f (bug 1475647) for mozmake.exe bustage on a CLOSED TREE 2018-07-24 02:55:53 +03:00
Dipen Patel
b0259a189f Bug 1475647 - Remove nsISSLStatusProvider interface. r=baku,Gijs,jchen,jryans,keeler,mcmanus
- Access nsISSLStatus directly as a member of nsITransportSecurityInfo
and nsISecureBrowserUI.  This is part of a larger effort to consolidate
nsISSLStatus and nsITransportSecurityInfo.
- The TabParent implementation of GetSecInfo will always return null.
- Removed unnecessary QueryInterface calls
- Style adherence updates

MozReview-Commit-ID: Dzy6t2zYljL

--HG--
extra : rebase_source : b15f75e39d04c8485b4eb63416fd1f1e4175fafe
2018-07-13 11:48:55 -07:00
Andi-Bogdan Postelnicu
90ac230485 Bug 1453795 - Necko - Initialize member fields in classes/ structures. r=michal 2018-06-14 11:19:07 +03:00
Nicholas Hurley
2423735102 Bug 1460310 - Separate HTTP and SPDY identifiers into separate namespaces. r=dragana
MozReview-Commit-ID: E55YpGK7PXI

--HG--
extra : rebase_source : 3146c7de66653262694235043a44be4ccf5ffc33
2018-06-01 11:32:05 -07:00
Andi-Bogdan Postelnicu
3f2298c2f6 Bug 1457411 - Update netwerk module to make use of newer methods introduced with c++11 and c++14. r=valentin
MozReview-Commit-ID: 666LNaHyiuQ

--HG--
extra : rebase_source : f3a24e0342d8dcdf9020dd473bc6b1045cbc533b
2018-04-30 19:46:04 +03:00
Sebastian Hengst
0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon
a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Nicholas Hurley
be1b7537f2 Bug 1429973 part 1 - plumb through trailers in h2 to support server-timing. r=bagder
MozReview-Commit-ID: JV1Ikb9cYCV

--HG--
extra : rebase_source : fa67fef606fc02355579dae42f8e66c4754d60a0
2018-02-01 15:14:23 -08:00
Daniel Stenberg
15940df95a bug 1437513 - do not require push cache for ::OnPush enabled transactions r=mcmanus
MozReview-Commit-ID: CLFh8bQW5WT

--HG--
extra : rebase_source : d232313f040371a9fe716e248d48be00cb992c3b
2018-02-10 17:00:45 +01:00
Nicholas Hurley
036c8b605d Bug 1416529 r=mcmanus
MozReview-Commit-ID: CD1l5vLB4yy
2018-02-09 09:22:18 -08:00
Valentin Gosu
b53812bfed Bug 1432187 - Change code to use nsIStandardURLMutator.{init,setDefaultPort} r=mayhemer
MozReview-Commit-ID: K2Uy9ET3Ay6

--HG--
extra : rebase_source : fb5e19bc7b71a6f0264471bf8f07febf1bc55900
2018-01-24 20:33:02 +01:00
Nicholas Hurley
670ad53036 Bug 1367861 - enable throttling for http/2. r=mayhemer
This also fixes the bug that prevented throttled http/2 streams from
ever re-starting by calling TransactionHasDataToRecv.

MozReview-Commit-ID: 5dFotZGhQk9

--HG--
extra : rebase_source : 2ba35bef4e17d90fc2abe52958bb6459b052b7e7
2018-01-10 13:35:02 -08:00
Dragana Damjanovic
66a1074054 Bug 1426366 - Detect http transaction stalls with TFO. r=hurley 2017-12-21 18:32:28 +01:00
Dragana Damjanovic
220fd9a72a Bug 1424915 - Close a httpTransaction from a http2session with the right error code if the error code is NS_BINDING_RETARGETED. Otherwise the transaction will be restarted twice. r=mcmanus 2017-12-14 10:35:54 +01:00
Nicholas Hurley
52ce8728f8 Backout e15196e25f9e for causing bug 1415387 2017-11-08 10:30:58 -08:00
Margareta Eliza Balazs
fe45ae3748 Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE 2017-11-08 00:08:26 +02:00
Nicholas Hurley
29bf3169ae Bug 1409570 - Ensure a pushed stream knows we've reached EOS. r=mcmanus
Previously, if a pushed stream was ended with a padding-only DATA frame
with the FIN bit set, and that stream didn't have a Content-Length,
there would be no way of knowing that the stream was finished. Now we
force-mark the push as complete if we hit a padding-only DATA frame with
the FIN bit set.

MozReview-Commit-ID: 7tk8x2FNgSj

--HG--
extra : rebase_source : b95f635b4bb0b4743cf81e888a455365ef561c22
2017-10-18 12:34:42 -07:00
Nicholas Hurley
b45caf2d01 Bug 1402014 - Don't (try to) write to the network when we're already closed. r=mcmanus
MozReview-Commit-ID: CkGuzlzDToj
2017-11-07 07:57:37 -08:00
Patrick McManus
f99705311c Bug 1409858 - H2 CONNECT Tunnel Marked Plaintext Too Late r=nwgh
MozReview-Commit-ID: IjuYDuvufRd

--HG--
extra : rebase_source : ab7773dc015c31d6ba1eb8c933efc79c38b29d06
2017-10-20 13:39:49 -04:00
Dragana Damjanovic
0a372ab31a Bug 1409667 - If an error occur it can happen the Http2Session does not have a connection. r=mcmanus 2017-10-18 16:27:32 +02:00
Dragana Damjanovic
ea3c619848 Bug 1384679 - Fix timing for TFO. r=mcmanus r=honza 2017-10-17 15:28:33 +02:00
Dragana Damjanovic
6944131868 Bug 1397686 - The streams that cannot do 0RTT data need to be put in list and added to mReadyForWrite when 0RTT is done. r=hurley 2017-09-22 09:09:57 +02:00
Nicholas Hurley
7b5b9fb2da Bug 1397621 - Ensure we use the proper default port for origin matching with h2 pushes. r=mcmanus
MozReview-Commit-ID: AunviQkOjJO

--HG--
extra : rebase_source : 8355da8162e3d056527fa62fda5d2c1b71403419
2017-09-18 16:09:57 -07:00
Kershaw Chang
567b0d202a Bug 1377208 - Move background h2 stream into background group. r=hurley 2017-08-30 02:19:00 -04:00
Kershaw Chang
5bb493a802 Bug 1393736 - Include urgent start group for counting prioritySize. r=hurley 2017-08-27 23:11:00 -04:00
Nicholas Nethercote
025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Nicholas Hurley
5fd7068084 Bug 1381016 - Ensure we process FIN flags on all-padding final frames. r=swu
MozReview-Commit-ID: JuSGsYsmv4n

--HG--
extra : rebase_source : a3c016560cb8209c2e6a55cd05fc6d14d2057402
2017-08-01 15:24:44 -07:00
Nicholas Hurley
17f1c3bcb9 Bug 1367551 - Cancel pushes when we already have the item in cache. r=mayhemer,mcmanus
MozReview-Commit-ID: 24N0Jm85wcC

--HG--
extra : rebase_source : e3babc6e569ce723c1f35bd587bb5f0b59f79cfd
2017-06-28 10:34:55 -07:00
Patrick McManus
850582d8f3 Bug 772589 - Implement the secureConnectionStart property for the PerformanceTiming interface r=bkelly,dragana,francois,Honza
Implements PerformanceTiming, nsITimedChannel, and devtools 'tls setup'

Also captures telemetry on this as we do for all other attributes of timedChannel

Also propogates some null transaction timings onto first real
transaction of a connection

MozReview-Commit-ID: 47TQJYVHnKC

--HG--
extra : rebase_source : a7723962986de0c2ab00d479a22c3f5fd185c8b2
2017-07-10 15:01:35 -04:00