PyDocs

Nav

Internet Protocols and Support

BaseHandler.sendfile

  • BaseHandler.sendfile()
Platform-specific file transmission

Override this method in subclasses to support platform-specific
file transmission.  It is only called if the application's
return iterable ('self.result') is an instance of
'self.wsgi_file_wrapper'.

This method should return a true value if it was able to actually
transmit the wrapped file-like object using a platform-specific
approach.  It should return a false value if normal iteration
should be used instead.  An exception can be raised to indicate
that transmission was attempted, but failed.

NOTE: this method should call 'self.send_headers()' if
'self.headers_sent' is false and it is going to attempt direct
transmission of the file.
0 Examples
No examples for wsgiref.handlers/BaseHandler.sendfile.
See Also
No see-alsos for wsgiref.handlers/BaseHandler.sendfile
0 Notes
No notes for BaseHandler.sendfile