From 68ad0ca57a74f0c4fa038384215b2e307625db00 Mon Sep 17 00:00:00 2001 From: LV-426 Date: Wed, 4 Feb 2015 02:45:21 +0200 Subject: make_response__http__pre_tag_wrapped() --- src/server/rz_req_handling.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/server/rz_req_handling.py') diff --git a/src/server/rz_req_handling.py b/src/server/rz_req_handling.py index 9d3e0b44..53344170 100644 --- a/src/server/rz_req_handling.py +++ b/src/server/rz_req_handling.py @@ -22,6 +22,17 @@ def make_response__http__empty(status=200): resp.status = str(status) return resp +def make_response__http__pre_tag_wrapped(html_str, status=200): + """ + Construct a '
' tag wrapped HTTP response
+    """
+    resp_arr = ['',
+                '
',
+                html_str,
+                '
' + ] + return (''.join(resp_arr), 200) + def make_response__json__html(status=200, html_str=''): """ Construct a json response with HTML payload -- cgit v1.3.1