From 6dcd10b920981deac82c4a44f04d48c0c80ed2d1 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Thu, 26 Jun 2014 19:07:46 -0400 Subject: [PATCH] Make some template & config changes. Set the default MIME type in config.yml based on the Z39.83 spec. Move the tag to a new include file, footer.inc. Signed-off-by: Jason Stephenson --- config.yml | 3 +++ templates/includes/footer.inc | 1 + templates/main.tt | 2 ++ templates/problem.tt | 1 - templates/response.tt | 1 - 5 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 templates/includes/footer.inc diff --git a/config.yml b/config.yml index 88bfacd..930ebd2 100644 --- a/config.yml +++ b/config.yml @@ -28,3 +28,6 @@ engines: start_tag: '[%' end_tag: '%]' +# default MIME type for the responses. +# (See ANSI/NISO Z39.83-2-2012 Section 7.3, page 13.) +default_mime_type: "application/xml; charset='utf-8'" diff --git a/templates/includes/footer.inc b/templates/includes/footer.inc new file mode 100644 index 0000000..844f1d4 --- /dev/null +++ b/templates/includes/footer.inc @@ -0,0 +1 @@ + diff --git a/templates/main.tt b/templates/main.tt index 2bb7541..011b210 100644 --- a/templates/main.tt +++ b/templates/main.tt @@ -1,3 +1,5 @@ [% INCLUDE 'includes/header.inc' %] [% content %] + +[% INCLUDE 'includes/footer.inc' %] diff --git a/templates/problem.tt b/templates/problem.tt index ef93460..1dd2fea 100644 --- a/templates/problem.tt +++ b/templates/problem.tt @@ -41,5 +41,4 @@ [% error_detail | xml %] - diff --git a/templates/response.tt b/templates/response.tt index eaf6bc9..0c77300 100644 --- a/templates/response.tt +++ b/templates/response.tt @@ -10,6 +10,5 @@ [% myfile = "includes/$messagetype" _ ".inc" %] [% INCLUDE $myfile %] - -- 2.43.2