Mercurial > p > roundup > code
diff roundup/cgi/apache.py @ 4047:e70643990e9c
Support the use of sendfile() for file transfer, if available.
| author | Stefan Seefeld <stefan@seefeld.name> |
|---|---|
| date | Tue, 17 Feb 2009 04:32:34 +0000 |
| parents | a2d22d0de0bc |
| children | 302bc481ceb1 |
line wrap: on
line diff
--- a/roundup/cgi/apache.py Tue Feb 17 02:38:08 2009 +0000 +++ b/roundup/cgi/apache.py Tue Feb 17 04:32:34 2009 +0000 @@ -77,6 +77,13 @@ """NOOP. There aint no such thing as 'end_headers' in mod_python""" pass + + def sendfile(self, filename, offset = 0, len = -1): + """Send 'filename' to the user.""" + + return self._req.sendfile(filename, offset, len) + + def handler(req): """HTTP request handler""" _options = req.get_options()
