Skip to content
Closed
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion sdk/core/System.ClientModel/src/Message/PipelineResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ public virtual BinaryData Content
{
get
{
if (_contentStream is not null)
{
return BinaryData.FromStream(_contentStream);
}

if (_content is null)
{
throw new InvalidOperationException($"The response is not fully buffered.");
Expand Down Expand Up @@ -112,7 +117,7 @@ internal async Task BufferContentAsync(TimeSpan? timeout = default, Cancellation
}

Stream? responseContentStream = ContentStream;
if (responseContentStream == null || IsBuffered)
if (responseContentStream == null)
{
_content = s_emptyBinaryData;
return;
Expand Down