File diff 4c3661ad190a → 69725698aeae
www/conservancy/static/views.py
Show inline comments
...
 
@@ -32,12 +32,7 @@ def index(request, *args, **kwargs):
 
    path = request.path.lstrip(u'/')
 
    if path.endswith(u'/'):
 
        path += u'index.html'
 
    try:
 
        path_bytes = path.encode(FILESYSTEM_ENCODING)
 
    except UnicodeEncodeError:
 
        # If the path can't be expressed on the filesystem, it must not exist.
 
        return handler404(request)
 
    fullpath = os.path.join(STATIC_ROOT, path_bytes)
 
    fullpath = os.path.join(STATIC_ROOT, path)
 
    if not os.path.exists(fullpath):
 
        return handler404(request)
 
    content_type, _ = mimetypes.guess_type(path)