2878 {
2880 try
2881 {
2882 if (HttpTelemetry.Log.IsEnabled())
2883 {
2884 HttpTelemetry.Log.RequestHeadersStart();
2885 }
2889 int num = (item.Length - 1) / 16384 + 1;
2892 await PerformWriteAsync(
writeBytes, (
this,
http2Stream,
item,
request.Content ==
null,
mustFlush),
delegate((
Http2Connection thisRef, Http2Stream
http2Stream,
ReadOnlyMemory<byte> headerBytes,
bool endStream,
bool mustFlush)
s,
Memory<byte> writeBuffer)
2893 {
2895 {
2896 s.thisRef.Trace(s.http2Stream.StreamId, $"Started writing. Total header bytes={s.headerBytes.Length}", "SendHeadersAsync");
2897 }
2898 s.thisRef.AddStream(
s.http2Stream);
2910 {
2911 s.thisRef.Trace(
s.http2Stream.StreamId,
$"Wrote HEADERS frame. Length={item2.Length}, flags={frameFlags}",
"SendHeadersAsync");
2912 }
2913 while (
item3.Length > 0)
2914 {
2924 {
2925 s.thisRef.Trace(
s.http2Stream.StreamId,
$"Wrote CONTINUATION frame. Length={item2.Length}, flags={frameFlags}",
"SendHeadersAsync");
2926 }
2927 }
2928 return s.mustFlush ||
s.endStream;
2930 if (HttpTelemetry.Log.IsEnabled())
2931 {
2932 HttpTelemetry.Log.RequestHeadersStop();
2933 }
2935 }
2936 catch
2937 {
2939 throw;
2940 }
2941 finally
2942 {
2944 }
2945 }
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
static ReadOnlyMemory< byte > ReadOnlyMemory< byte > rest SplitBuffer(ReadOnlyMemory< byte > buffer, int maxSize)
void WriteHeaders(HttpRequestMessage request, ref System.Net.ArrayBuffer headerBuffer)
static ReadOnlyMemory< byte > first
Http2Connection(HttpConnectionPool pool, Stream stream)
static readonly System.Net.NetEventSource Log