aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2021-11-03 21:30:43 +0100
committercbdev <cb@cbcdn.com>2021-11-03 21:30:43 +0100
commit6b7719b11f4a97dd8a7a34f5166dd410f8fa52cb (patch)
treea9afc30394573e1721b36ed49b4f34e226140eff
parent41da59d389f27d5a9c228b5d756de6f2cd7a49de (diff)
downloadcargohold-6b7719b11f4a97dd8a7a34f5166dd410f8fa52cb.tar.gz
cargohold-6b7719b11f4a97dd8a7a34f5166dd410f8fa52cb.tar.bz2
cargohold-6b7719b11f4a97dd8a7a34f5166dd410f8fa52cb.zip
Fix default mimetype, change license date
-rw-r--r--LICENSE.txt2
-rw-r--r--README.md6
-rw-r--r--TODO1
-rw-r--r--backend/main.py6
4 files changed, 11 insertions, 4 deletions
diff --git a/LICENSE.txt b/LICENSE.txt
index 95db371..1857e10 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2017, cbdev/Fabian J. Stumpf
+Copyright (c) 2021, cbdev/Fabian J. Stumpf
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/README.md b/README.md
index f99f0b6..dbbdc6f 100644
--- a/README.md
+++ b/README.md
@@ -7,3 +7,9 @@ that lets them download or view the files you want them to have.
## Installation
TBD
+
+## Usage
+
+TBD
+
+## Interface
diff --git a/TODO b/TODO
index f6bdfe4..14cc4c1 100644
--- a/TODO
+++ b/TODO
@@ -3,3 +3,4 @@ HTML-only frontend
User-facing administration panel
Pluggable authentication
Automatic resizing for gallery mode
+Link titles
diff --git a/backend/main.py b/backend/main.py
index bbb853d..085599c 100644
--- a/backend/main.py
+++ b/backend/main.py
@@ -5,8 +5,8 @@ import os
import sqlite3
import mimetypes
-def playout(filename, content = "text/html"):
- return ["", [('Content-Type', content if content else "application/binary"), ("X-Accel-Redirect", filename)], None]
+def playout(filename, content = "application/octet-stream"):
+ return ["", [('Content-Type', content), ("X-Accel-Redirect", filename)], None]
def home():
return ["", [('Content-Type','text/html'), ("Location", config.homepage)], "302 Home"]
@@ -92,7 +92,7 @@ def route(path, env, session, post):
if len(path) > 1 and path[1] == "preview" and session["display"] == "gallery":
return playout("/data/" + target_filename_internal(session, "preview/" + path[2]), mimetypes.guess_type(path[2])[0])
- return playout("/interface/listing.htm")
+ return playout("/interface/listing.htm", "text/html")
def handle_request(env, response):
path = env.get('PATH_INFO', '').lstrip('/').split('/')