Since both DnsAndConnectSocket and nsHttpTransaction use HttpActivityDistributor, let's refactor this a bit by moving some duplicate code to nsHttpHandler.
This patch also makes it possible to test ECH activity for Http3 case.
Differential Revision: https://phabricator.services.mozilla.com/D138893
Since both DnsAndConnectSocket and nsHttpTransaction use HttpActivityDistributor, let's refactor this a bit by moving some duplicate code to nsHttpHandler.
This patch also makes it possible to test ECH activity for Http3 case.
Depends on D138892
Differential Revision: https://phabricator.services.mozilla.com/D138893
The Http3Stream’s received side has one state, i.e. READING_INTERIM_HEADERS. The stream transitions into this state when 1xx response is received and it transitions back to BEFORE_HEADERS as new headers are expected. As with the final headers the 1xx headers are stored into mFlatResponseHeaders and they are picked up by the HttpTransaction from there.
neqo makes sure that response headers and data are received in the right order, e.g. 1xx cannot be received after a non-1xx response, fin cannot follow 1xx response, etc.
Differential Revision: https://phabricator.services.mozilla.com/D132831
Most important changes:
- Neqo API now only use StreamId instead of u64 for the stream ids
- The server side API has send_headers, send_data and stream_close_send instead of a single set_response. Important change is also that send_data does not accept more data than the flow control allows. Set_response used to accept all data unconditionally. Therefore now we need to listen to DataWritable events.
Differential Revision: https://phabricator.services.mozilla.com/D132594
Most important changes:
- Neqo API now only use StreamId instead of u64 for the stream ids
- The server side API has send_headers, send_data and stream_close_send instead of a single set_response. Important change is also that send_data does not accept more data than the flow control allows. Set_response used to accept all data unconditionally. Therefore now we need to listen to DataWritable events.
Differential Revision: https://phabricator.services.mozilla.com/D132594
CLOSED TREE
Backed out changeset 511af4b42efc (bug 1734132)
Backed out changeset 9516eb1214d8 (bug 1734132)
Backed out changeset 513d740d6477 (bug 1734132)
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
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
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
This changeset is the result of adding modernize-use-default-member-init to
tools/clang-tidy/config.yaml then proceeding to run
`./mach static-analysis check netwerk/ --fix`
I then went through the resulting fix and manually updated all of the member
variables which were missed due to them having a non-trivial constructor.
Note that the tool was only run on Linux, so code that only runs on some
platforms may have been missed.
The member variables that are still initialized in the contructor definition
are:
- bitfields (not all currently supported compilers allow default-member-init
- variables that are initialized via a parameter
- variables that use code not visible in the header file
There are a few advantages to landing this change:
- fewer lines of code - now declaration is in the same place as initialization
this also makes it easier to see when looking at the header.
- it makes it harder to miss initializing a member when adding a new contructor
- variables that depend on an include guard look much nicer now
Additionally I removed some unnecessary reinitialization of NetAddr members
(it has a constructor that does that now), and changed nsWifiScannerDBus to
use the thread-safe strtok_r instead of strtok.
Differential Revision: https://phabricator.services.mozilla.com/D116980