authority = authority ?? _originAuthority;
}
- if (authority != null)
+ if (authority == null)
{
- if (IsAltSvcBlocked(authority))
- {
- throw GetVersionException(request, 3);
- }
+ break;
+ }
- Http3Connection connection = await GetHttp3ConnectionAsync(request, authority, cancellationToken).ConfigureAwait(false);
- HttpResponseMessage response = await connection.SendAsync(request, async, cancellationToken).ConfigureAwait(false);
+ if (IsAltSvcBlocked(authority))
+ {
+ throw GetVersionException(request, 3);
+ }
- // If an Alt-Svc authority returns 421, it means it can't actually handle the request.
- // An authority is supposed to be able to handle ALL requests to the origin, so this is a server bug.
- // In this case, we blocklist the authority and retry the request at the origin.
- if (response.StatusCode == HttpStatusCode.MisdirectedRequest && connection.Authority != _originAuthority)
- {
- response.Dispose();
- BlocklistAuthority(connection.Authority);
- continue;
- }
+ Http3Connection connection = await GetHttp3ConnectionAsync(request, authority, cancellationToken).ConfigureAwait(false);
+ HttpResponseMessage response = await connection.SendAsync(request, async, cancellationToken).ConfigureAwait(false);
- return response;
+ // If an Alt-Svc authority returns 421, it means it can't actually handle the request.
+ // An authority is supposed to be able to handle ALL requests to the origin, so this is a server bug.
+ // In this case, we blocklist the authority and retry the request at the origin.
+ if (response.StatusCode == HttpStatusCode.MisdirectedRequest && connection.Authority != _originAuthority)
+ {
+ response.Dispose();
+ BlocklistAuthority(connection.Authority);
+ continue;
}
+
+ return response;
}
}
# MsQuic
`System.Net.Quic` depends on [MsQuic](https://github.com/microsoft/msquic), Microsoft, cross-platform, native implementation of the [QUIC](https://datatracker.ietf.org/wg/quic/about/) protocol.
-Currently, `System.Net.Quic` depends on [**msquic@7b31e149a9d1ed7a6850e8253ba3d0af707150e5**](https://github.com/microsoft/msquic/commit/7b31e149a9d1ed7a6850e8253ba3d0af707150e5) revision.
+Currently, `System.Net.Quic` depends on [**msquic@2084736032ec917f1819802caa515e61a6d3dd9a**](https://github.com/microsoft/msquic/commit/2084736032ec917f1819802caa515e61a6d3dd9a) revision.
## Usage
Run inside the msquic directory (for **Debug** build with logging on):
```bash
-# build msquic in debug with logging and stub tls
+# build msquic in debug with logging
rm -rf build
mkdir build
-cmake -B build -DCMAKE_BUILD_TYPE=Debug -DQUIC_ENABLE_LOGGING=on -DQUIC_TLS=stub
+cmake -B build -DCMAKE_BUILD_TYPE=Debug -DQUIC_ENABLE_LOGGING=on
cd build
cmake --build . --config Debug