]> git.plutz.net Git - shcgi/commitdiff
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 94d864da2c2f014604add8588bf6bd54e20a0124..f68df8e26b92445703aee85cbd83fe63ff3a82de 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"