This commit is contained in:
zzq 2024-01-17 13:41:12 +08:00 committed by ginuerzh
parent 13b9748c9c
commit 7e1af1b557
2 changed files with 2 additions and 2 deletions

View File

@ -379,7 +379,7 @@ func (h *httpHandler) authenticate(conn net.Conn, req *http.Request, resp *http.
} else {
resp.Header = http.Header{}
resp.Header.Set("Server", "nginx/1.14.1")
resp.Header.Set("Date", time.Now().Format(http.TimeFormat))
resp.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat))
if resp.StatusCode == http.StatusOK {
resp.Header.Set("Connection", "keep-alive")
}

View File

@ -539,7 +539,7 @@ func (h *http2Handler) authenticate(w http.ResponseWriter, r *http.Request, resp
} else {
resp.Header = http.Header{}
resp.Header.Set("Server", "nginx/1.14.1")
resp.Header.Set("Date", time.Now().Format(http.TimeFormat))
resp.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat))
if resp.ContentLength > 0 {
resp.Header.Set("Content-Type", "text/html")
}