Resets all headers and content for this response.
(self)
| 317 | self.request._body_future.exception() |
| 318 | |
| 319 | def clear(self) -> None: |
| 320 | """Resets all headers and content for this response.""" |
| 321 | self._headers = httputil.HTTPHeaders( |
| 322 | { |
| 323 | "Server": "TornadoServer/%s" % tornado.version, |
| 324 | "Content-Type": "text/html; charset=UTF-8", |
| 325 | "Date": httputil.format_timestamp(time.time()), |
| 326 | } |
| 327 | ) |
| 328 | self.set_default_headers() |
| 329 | self._write_buffer = [] # type: List[bytes] |
| 330 | self._status_code = 200 |
| 331 | self._reason = httputil.responses[200] |
| 332 | |
| 333 | def set_default_headers(self) -> None: |
| 334 | """Override this to set HTTP headers at the beginning of the request. |
no test coverage detected