diff options
| author | ianb <devnull@localhost> | 2006-09-25 17:50:51 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2006-09-25 17:50:51 +0000 |
| commit | 71b94e30a52613047204a8bbd3cae5bbb348bb23 (patch) | |
| tree | cbfb8a1eaec2d7b5f9fe52058723f2ef053da455 /paste/fileapp.py | |
| parent | 0b574fd050373ee2666d26f4cc53d736c396e95d (diff) | |
| download | paste-71b94e30a52613047204a8bbd3cae5bbb348bb23.tar.gz | |
Make fileapp.DataApp directly usable, plus handle empty content properly
Diffstat (limited to 'paste/fileapp.py')
| -rw-r--r-- | paste/fileapp.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/paste/fileapp.py b/paste/fileapp.py index 5d72008..62dbe1a 100644 --- a/paste/fileapp.py +++ b/paste/fileapp.py @@ -66,7 +66,7 @@ class DataApp(object): ACCEPT_RANGES.update(self.headers,bytes=True) if not CONTENT_TYPE(self.headers): CONTENT_TYPE.update(self.headers) - if content: + if content is not None: self.set_content(content) def cache_control(self, **kwargs): @@ -138,7 +138,6 @@ class DataApp(object): start_response('206 Partial Content', headers) if self.content is not None: return [self.content[lower:upper+1]] - assert self.__class__ != DataApp, "DataApp must call set_content" return (lower, content_length) class FileApp(DataApp): |
