(
self,
environ: WSGIEnvironment | None = None,
scope: dict[str, t.Any] | None = None,
)
| 387 | self.valid_methods = valid_methods |
| 388 | |
| 389 | def get_headers( |
| 390 | self, |
| 391 | environ: WSGIEnvironment | None = None, |
| 392 | scope: dict[str, t.Any] | None = None, |
| 393 | ) -> list[tuple[str, str]]: |
| 394 | headers = super().get_headers(environ, scope) |
| 395 | if self.valid_methods: |
| 396 | headers.append(("Allow", ", ".join(self.valid_methods))) |
| 397 | return headers |
| 398 | |
| 399 | |
| 400 | class NotAcceptable(HTTPException): |