summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2017-05-23 09:23:53 -0700
committerEd Tanous <ed.tanous@intel.com>2017-05-23 09:23:53 -0700
commit0d485ef9356f5c8ffe762877cfd2cb44ffb1789b (patch)
tree1e11cd76f9a725f9aff565348e12d99c369af649 /scripts
parent97099e757486df9f9315aad17193365b28866d37 (diff)
downloadbmcweb-0d485ef9356f5c8ffe762877cfd2cb44ffb1789b.tar.gz
bmcweb-0d485ef9356f5c8ffe762877cfd2cb44ffb1789b.zip
Incremental
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_web_assets.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/build_web_assets.py b/scripts/build_web_assets.py
index 955f21e..46bf199 100755
--- a/scripts/build_web_assets.py
+++ b/scripts/build_web_assets.py
@@ -36,7 +36,7 @@ CPP_MIDDLE_BUFFER = """ CROW_ROUTE(app, "{relative_path_sha1}")
res.code = 200;
// TODO, if you have a browser from the dark ages that doesn't support gzip,
// unzip it before sending based on Accept-Encoding header
- res.add_header("Content-Encoding", "{content_encoding}");
+ res.add_header("Content-Encoding", {content_encoding});
res.add_header("Content-Type", "{content_type}");
res.write(staticassets::{relative_path_escaped});
@@ -242,6 +242,8 @@ def main():
"\n"
"namespace crow {\n"
"namespace webassets {\n"
+ "static const std::string gzip_string = \"gzip\";\n"
+ "static const std::string none_string = \"none\";\n"
)
hpp_output.write("struct staticassets {\n")
@@ -273,7 +275,7 @@ def main():
get_sha1_path_from_relative(relative_path, sha1)
#print("relative_path_sha1: " + relative_path_sha1)
#print("sha1: " + sha1)
- content_encoding = 'gzip' if gzip_content else 'none'
+ content_encoding = 'gzip_string' if gzip_content else 'none_string'
environment = {
'relative_path': relative_path,
OpenPOWER on IntegriCloud