MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / CompareLastModified

Function CompareLastModified

httpheaders/conditional.go:49–51  ·  view source on GitHub ↗

CompareLastModified compares the Last-Modified header from the response with the If-Modified-Since header from the request. It returns two boolean values: - The first boolean indicates that both Last-Modified and If-Modified-Since headers are present - The second boolean indicates that the resource

(reqHeader, respHeader http.Header)

Source from the content-addressed store, hash-verified

47// - The second boolean indicates that the resource has not been modified since the time specified
48// in the If-Modified-Since header.
49func CompareLastModified(reqHeader, respHeader http.Header) (bool, bool) {
50 return CompareLastModifiedValue(reqHeader.Get(IfModifiedSince), respHeader)
51}
52
53// CompareLastModifiedValue same as above, but accepts the raw If-Modified-Since value
54func CompareLastModifiedValue(ifModifiedSinceStr string, respHeader http.Header) (bool, bool) {

Callers 1

IsNotModifiedFunction · 0.92

Calls 2

CompareLastModifiedValueFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected