allow pages to insert http headers
authorpaul <paul@plutz.net>
Wed, 11 May 2016 12:42:45 +0000 (12:42 +0000)
committerpaul <paul@plutz.net>
Wed, 11 May 2016 12:42:45 +0000 (12:42 +0000)
svn path=/trunk/; revision=30

page.sh

diff --git a/page.sh b/page.sh
index 94d864d..f68df8e 100755 (executable)
--- a/page.sh
+++ b/page.sh
@@ -17,8 +17,6 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with shcgi.  If not, see <http://www.gnu.org/licenses/>. 
 
-printf "Content-Type: text/html;charset=utf-8\n\n"
-
 [ -z "$NAVIGATION" ] \
 && NAVIGATION=($(printf %s\\n "${_EXEC}"/pages/*.sh |sed -r 's;^.*/([^/]*)\.sh$;\1;'))
 
@@ -26,4 +24,6 @@ CSS="${CSS:-${_EXEC}/templates/${PAGE}.css.sh}"
 BODY="${BODY:-${_EXEC}/templates/${PAGE}.html.sh}"
 
 . "${_EXEC}/pages/${PAGE}.sh"
+
+printf "Content-Type: text/html;charset=utf-8\r\n\r\n"
 . "${_EXEC}/templates/frame.html.sh"