From ac7eb8ac9d9d03e584a570ac1aac5ff8e015914d Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Thu, 4 Jan 2024 21:55:03 -0800 Subject: [PATCH] staticweb: Generate HTML5 pages HTML 4.01 is so 1999. Closes-Bug: #2047679 Change-Id: Ic5a68998222709ab088caafe9dbea2b726db38c6 --- swift/common/middleware/staticweb.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/swift/common/middleware/staticweb.py b/swift/common/middleware/staticweb.py index c01f720f14..df52bb0ebd 100644 --- a/swift/common/middleware/staticweb.py +++ b/swift/common/middleware/staticweb.py @@ -240,8 +240,7 @@ class _StaticWebContext(WSGIContext): '/'.join(groups[4:])) if not config_true_value(self._listings): - body = '\n' \ + body = '\n' \ '\n' \ '\n' \ 'Listing of %s\n' % html_escape(label) @@ -286,8 +285,7 @@ class _StaticWebContext(WSGIContext): resp = HTTPNotFound()(env, self._start_response) return self._error_response(resp, env, start_response) headers = {'Content-Type': 'text/html; charset=UTF-8'} - body = '\n' \ + body = '\n' \ '\n' \ ' \n' \ ' Listing of %s\n' % \