Resets all headers and content for this response.
(self)
| 331 | self.request._body_future.exception() |
| 332 | |
| 333 | def clear(self) -> None: |
| 334 | """Resets all headers and content for this response.""" |
| 335 | self._headers = httputil.HTTPHeaders( |
| 336 | { |
| 337 | "Server": "TornadoServer/%s" % tornado.version, |
| 338 | "Content-Type": "text/html; charset=UTF-8", |
| 339 | "Date": httputil.format_timestamp(time.time()), |
| 340 | } |
| 341 | ) |
| 342 | self.set_default_headers() |
| 343 | self._write_buffer = [] # type: List[bytes] |
| 344 | self._status_code = 200 |
| 345 | self._reason = httputil.responses[200] |
| 346 | |
| 347 | def set_default_headers(self) -> None: |
| 348 | """Override this to set HTTP headers at the beginning of the request. |
no test coverage detected