30 lines
1.0 KiB
C#
30 lines
1.0 KiB
C#
// Copyright (c) .NET Foundation. All rights reserved.
|
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Microsoft.AspNetCore.StaticFiles
|
|
{
|
|
internal static class Constants
|
|
{
|
|
internal const string ServerCapabilitiesKey = "server.Capabilities";
|
|
internal const string SendFileVersionKey = "sendfile.Version";
|
|
internal const string SendFileVersion = "1.0";
|
|
|
|
internal const int Status200Ok = 200;
|
|
internal const int Status206PartialContent = 206;
|
|
internal const int Status304NotModified = 304;
|
|
internal const int Status412PreconditionFailed = 412;
|
|
internal const int Status416RangeNotSatisfiable = 416;
|
|
|
|
internal static readonly Task CompletedTask = CreateCompletedTask();
|
|
|
|
private static Task CreateCompletedTask()
|
|
{
|
|
var tcs = new TaskCompletionSource<object>();
|
|
tcs.SetResult(null);
|
|
return tcs.Task;
|
|
}
|
|
}
|
|
}
|