lib/rack-xslview.rb in rack-xslview-0.1.0 vs lib/rack-xslview.rb in rack-xslview-0.1.1
- old
+ new
@@ -36,11 +36,12 @@
if ((parts.include? "<html") || !(parts.include? "<"))
[status, headers, body]
else
headers.delete('Content-Length')
@xslt.xml = parts
- newbody = @xslt.serve
- headers['Content-Length'] = newbody.length.to_s
+ newbody = []
+ newbody << @xslt.serve
+ headers['Content-Length'] = newbody.to_s.length.to_s
[status, headers, newbody]
end
end
end