Changeset - 4c51e45a770b
[Not reviewed]
0 1 0
cyrill - 9 months ago 2021-01-30 17:21:41
ake@headake.win
Fixed file serving
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
files.py
Show inline comments
 
@@ -31,7 +31,7 @@ def file_access(request, path):
 
            return SerpensResponse('\n'.join(output).encode('utf-8'), 20, 'text/gemini')
 
    elif os.path.isfile(full_path):
 
        mediatype = mimetypes.guess_type(full_path)[0] or 'application/octet-stream'
 
        with open(full_path + '/index.gmi', 'rb') as f:
 
        with open(full_path, 'rb') as f:
 
            return SerpensResponse(f.read(), 20, mediatype=mediatype)
 
    else:
 
        return error('Not found', 51)
0 comments (0 inline, 0 general)