Skip to content

Commit c41db59

Browse files
wrallmconnew
authored andcommitted
Simplest possible fix for null inputStream when ContentLength is 0
1 parent 0543c7b commit c41db59

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/System.ServiceModel.Http/src/System/ServiceModel/Channels/HttpResponseMessageHelper.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,10 @@ private async Task<Message> DecodeBufferedMessageAsync(ArraySegment<byte> buffer
297297
}
298298
finally
299299
{
300-
inputStream.Dispose();
300+
if (inputStream != null)
301+
{
302+
inputStream.Dispose();
303+
}
301304
}
302305
}
303306

0 commit comments

Comments
 (0)