cubicweb/web/views/staticcontrollers.py
changeset 12310 aa999699e504
parent 12223 79d243a2f0c5
--- a/cubicweb/web/views/staticcontrollers.py	Thu May 03 14:05:26 2018 +0200
+++ b/cubicweb/web/views/staticcontrollers.py	Thu May 03 16:47:51 2018 +0200
@@ -58,7 +58,7 @@
         debugmode = self._cw.vreg.config.debugmode
         if osp.isdir(path):
             if self.directory_listing_allowed:
-                return u''
+                return b''
             raise Forbidden(path)
         if not osp.isfile(path):
             raise NotFound()
@@ -79,7 +79,7 @@
         # Real production environment should use dedicated static file serving.
         self._cw.set_header('last-modified', generateDateTime(os.stat(path).st_mtime))
         if self._cw.is_client_cache_valid():
-            return ''
+            return b''
         mimetype, encoding = mimetypes.guess_type(path)
         if mimetype is None:
             mimetype = 'application/octet-stream'