Mercurial > p > roundup > code
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 4046:48be910ebda1 | 4047:e70643990e9c |
|---|---|
| 75 | 75 |
| 76 def end_headers(self): | 76 def end_headers(self): |
| 77 """NOOP. There aint no such thing as 'end_headers' in mod_python""" | 77 """NOOP. There aint no such thing as 'end_headers' in mod_python""" |
| 78 pass | 78 pass |
| 79 | 79 |
| 80 | |
| 81 def sendfile(self, filename, offset = 0, len = -1): | |
| 82 """Send 'filename' to the user.""" | |
| 83 | |
| 84 return self._req.sendfile(filename, offset, len) | |
| 85 | |
| 86 | |
| 80 def handler(req): | 87 def handler(req): |
| 81 """HTTP request handler""" | 88 """HTTP request handler""" |
| 82 _options = req.get_options() | 89 _options = req.get_options() |
| 83 _home = _options.get("TrackerHome") | 90 _home = _options.get("TrackerHome") |
| 84 _lang = _options.get("TrackerLanguage") | 91 _lang = _options.get("TrackerLanguage") |
