Skip to content

Commit fd0333f

Browse files
committed
Ensure Content is read if ContentLength Header is null
1 parent 3174d7e commit fd0333f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Remora.Rest/Http/RestHttpClient.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ private async Task<Result<TEntity>> UnpackResponseAsync<TEntity>
651651
}
652652

653653
// See if we have a JSON error to get some more details from
654-
if (response.Content.Headers.ContentLength is not > 0)
654+
if (response.Content.Headers.ContentLength == 0)
655655
{
656656
return new HttpResultError(response.StatusCode, response.ReasonPhrase);
657657
}

0 commit comments

Comments
 (0)