Skip to content

Commit 101a23b

Browse files
committed
if-modified-since matching
1 parent 1778d1c commit 101a23b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/reactpy/asgi/standalone.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ async def __call__(
102102
)
103103

104104
# Browser already has the content cached
105-
if request_headers.get(b"if-none-match") == self._etag.encode():
105+
if (
106+
request_headers.get(b"if-none-match") == self._etag.encode()
107+
or request_headers.get(b"if-modified-since") == self._last_modified.encode()
108+
):
106109
response_headers.pop("content-length")
107110
return await http_response(
108111
send=send,

0 commit comments

Comments
 (0)