summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/template-stream.lsp4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/template-stream.lsp b/app/template-stream.lsp
index d97fd11..79c828e 100644
--- a/app/template-stream.lsp
+++ b/app/template-stream.lsp
@@ -1,7 +1,9 @@
<% local viewtable, viewlibrary, pageinfo, session = ... %>
Status: 200 OK
Content-Type: <% print(viewtable.option or "application/octet-stream") %>
-Content-Length: <%= #viewtable.value %>
+<% if viewtable.length then %>
+Content-Length: <%= viewtable.length %>
+<% end %>
<% if viewtable.label ~= "" then %>
Content-Disposition: attachment; filename="<%= viewtable.label %>"
<% end %>