MCPcopy Index your code
hub / github.com/python/cpython / finish_content

Method finish_content

Lib/wsgiref/handlers.py:326–334  ·  view source on GitHub ↗

Ensure headers and content have both been sent

(self)

Source from the content-addressed store, hash-verified

324
325
326 def finish_content(self):
327 """Ensure headers and content have both been sent"""
328 if not self.headers_sent:
329 # Only zero Content-Length if not set by the application (so
330 # that HEAD requests can be satisfied properly, see #3839)
331 self.headers.setdefault('Content-Length', "0")
332 self.send_headers()
333 else:
334 pass # XXX check if content-length was too short?
335
336 def close(self):
337 """Close the iterable (if needed) and reset all instance vars

Callers 1

finish_responseMethod · 0.95

Calls 2

send_headersMethod · 0.95
setdefaultMethod · 0.45

Tested by

no test coverage detected