From 63eec85627bcd3c584865d47a237de44bcdb8b98 Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Tue, 20 Aug 2019 23:41:36 +0800 Subject: Use etag for cache. --- Timeline/Models/Http/Common.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Timeline/Models/Http') diff --git a/Timeline/Models/Http/Common.cs b/Timeline/Models/Http/Common.cs index 50f6836e..a72f187c 100644 --- a/Timeline/Models/Http/Common.cs +++ b/Timeline/Models/Http/Common.cs @@ -13,6 +13,7 @@ namespace Timeline.Models.Http public const int Header_Missing_ContentType = -111; public const int Header_Missing_ContentLength = -112; public const int Header_Zero_ContentLength = -113; + public const int Header_BadFormat_IfNonMatch = -114; } public static CommonResponse InvalidModel(string message) @@ -35,6 +36,11 @@ namespace Timeline.Models.Http return new CommonResponse(ErrorCodes.Header_Zero_ContentLength, "Header Content-Length must not be 0."); } + public static CommonResponse BadIfNonMatch() + { + return new CommonResponse(ErrorCodes.Header_BadFormat_IfNonMatch, "Header If-Non-Match is of bad format."); + } + public CommonResponse() { -- cgit v1.2.3