Make some template & config changes.
authorJason Stephenson <jason@sigio.com>
Thu, 26 Jun 2014 23:07:46 +0000 (19:07 -0400)
committerJason Stephenson <jason@sigio.com>
Sat, 19 Jul 2014 15:20:34 +0000 (11:20 -0400)
Set the default MIME type in config.yml based on the Z39.83 spec.

Move the </NCIPMessage> tag to a new include file, footer.inc.

Signed-off-by: Jason Stephenson <jason@sigio.com>
config.yml
templates/includes/footer.inc [new file with mode: 0644]
templates/main.tt
templates/problem.tt
templates/response.tt

index 88bfacd..930ebd2 100644 (file)
@@ -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 (file)
index 0000000..844f1d4
--- /dev/null
@@ -0,0 +1 @@
+</NCIPMessage>
index 2bb7541..011b210 100644 (file)
@@ -1,3 +1,5 @@
 [% INCLUDE 'includes/header.inc' %]
 
 [% content %]
+
+[% INCLUDE 'includes/footer.inc' %]
index ef93460..1dd2fea 100644 (file)
@@ -41,5 +41,4 @@
       <ProblemDetail>[% error_detail | xml %]</ProblemDetail>
     </Problem>
   </[% messagetype %]>
-</NCIPMessage>
 
index eaf6bc9..0c77300 100644 (file)
@@ -10,6 +10,5 @@
     [% myfile = "includes/$messagetype" _ ".inc" %]
     [% INCLUDE $myfile %]    
     </[% messagetype %]>
-</NCIPMessage>