diff options
| author | 2011-02-02 22:10:56 +0100 | |
|---|---|---|
| committer | 2011-02-02 22:10:56 +0100 | |
| commit | 5f29a0420addb405953cd7a633cfa7ea46409142 (patch) | |
| tree | 255ceff7314c7d7c2d140855f58d231376b949f1 | |
| parent | removed django => now using bottle, new builtin threaded ssl server (diff) | |
| download | pyload-5f29a0420addb405953cd7a633cfa7ea46409142.tar.xz | |
little fixes
| -rw-r--r-- | module/lib/bottle.py | 3 | ||||
| -rw-r--r-- | module/web/pyload_app.py | 7 | 
2 files changed, 5 insertions, 5 deletions
| diff --git a/module/lib/bottle.py b/module/lib/bottle.py index 8f2be9e81..67774521a 100644 --- a/module/lib/bottle.py +++ b/module/lib/bottle.py @@ -110,7 +110,8 @@ try:      except ImportError: # pragma: no cover          from simplejson import dumps as json_dumps  except ImportError: # pragma: no cover -    json_dumps = None +    import pprint # hope it works +    json_dumps = pprint  if sys.version_info >= (3,0,0): # pragma: no cover      # See Request.POST diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py index ab0cbfb00..28c9f03fb 100644 --- a/module/web/pyload_app.py +++ b/module/web/pyload_app.py @@ -26,7 +26,6 @@ import os  import sqlite3  import time  from os import listdir -from os import stat  from os.path import isdir  from os.path import isfile  from os.path import join @@ -39,7 +38,7 @@ from bottle import route, static_file, request, response, redirect, HTTPError  from webinterface import PYLOAD, PROJECT_DIR  from utils import render_to_response, parse_permissions, parse_userdata, formatSize, login_required -from filters import relpath, quotepath, unquotepath +from filters import relpath, unquotepath  # Helper @@ -65,8 +64,8 @@ def base(messages):  @route('/media/:path#.+#')  def server_static(path): -    response.header['Expires'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime(time.time() + 60 * 60 * 24 * 7)) -    response.header['Cache-control'] = "public" +    response.headers['Expires'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime(time.time() + 60 * 60 * 24 * 7)) +    response.headers['Cache-control'] = "public"      return static_file(path, root=join(PROJECT_DIR, "media"))  @route('/favicon.ico') | 
