MCPcopy
hub / github.com/nirui/sshwifty / clientContentModifiedSince

Function clientContentModifiedSince

application/controller/common.go:61–75  ·  view source on GitHub ↗
(r *http.Request, mod time.Time)

Source from the content-addressed store, hash-verified

59}
60
61func clientContentModifiedSince(r *http.Request, mod time.Time) bool {
62 d := r.Header.Get("If-Modified-Since")
63
64 if len(d) < 0 {
65 return false
66 }
67
68 dt, dtErr := time.Parse(time.RFC1123, d)
69
70 if dtErr != nil {
71 return false
72 }
73
74 return !mod.Before(dt)
75}

Callers 1

serveStaticDataFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected