github.com/Aoi-hosizora/ahlib@v1.5.1-0.20230404072829-241b93cf91c7/xconstant/headers/headers_test.go (about) 1 package headers 2 3 import ( 4 "github.com/Aoi-hosizora/ahlib/xtesting" 5 "testing" 6 ) 7 8 func TestHeaders(t *testing.T) { 9 for _, header := range []string{ 10 // Standard header fields 11 AIM, Accept, AcceptCH, AcceptCharset, AcceptDatetime, AcceptEncoding, AcceptLanguage, AcceptPatch, AcceptRanges, AccessControlAllowCredentials, 12 AccessControlAllowHeaders, AccessControlAllowMethods, AccessControlAllowOrigin, AccessControlExposeHeaders, AccessControlMaxAge, AccessControlRequestHeaders, 13 AccessControlRequestMethod, Age, Allow, AltSvc, Authorization, CacheControl, Connection, ContentDisposition, ContentEncoding, ContentLanguage, ContentLength, 14 ContentLocation, ContentMD5, ContentRange, ContentType, Cookie, Date, DeltaBase, ETag, Expect, Expires, Forwarded, From, HTTP2Settings, Host, IM, IfMatch, 15 IfModifiedSince, IfNoneMatch, IfRange, IfUnmodifiedSince, LastModified, Link, Location, MaxForwards, Origin, P3P, Pragma, Prefer, PreferenceApplied, 16 ProxyAuthenticate, ProxyAuthorization, PublicKeyPins, Range, Referer, RetryAfter, Server, SetCookie, StrictTransportSecurity, TE, Tk, Trailer, TransferEncoding, 17 Upgrade, UserAgent, Vary, Via, WWWAuthenticate, Warning, XFrameOptions, 18 19 // Common non-standard header fields 20 ContentSecurityPolicy, CorrelationID, DNT, ExpectCT, FrontEndHttps, NEL, PermissionsPolicy, ProxyConnection, Refresh, ReportTo, SaveData, SecGPC, Status, 21 TimingAllowOrigin, UpgradeInsecureRequests, XATTDeviceId, XContentDuration, XContentSecurityPolicy, XContentTypeOptions, XCorrelationID, XCsrfToken, XForwardedFor, 22 XForwardedHost, XForwardedProto, XHttpMethodOverride, XPoweredBy, XRateLimitLimit, XRateLimitRemaining, XRateLimitReset, XRealIP, XRedirectBy, XRequestID, 23 XRequestedWith, XUACompatible, XUIDH, XWapProfile, XWebKitCSP, XXSSProtection, 24 } { 25 xtesting.NotBlankString(t, header) 26 } 27 }