lib/siteleaf/server.rb in siteleaf-0.8.0 vs lib/siteleaf/server.rb in siteleaf-0.8.1

- old
+ new

@@ -57,10 +57,14 @@ template_data = template_data.gsub(include_tags) { |i| File.read("_#{$1}.html") } end end output = site.preview(url, template_data) - [200, {'Content-Type' => output.headers[:content_type]}, [output]] + if output.respond_to?('headers') + [200, {'Content-Type' => output.headers[:content_type]}, [output]] + else + [200, {'Content-Type' => 'text/html'}, [output]] + end end end end end end \ No newline at end of file