mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-10 00:42:06 +00:00
Ensure we always set Content-Length when getting the web_sync_timestamp
This is required by our own automirror scripts...
This commit is contained in:
@ -145,8 +145,10 @@ def system_information(request):
|
|||||||
# Basically just a check that we can access the backend still...
|
# Basically just a check that we can access the backend still...
|
||||||
@cache(seconds=30)
|
@cache(seconds=30)
|
||||||
def sync_timestamp(request):
|
def sync_timestamp(request):
|
||||||
return HttpResponse(datetime.now().strftime("%Y-%m-%d %H:%M:%S\n"),
|
s = datetime.now().strftime("%Y-%m-%d %H:%M:%S\n")
|
||||||
mimetype='text/plain')
|
r = HttpResponse(s, mimetype='text/plain')
|
||||||
|
r['Content-Length'] = len(s)
|
||||||
|
return r
|
||||||
|
|
||||||
# List of all unapproved objects, for the special admin page
|
# List of all unapproved objects, for the special admin page
|
||||||
@login_required
|
@login_required
|
||||||
|
Reference in New Issue
Block a user