Commit Graph

84 Commits

Author SHA1 Message Date
Paul Vitale
2966b99504 Bug 1203503 - part 1. change necko to allow CONNECT-only requests r+mayhemer
Necko does not allow for a CONNECT only request to happen.  This adds a flag
to signal an http channel should only CONNECT if proxied.  This flag can only be
set if an HTTPUpgrade handler has been assigned.  As proposed by rfc7639, an
alpn header will be included in the CONNECT request.  Its value is determined by
the upgrade protocol passed to HTTPUpgrade.

The flag is added as part of nsIHttpChannelInternal because it is dependent on
HTTPUpgrade.  It exists as a capability flag since the channel's transaction
needs to know to complete after a successful CONNECT.  Also the transaction's
connection needs to know to stop writing transaction data after it CONNECTs or
if there's no proxy, and to not tell the transaction to reset.

If an nsHttpChannel has this flag set then the upgrade handler will receive the
socket after the CONNECT succeeds without doing tls if https.

In order to support xpcshell-test for this change, nsHttpConnectionMgr does a
little check to see if HTTPUpgrade callback is in JavaScript.  If it is then
the callback is invoked on the main thread.

--HG--
extra : rebase_source : 96cdfe0e1ffe2f7dad7d12c83c22be92d118195a
extra : intermediate-source : 70710e9bf3d98488485c3265ebdea09683a42a80
extra : source : 25b4b531c10c4b2dae416fd7d744a63a32fed7e5
2018-07-19 11:41:57 -05:00
Ehsan Akhgari
3788f265e3 Bug 1485182 - Part 1: Run http-on-modify-request observers when tracking protection cancels an HTTP channel; r=mayhemer 2018-08-22 14:00:01 -04:00
Liang-Heng Chen
a1785d29f1 Bug 1474280 - Part 1: Cancel timed-out trackers; r=mayhemer 2018-07-23 05:28:00 +03:00
Ben Kelly
f4e69fbdb7 Bug 1468209 Remove nsIHttpChannelInternal.responseSynthesized and use nsILoadInfo.serviceWorkerTaintingSynthesized instead. r=valentin 2018-06-12 07:02:01 -07:00
Patrick McManus
f18aa94399 Bug 1462357 - remove the channel and socket interface id r=bagder,baku
the id was a b2g feature only settable via chrome privd xhr and is no
longer active in the code base

MozReview-Commit-ID: 84GPNvhvjNb

--HG--
extra : rebase_source : ab5c2229b98e1407b8b74ef2ee00dcfea45e046a
2018-05-16 16:05:03 -04:00
Valentin Gosu
ba3f9989ec Bug 1426353 - Do not allow the parent process to consume alt-data generated in the content process. r=michal
MozReview-Commit-ID: htQ28muaBI

--HG--
rename : netwerk/test/unit/test_alt-data_simple.js => netwerk/test/unit/test_alt-data_cross_process.js
rename : netwerk/test/unit_ipc/test_alt-data_simple_wrap.js => netwerk/test/unit_ipc/test_alt-data_cross_process_wrap.js
2018-03-06 02:44:51 +01:00
Daniel Stenberg
e5d3226694 bug 1434852 - introducing TRR (DOH); r=mcmanus,valentin
Provides an optional resolver mechanism for Firefox that allows running
together with or instead of the native resolver.

TRR offers resolving of host names using a dedicated DNS-over-HTTPS server
(HTTPS is required, HTTP/2 is preferable).

DNS-over-HTTPS (DOH) allows DNS resolves with enhanced privacy, secure
transfers and improved performance.

To keep the failure rate at a minimum, the TRR system manages a dynamic
persistent blacklist for host names that can't be resolved with DOH but works
with the native resolver. Blacklisted entries will not be retried over DOH for
a couple of days. "localhost" and names in the ".local" TLD will not be
resolved via DOH.

TRR is preffed OFF by default and you need to set a URI for an available DOH
server to be able to use it. Since the URI for DOH is set with a name itself,
it may have to use the native resolver for bootstrapping. (Optionally, the
user can set the IP address of the DOH server in a pref to avoid the required
initial native resolve.)

When TRR starts up, it will first verify that it works by checking a
"confirmation" domain name. This confirmation domain is a pref by default set
to "example.com". TRR will also by default await the captive-portal detection
to raise its green flag before getting activated.

All prefs for TRR are under the "network.trr" hierarchy.

The DNS-over-HTTPS spec: https://tools.ietf.org/html/draft-ietf-doh-dns-over-https-03

MozReview-Commit-ID: GuuU6vjTjlm

--HG--
extra : rebase_source : 53fcca757334090ac05fec540ef29d109d5ceed3
2018-02-01 10:20:49 +01:00
Ben Kelly
4d2d40a639 Bug 1391693 P11 Remove old nsHttpChannel interception bits. r=valentin 2017-10-09 10:03:42 -07:00
Eric Rahm
a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Sajjad Arshad
404facfbbc Bug 1388925 - Add an opaque flags to have a fine-grained control over TLS configurations. r=mcmanus, r=keeler
This flags is added in the http channel interface by which developers can control the TLS
connections from JavaScript code (e.g. Add-ons). Basically, all the changes accounted for
plumbing this TLS flags from JavaScript level to C++ code responsible for calling NSS
module. We also added a unit test to make sure that separate connections are created if we
use different tlsFlags. Basically we used a concrete set of flag values that covers the
edge cases and check the hashkey generated in the connection info.

--HG--
rename : netwerk/test/unit/test_separate_connections.js => netwerk/test/unit/test_tls_flags_separate_connections.js
2017-08-16 12:41:16 -07:00
Ben Kelly
92ebf95b57 Bug 1363848 P1 Record the last redirect flags on the http channel. r=dragana 2017-06-15 07:52:41 -07:00
Kershaw Chang
14ca5d5894 Bug 1360581 - Part3: Add setTopWindowURIIfUnknown in nsIHttpChannelInternal, r=mayhemer
Since the uri classifier needs topWindowURI to decide whether or not to enable channel annotation, we have to allow to change this attribute in js for passing the test.

--HG--
extra : rebase_source : c5effa05fecef0d32600e4c9c926dbfa77c2ca6f
2017-06-13 01:21:00 +02:00
Wei-Cheng Pan
5143918e81 Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus
Add MOZ_MUST_USE attirbute to headers and idl files.

MozReview-Commit-ID: 7nZQlZoDrv2

--HG--
extra : rebase_source : e8d9469a3b24932d95bf533c54f43c324ffa8c53
2016-12-27 15:22:07 +08:00
Honza Bambas
bb033696f7 Bug 1324419 - Use QueryObject for nsHttpChannel. r=mcmanus
--HG--
extra : rebase_source : 192a4705e4e91bc393a283743a1ad8880da6aeba
2017-02-17 08:08:00 -05:00
Honza Bambas
706f18a2c8 Bug 1318759 - Properly query final class in HttpChannelParent::OnStartRequest to prevent evil static_cast, r=jduell 2016-12-09 05:52:00 +01:00
Patrick McManus
eefe030798 Bug 1321783 - Make updater be networking conservative r=dkeeler r=rstrong r=dragana 2016-12-02 16:49:23 -05:00
Tom Tung
a167b66e90 Bug 1187335 - P4 - Integrate fetch and cache with SRI & add nsIConsoleReportCollector to show console report. r=bkelly. 2016-09-07 10:20:23 +08:00
Jonathan Hao
cc481ebca7 Bug 1283319 - Tests for connection info's hash key. r=mayhemer
--HG--
extra : rebase_source : 78cc39299d247146be49078976f1671a8bb89811
2016-08-17 19:57:00 -04:00
Thomas Zimmermann
4bee1b2945 Bug 1288077: Forward declare arrays by including 'nsTArrayForwardDeclare.h', r=froydnj
MozReview-Commit-ID: 4RBeHDyhQgr
2016-07-20 17:29:36 +02:00
Andrew Sutherland
af016de2cb Bug 1272436 - P0: Implement "only-if-cached" RequestCache mode. r=mayhemer, r=bkelly, r=bzbarsky for WebIDL change
The fetch spec has re-introduced "only-if-cached" mode which loads only from
the cache.  There are privacy implications to this so for the time being it
is required that "same-origin" mode is used.
2016-06-08 12:10:15 -04:00
Ehsan Akhgari
ac9a100c66 Bug 1120715 - Part 1: Add Necko APIs to preserve the Request cache mode on the channel; r=mayhemer 2016-03-11 14:40:33 -05:00
Ryan VanderMeulen
e98112b9bd Backed out 8 changesets (bug 1120715) for Android dom/u2f/tests/test_no_token.html permafail.
Backed out changeset 043770204431 (bug 1120715)
Backed out changeset e10c375353f4 (bug 1120715)
Backed out changeset c2871dbeb7cc (bug 1120715)
Backed out changeset 79158f028ad3 (bug 1120715)
Backed out changeset c74866f52320 (bug 1120715)
Backed out changeset c731944ecc64 (bug 1120715)
Backed out changeset 44f346712a3a (bug 1120715)
Backed out changeset 60d6045125e2 (bug 1120715)

CLOSED TREE
2016-03-10 20:20:05 -05:00
Ehsan Akhgari
9874b83667 Bug 1120715 - Part 1: Add Necko APIs to preserve the Request cache mode on the channel; r=mayhemer 2016-03-10 17:29:11 -05:00
Wes Kocher
53011a6a05 Backed out 6 changesets (bug 1120715) for wpt bustage in request-cache.html
Backed out changeset 2ee4b18f6b3a (bug 1120715)
Backed out changeset f87a25ade31e (bug 1120715)
Backed out changeset 9391f22c08c2 (bug 1120715)
Backed out changeset c5bf9f7bb86e (bug 1120715)
Backed out changeset 7e003fb64d41 (bug 1120715)
Backed out changeset ef66b64e9f8a (bug 1120715)

MozReview-Commit-ID: AI47IhtGWea
2016-03-09 15:57:43 -08:00
Ehsan Akhgari
fded90051d Bug 1120715 - Part 1: Add Necko APIs to preserve the Request cache mode on the channel; r=mayhemer 2016-03-09 16:42:53 -05:00
Andrea Marchesini
9e47057422 Bug 1241565 - nsIHttpChannelInternal should be a builtinclass, r=honzab.moz 2016-01-22 11:55:54 +00:00
Andrea Marchesini
e9160985c2 Bug 1221320 - XMLHttpRequest authentication should not require auth prompt dialog, r=honzab.moz 2015-12-30 18:47:55 +00:00
Ehsan Akhgari
d08dcc913c Bug 1209081 - Part 1: Implement the "navigate" value for RequestMode; r=bkelly 2016-01-19 17:46:10 -05:00
Jonas Sicking
28de02f687 Bug 1226909 part 3: Move logic of when to initiate CORS preflight into channels. Allow CORS preflight to happen when doing a same-origin to cross-origin redirect. r=ckerschb 2015-12-06 18:33:14 -05:00
Jonas Sicking
0e0c8c52ea Bug 1226909 part 2: Let CORS preflight logic grab information from nsILoadInfo rather than duplicate it. r=ckerschb 2015-12-06 18:33:14 -05:00
Sebastian Hengst
774236075d Backed out changeset 09d64535bcda (bug 1216687), a7f1a289dd78, 4dbf06183e6c, 26318a5e3006, 9ae2af3cf86d (bug 1226909) for M(1,2,5) oranges. r=backout 2015-12-05 16:34:47 +01:00
Jonas Sicking
ff12f48c5a Bug 1226909 part 3: Move logic of when to initiate CORS preflight into channels. Allow CORS preflight to happen when doing a same-origin to cross-origin redirect. r=ckerschb 2015-12-05 01:46:20 -08:00
Jonas Sicking
918c689657 Bug 1226909 part 2: Let CORS preflight logic grab information from nsILoadInfo rather than duplicate it. r=ckerschb 2015-12-05 01:46:20 -08:00
Blake Kaplan
b62a6327bd Bug 1171215 - Compute third-partyness in the loadinfo instead of nsIHttpChannelInternal so that other protocols correctly respect the third-party cookie pref. r=sicking/ckerschb 2015-11-30 13:25:29 -08:00
Josh Matthews
d3726427db Bug 1173811 - Part 1: Propagate the response URL to intercepted channels when necessary (non-e10s). r=mayhemer,bkelly 2015-10-22 09:23:39 -04:00
Phil Ringnalda
6401c0185c Back out 2 changesets (bug 1173811) for test_synthesized_response.js timeouts
CLOSED TREE

Backed out changeset 56bc1314e660 (bug 1173811)
Backed out changeset 0ad51d302ba9 (bug 1173811)
2015-10-21 20:21:05 -07:00
Josh Matthews
591281df75 Bug 1173811 - Part 1: Propagate the response URL to intercepted channels when necessary (non-e10s). r=mayhemer,bkelly 2015-10-21 00:05:40 -04:00
Jonas Sicking
7bf7cbbd1a Bug 1215746: Remove RequestMode::Cors_with_forced_preflight. r=bkelly 2015-10-19 18:24:36 -07:00
Ben Kelly
031144370f Bug 1210941 P12 Remove http channel's ForceNoIntercept. r=jduell IGNORE IDL 2015-10-06 06:37:07 -07:00
Patrick McManus
60d6db97ae bug 1204614 - use h2 per stream flow control to deal with suspended channels r=hurley 2015-09-11 15:53:27 -04:00
Ehsan Akhgari
25a1bb1191 Bug 1199049 - Part 2: Add a channel API for requesting CORS preflights; r=jduell 2015-09-12 19:20:54 -04:00
Ben Kelly
0c633816f2 Bug 1184607 P3 Add a RedirectMode flag to nsIHttpChannelInternal. r=nsm
* * *
Bug 1184607 P3 interdiff 001 http channel nits
2015-08-31 14:26:29 -07:00
Ehsan Akhgari
5816445c61 Bug 1194847 - Part 1: Make it possible to tell whether the response of a channel has been synthesized; r=michal 2015-08-25 21:26:14 -04:00
Christoph Kerschbaumer
bcc6bfffb4 Bug 1175803 - Store redirect chain within loadInfo - part 2 (r=sicking,mayhemer) 2015-07-19 19:43:09 -07:00
Dragana Damjanovic
b5075f0de3 Bug 1170197 - If a channel is suspended in http-on-modify-request, it should not send any trafic untill resumed. r=mayhemer 2015-06-18 10:57:00 -04:00
Patrick McManus
2bc676b831 Bug 1153936 - nsIHttpChannelInteral attribute to opt out of alt-svc on per channel basis r=hurley 2015-04-13 12:59:34 -04:00
Henry Chang
90b7e51843 Bug 1053650 - Part 2: Populate networkInterfaceId to SocketTransport. r=mcmanus
--HG--
extra : rebase_source : a198156d6d430d7f92801c0f2db51cb297820867
2015-04-07 11:45:57 -04:00
Nikhil Marathe
7a7e74fe7c Bug 1134324 - Set CORS mode and credentials on Fetch event Request. r=michal
renames fetch to fetchXHR() since fetch() is now a superpower.

--HG--
extra : transplant_source : %DA%00%E38%A6%0Fw%DA%26%D3%A9q%AE%A6%FE%BA%81%AA%EEB
2015-03-17 08:47:02 -07:00
Arthur Edelstein
dd318c4d2a Bug 436344 - Allow filtering of proxies by channel. r=mcmanus 2015-01-21 21:13:00 +01:00
Monica Chew
269c62c45e Bug 1100024: Don't call Connect if the principal is on a local or remote blocklist (r=mcmanus)
* * *
Bug 1120547 - Mark the overrides of nsIHttpChannelInternal::ContinueBeginConnect as override and rev the uuid of the interface; r=mmc
2015-01-09 13:25:13 -08:00