From 8f3d894b9544c147be70579f11001c257c356151 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Wed, 15 Jun 2016 15:33:24 -0700 Subject: [PATCH] #625 Changes Error Message when trying to reuse stream --- .../MultipartReaderStream.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNetCore.WebUtilities/MultipartReaderStream.cs b/src/Microsoft.AspNetCore.WebUtilities/MultipartReaderStream.cs index e9220a8d25..bc40b08afc 100644 --- a/src/Microsoft.AspNetCore.WebUtilities/MultipartReaderStream.cs +++ b/src/Microsoft.AspNetCore.WebUtilities/MultipartReaderStream.cs @@ -226,7 +226,7 @@ namespace Microsoft.AspNetCore.WebUtilities PositionInnerStream(); if (!_innerStream.EnsureBuffered(_boundary.FinalBoundaryLength)) { - throw new IOException("Unexpected end of stream."); + throw new IOException("Unexpected end of Stream, the content may have already been read by another component. "); } var bufferedData = _innerStream.BufferedData; @@ -280,7 +280,7 @@ namespace Microsoft.AspNetCore.WebUtilities PositionInnerStream(); if (!await _innerStream.EnsureBufferedAsync(_boundary.FinalBoundaryLength, cancellationToken)) { - throw new IOException("Unexpected end of stream."); + throw new IOException("Unexpected end of Stream, the content may have already been read by another component. "); } var bufferedData = _innerStream.BufferedData;