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)
| 47 | // - The second boolean indicates that the resource has not been modified since the time specified |
| 48 | // in the If-Modified-Since header. |
| 49 | func 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 |
| 54 | func CompareLastModifiedValue(ifModifiedSinceStr string, respHeader http.Header) (bool, bool) { |
no test coverage detected