Reacting to HeaderUtilities renames
This commit is contained in:
parent
76255bc7f4
commit
fcd0685923
|
|
@ -94,7 +94,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
||||||
|
|
||||||
if (rawValue.Count == 1 &&
|
if (rawValue.Count == 1 &&
|
||||||
!string.IsNullOrWhiteSpace(rawValue[0]) &&
|
!string.IsNullOrWhiteSpace(rawValue[0]) &&
|
||||||
HeaderUtilities.TryParseInt64(new StringSegment(rawValue[0]).Trim(), out value))
|
HeaderUtilities.TryParseNonNegativeInt64(new StringSegment(rawValue[0]).Trim(), out value))
|
||||||
{
|
{
|
||||||
_contentLengthText = rawValue;
|
_contentLengthText = rawValue;
|
||||||
_contentLength = value;
|
_contentLength = value;
|
||||||
|
|
@ -113,7 +113,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
||||||
{
|
{
|
||||||
throw new ArgumentOutOfRangeException("value", value.Value, "Cannot be negative.");
|
throw new ArgumentOutOfRangeException("value", value.Value, "Cannot be negative.");
|
||||||
}
|
}
|
||||||
_contentLengthText = HeaderUtilities.FormatInt64(value.Value);
|
_contentLengthText = HeaderUtilities.FormatNonNegativeInt64(value.Value);
|
||||||
this[HttpKnownHeaderNames.ContentLength] = _contentLengthText;
|
this[HttpKnownHeaderNames.ContentLength] = _contentLengthText;
|
||||||
_contentLength = value;
|
_contentLength = value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue