libs/web: don't send Status: 500 in error500() if header is already sent
[project/luci.git] / modules / admin-core / luasrc / view / header.htm
index 6625e46..77018b1 100644 (file)
@@ -12,4 +12,10 @@ You may obtain a copy of the License at
 $Id$
 
 -%>
-<% include("themes/" .. theme .. "/header") %>
\ No newline at end of file
+
+<%
+       if not luci.dispatcher.context.template_header_sent then
+               include("themes/" .. theme .. "/header")
+               luci.dispatcher.context.template_header_sent = true
+       end
+%>