Skip to content

Commit

Permalink
[HTTP/3] Set EOF for 0-length response payload (#60120)
Browse files Browse the repository at this point in the history
  • Loading branch information
ManickaP authored Oct 7, 2021
1 parent 6195d98 commit 701c042
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ private async ValueTask DrainContentLength0Frames(CancellationToken cancellation
case null:
// Done receiving: copy over trailing headers.
CopyTrailersToResponseMessage(_response!);

_responseDataPayloadRemaining = -1; // Set to -1 to indicate EOS.
return;
case Http3FrameType.Data:
// The sum of data frames must equal content length. Because this method is only
Expand All @@ -500,7 +502,7 @@ private async ValueTask DrainContentLength0Frames(CancellationToken cancellation
}
break;
default:
Debug.Fail($"Recieved unexpected frame type {frameType}.");
Debug.Fail($"Received unexpected frame type {frameType}.");
return;
}
}
Expand Down

0 comments on commit 701c042

Please sign in to comment.