Skip to content

Commit

Permalink
fix: last modified use GMT
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Dec 24, 2018
1 parent aa59f0c commit 42cb6ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions middleware/static_serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"path/filepath"
"strconv"
"strings"
"time"

"github.com/vicanso/cod"
"github.com/vicanso/errors"
Expand Down Expand Up @@ -212,7 +211,7 @@ func NewStaticServe(staticFile StaticFile, config StaticServeConfig) cod.Handler
if !config.DisableLastModified {
fileInfo := staticFile.Stat(file)
if fileInfo != nil {
lmd := fileInfo.ModTime().UTC().Format(time.RFC1123)
lmd := fileInfo.ModTime().UTC().Format("Mon, 02 Jan 2006 15:04:05 GMT")
c.SetHeader(cod.HeaderLastModified, lmd)
}
}
Expand Down

0 comments on commit 42cb6ab

Please sign in to comment.