MCPcopy
hub / github.com/opendevops-cn/opendevops / clear

Method clear

scripts/tornado_source_code/tornado/web.py:319–331  ·  view source on GitHub ↗

Resets all headers and content for this response.

(self)

Source from the content-addressed store, hash-verified

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.

Callers 2

__init__Method · 0.95
send_errorMethod · 0.95

Calls 2

set_default_headersMethod · 0.95
timeMethod · 0.80

Tested by

no test coverage detected