Ensure headers and content have both been sent
(self)
| 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 |
no test coverage detected