| 20 | |
| 21 | |
| 22 | class NotModifiedResponse(Response): |
| 23 | NOT_MODIFIED_HEADERS = ( |
| 24 | "cache-control", |
| 25 | "content-location", |
| 26 | "date", |
| 27 | "etag", |
| 28 | "expires", |
| 29 | "vary", |
| 30 | ) |
| 31 | |
| 32 | def __init__(self, headers: Headers): |
| 33 | super().__init__( |
| 34 | status_code=304, |
| 35 | headers={name: value for name, value in headers.items() if name in self.NOT_MODIFIED_HEADERS}, |
| 36 | ) |
| 37 | |
| 38 | |
| 39 | class StaticFiles: |