#625 Changes Error Message when trying to reuse stream
This commit is contained in:
parent
3865136b97
commit
8f3d894b95
|
|
@ -226,7 +226,7 @@ namespace Microsoft.AspNetCore.WebUtilities
|
||||||
PositionInnerStream();
|
PositionInnerStream();
|
||||||
if (!_innerStream.EnsureBuffered(_boundary.FinalBoundaryLength))
|
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;
|
var bufferedData = _innerStream.BufferedData;
|
||||||
|
|
||||||
|
|
@ -280,7 +280,7 @@ namespace Microsoft.AspNetCore.WebUtilities
|
||||||
PositionInnerStream();
|
PositionInnerStream();
|
||||||
if (!await _innerStream.EnsureBufferedAsync(_boundary.FinalBoundaryLength, cancellationToken))
|
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;
|
var bufferedData = _innerStream.BufferedData;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue