fresh
fresh copied to clipboard
HTTP request freshness testing
Use headers from http.IncomingMessage / http.OutgoingMessage, while providing backward compatibility. Also including test cases.
Right now the signature is `fresh(reqHeaders, resHeaders)`, which is of course nice for being agnostic, but slightly lame. I don't think we should remove this "agnostic-ness" per-se, but it would...
It appears that fresh has copy-pasted logic from `send` related to etag handling. This commit should probably be copied in it's entirety over to fresh, right? : https://github.com/pillarjs/send/commit/aeb69c607bd01be2009c1ec822dab36151544421 It does...
According to the latest [HTTP RFC](https://www.rfc-editor.org/rfc/rfc9110.html#name-if-none-match), > A recipient MUST ignore If-Modified-Since if the request contains an [If-None-Match](https://www.rfc-editor.org/rfc/rfc9110.html#field.if-none-match) header field; the condition in [If-None-Match](https://www.rfc-editor.org/rfc/rfc9110.html#field.if-none-match) is considered to be a more...
### Main Changes Expect return true immediately if If-None-Match matches the ETag header. ### Context Closes https://github.com/jshttp/fresh/issues/35