mirror of
https://github.com/kataras/iris.git
synced 2025-12-24 05:17:03 +00:00
Cleanup of some old code
Remove the StaticCacheDuration unused package-level variable from context/context.go and /core/router/api_builder.go it should be removed a year ago, now all the cache funcs and middlewares accept their own options | Remove duplicated header keys that are used on both context/context.go and core/router/fs.go by exporting context's one. Former-commit-id: 2a5c840d26b32144d2b5b3173a1e4bb4324cecba
This commit is contained in:
@@ -517,8 +517,8 @@ func serveContent(ctx context.Context, name string, modtime time.Time, sizeFunc
|
||||
}()
|
||||
}
|
||||
ctx.Header("Accept-Ranges", "bytes")
|
||||
if ctx.ResponseWriter().Header().Get(contentEncodingHeaderKey) == "" {
|
||||
ctx.Header(contentLengthHeaderKey, strconv.FormatInt(sendSize, 10))
|
||||
if ctx.ResponseWriter().Header().Get(context.ContentEncodingHeaderKey) == "" {
|
||||
ctx.Header(context.ContentLengthHeaderKey, strconv.FormatInt(sendSize, 10))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user