Method
redirect
(self, connection: ServerConnection, url: str)
Source from the content-addressed store, hash-verified
| 180 | return self.server_name |
| 181 | |
| 182 | def redirect(self, connection: ServerConnection, url: str) -> Response: |
| 183 | response = connection.respond(http.HTTPStatus.FOUND, f"Found at {url}") |
| 184 | response.headers["Location"] = url |
| 185 | return response |
| 186 | |
| 187 | def not_found(self, connection: ServerConnection) -> Response: |
| 188 | return connection.respond(http.HTTPStatus.NOT_FOUND, "Not Found") |
Tested by
no test coverage detected