supportsHttp3 is only needed for telemetry therefore it is only set on HTTP2 connections. It is also moved to nsIHttpChannelInternal.
Differential Revision: https://phabricator.services.mozilla.com/D96585
This telemetry will be collected for transaction that have used HTTP3 and transaction that have used HTTP2 but the servers they are connecting to support HTTP3.
Differential Revision: https://phabricator.services.mozilla.com/D96459
it will test transactions that are in 3 different states:
- transaction has received some data before the protocol error occurred. This transaction will be closed with NS_ERROR_NET_PARTIAL_TRANSFER
- transaction has only send some data but has not received any data. This transaction will be closed with NS_ERROR_NET_HTTP3_PROTOCOL_ERROR
- transaction is queued in Http3Session because of the stream concurrency limit. In this case the transaction will be restarted and it will succeeed using HTTP2.
Differential Revision: https://phabricator.services.mozilla.com/D95988
This error is well mitigated with checking if a certificate is valied for a domain before dispatching. If we include this error we will have a case as in test_altsvc_https.js where a domain is valid for foo.example.com but not for bar.example.com and if bar.example.com as altsvc to that domain the domain will be excluded for foo.example.com.
Differential Revision: https://phabricator.services.mozilla.com/D95845
- Add 2 test: 1) server is not listening to the port and 2) server is not responding that will cause the connection to timeout and fall back to HTTP2
- Adds a server that only reads packets but never sends any to simulate a handshake timing out
Differential Revision: https://phabricator.services.mozilla.com/D95816
Domains are excluded:
- if NS_ERROR_NET_HTTP3_PROTOCOL_ERROR error happens, this is a single error for all different HTTP3 protocol errors,
- also if a connection times out before the handshake is done
Change the current behavior to exclude HTTP3 domains instead of excluding the origin host names. HTTP2 disable AltSvc mapping if a origin domain is excluded which may not be ideal. This patch only changes behavior of HTTP3.
Refactor test_http3_fatal_stream_error.js. The test use to try to connect to http3 server on port 443 that does nto exist and it would return an error. This patch make the test use HTTP2 so that the the connection to the origin host (not AltSvc host) succeeds.
Differential Revision: https://phabricator.services.mozilla.com/D95807
This error is well mitigated with checking if a certificate is valied for a domain before dispatching. If we include this error we will have a case as in test_altsvc_https.js where a domain is valid for foo.example.com but not for bar.example.com and if bar.example.com as altsvc to that domain the domain will be excluded for foo.example.com.
Differential Revision: https://phabricator.services.mozilla.com/D95845
- Add 2 test: 1) server is not listening to the port and 2) server is not responding that will cause the connection to timeout and fall back to HTTP2
- Adds a server that only reads packets but never sends any to simulate a handshake timing out
Differential Revision: https://phabricator.services.mozilla.com/D95816
Domains are excluded:
- if NS_ERROR_NET_HTTP3_PROTOCOL_ERROR error happens, this is a single error for all different HTTP3 protocol errors,
- also if a connection times out before the handshake is done
Change the current behavior to exclude HTTP3 domains instead of excluding the origin host names. HTTP2 disable AltSvc mapping if a origin domain is excluded which may not be ideal. This patch only changes behavior of HTTP3.
Refactor test_http3_fatal_stream_error.js. The test use to try to connect to http3 server on port 443 that does nto exist and it would return an error. This patch make the test use HTTP2 so that the the connection to the origin host (not AltSvc host) succeeds.
Differential Revision: https://phabricator.services.mozilla.com/D95807
This error is well mitigated with checking if a certificate is valied for a domain before dispatching. If we include this error we will have a case as in test_altsvc_https.js where a domain is valid for foo.example.com but not for bar.example.com and if bar.example.com as altsvc to that domain the domain will be excluded for foo.example.com.
Differential Revision: https://phabricator.services.mozilla.com/D95845
- Add 2 test: 1) server is not listening to the port and 2) server is not responding that will cause the connection to timeout and fall back to HTTP2
- Adds a server that only reads packets but never sends any to simulate a handshake timing out
Differential Revision: https://phabricator.services.mozilla.com/D95816
Domains are excluded:
- if NS_ERROR_NET_HTTP3_PROTOCOL_ERROR error happens, this is a single error for all different HTTP3 protocol errors,
- also if a connection times out before the handshake is done
Change the current behavior to exclude HTTP3 domains instead of excluding the origin host names. HTTP2 disable AltSvc mapping if a origin domain is excluded which may not be ideal. This patch only changes behavior of HTTP3.
Refactor test_http3_fatal_stream_error.js. The test use to try to connect to http3 server on port 443 that does nto exist and it would return an error. This patch make the test use HTTP2 so that the the connection to the origin host (not AltSvc host) succeeds.
Differential Revision: https://phabricator.services.mozilla.com/D95807
This needs to count encrypted data, therefore it is implemented as a NSPR layer right above the PR_NSPR_IO_LAYER layer.
Differential Revision: https://phabricator.services.mozilla.com/D96083
- Move looping while calling mTransaction->ReadSegments into Http3Stream and call mTransaction->ReadSegmentsAgain. We use to loop in Http3Session which was not easy because it is not easy to find out when to leave the loop. The original code was working, but this is a better way to do this.
- Remove mReadyForWriteButBlocked it is not necessary, it was used only as a double check and can only be a source of bugs.
- Remove mContentBytesWritten, because it is not used.
- Http3Server now reads post data and returns amount of data received (this was needed to make better test).
- In test_http3.js increase the number of parallel to trigger max-concurent-stream limit and test stream queuing before streams being activated.
- Add tests for post with large amount of data that are hitting the stream bugger limits. This is testing Http3Event::Tag::DataWritable and also testing the the end of the mTransaction->ReadSegmentsAgain loop.
Differential Revision: https://phabricator.services.mozilla.com/D95622
- add allowHttp3 attribute to nsIHttpChannelInternal, it is used for easy testing and it will be used for Bug 1674111
- add test for NS_HTTP_DISALLOW_HTTP3 and NS_HTTP_DISALLOW_SPDY
- add HTTP3 test for altSvc and the cert verifiacation
Differential Revision: https://phabricator.services.mozilla.com/D95256
- We have an assumption that SetResponseHeaders will be called before WriteSegments is called for the first time. I would like to make it more structural add add a new state BEFORE_HEADERS
- mDataReceived was never set, which is wrong.
- Almost any error that occurs during ReadResponseData is a connection error and neqo will handle it internally by closing the session. This will be read by necko as ConnectionState change event. Therefore ignore errors received from mHttp3Connection->ReadResponseData and let the ConnectionChange event close the stream.
- This also adds a test. Because the stream has received some data already the transaction will br closed with the NS_ERROR_NET_PARTIAL_TRANSFER error.
Differential Revision: https://phabricator.services.mozilla.com/D94951
This will allow us to make response that violate the Http3 protocol and cause a protocol error.
Currently the server returns only one response, we may extend it if needed.
Differential Revision: https://phabricator.services.mozilla.com/D94912
- This will make handling of responses contain only headers in the same way as the responses with
a response body
- This will also make sure we pick up an error if neqo_http3conn_read_response_data return one.
Differential Revision: https://phabricator.services.mozilla.com/D94834
Previously these requests would replace the nsIRequest argument to stream
listeners based on the initial process, rather than based on the final process.
This caused issues when the initial process was non-remote, but the final
process was remote, as the parameter would be replaced when it shouldn't be.
This patch now disables request-argument replacement for all loads, and
selectively re-enables it during OnStartRequest for loads which will terminate
in the parent process.
Differential Revision: https://phabricator.services.mozilla.com/D94779
The test was using network.dns.localDomains to check that we don't
call into the platform DNS resolver when the network.dns.disabled pref
was set - but since the localDomains pref rewrites hostnames to localhost
and we now don't call into GetAddrInfo for local domains, the test
failed.
I changed it so it uses the NativeDNSResolverOverride to register an IP for
foo.bar instead of relying on localDOmains.
Depends on D94726
Differential Revision: https://phabricator.services.mozilla.com/D94727
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
We want to partition the CORS preflight cache by the network state
partitioning. So, we have done two things in the patch. First, we make
the CORS preflight cache to be aware of the OriginAttributes. Second, we
use the originAttributes of the network state partitioning in the CORS
preflight cache. As the result, the CORS preflight cache will be
partitioned by the originAttributes.partitionKey as well as other
originAttributes fields if present.
Differential Revision: https://phabricator.services.mozilla.com/D93683
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
The partitionKey for HSTS is always set with 'http' scheme. So, we
should also use 'http' when checking the HSTS for http channels.
Differential Revision: https://phabricator.services.mozilla.com/D93393
This renames kTimeFormatSeconds to kTimeFormatLong and kTimeFormatNoSeconds to
kTimeFormatShort. This is consistent with the naming used for date format
selectors.
Differential Revision: https://phabricator.services.mozilla.com/D93011
UI needs to distinguish the cases when a channel is shimmed and is
unshimmed.
When a channel is unshimmed, we unblock the channel and simply treat the channel as a
non-tracking channel.
When a channel is shimmed, although the channel is unblocked by
URLCLassifier, we still want to show it in the UI. For this case,
URLClassifier will notify a content blocking event when a channel is
unblocked.
This patch adds a new allow API, so the caller can use unblock() or
allow() depending upon the case it requires.
Differential Revision: https://phabricator.services.mozilla.com/D93271
Previously it was possible to not have mBoundarySet so we just bailed in
OnStopRequest - but after Bug 1321612 that is not possible, and we
call OnStopRequest with NS_ERROR_CORRUPTED_CONTENT.
This patch removes the check for the boundary, allowing the code to call
`mFinalListener->OnStopRequest(request, aStatus)` instead of hanging.
Differential Revision: https://phabricator.services.mozilla.com/D93340
Since the semantics of `ContentParent::MarkAsDead` are significantly different
from `GeckoProcessManager::MarkAsDead`, let's rename the latter to better
reflect what it actually does.
Differential Revision: https://phabricator.services.mozilla.com/D92649
The problem occurs when a response does not have a body. In this case the transaction will never be closed. if a transaction only has read headers, WriteSegments will return 0 bytes written(bug 1646701) and WriteSegments will not be called again and the transaction will not pickup the FIN bit.
Some code improvements:
- calling WriteSegments in a loop has been moved to Http3Stream. This is more appropriate place
- remove RECEIVED_RESET, because it is not used
- add test and add head_http3.js for setting up http3 tests (e.g. making sure that an alt-svc mapping is setup)
- fix handling of a response that has more data than its content-length header indicates.
Differential Revision: https://phabricator.services.mozilla.com/D92990
The root cause in this bug is that the connection info used by `SpdyConnectTransaction` is the same instance as the connection info in `nsHttpTransaction`, so we should clone it and let `SpdyConnectTransaction` use the cloned one.
Differential Revision: https://phabricator.services.mozilla.com/D89801
Currently we call ResumeSend() which will not process neqo events. It will only produce new packets. We are relying on other events, like timeout or a receive packet to trigger this.
Differential Revision: https://phabricator.services.mozilla.com/D92113