diff options
| -rw-r--r-- | docs/news.txt | 3 | ||||
| -rw-r--r-- | paste/fileapp.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/news.txt b/docs/news.txt index 4087f12..03f2168 100644 --- a/docs/news.txt +++ b/docs/news.txt @@ -12,6 +12,9 @@ News * Fix use of ``TestApp().post(params={'key': ['list of', 'values']})`` as reported by Syver Enstad. +* ``paste.fileapp.DataApp`` is now directly usable (was previously + only usable as an abstract base class). + 0.9.8 ----- 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): |
