summaryrefslogtreecommitdiff
path: root/dpi/vsource.c
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2010-06-06 18:05:33 +0000
committercorvid <corvid@lavabit.com>2010-06-06 18:05:33 +0000
commit4f0eda38393e95058adec360f9b4f58a86e9aa5e (patch)
tree086f952515ec6334128191def86c1e0a6c995b85 /dpi/vsource.c
parentc9a7f8fb20b32ff810a24c2a2c427ba9d4109a90 (diff)
vsource fix extraneous </pre> with empty source file
Diffstat (limited to 'dpi/vsource.c')
-rw-r--r--dpi/vsource.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dpi/vsource.c b/dpi/vsource.c
index e8eb6f34..fa43a2f2 100644
--- a/dpi/vsource.c
+++ b/dpi/vsource.c
@@ -110,7 +110,8 @@ void send_html_text(Dsh *sh, int data_size)
"<html><head>\n"
"<style type=\"text/css\">PRE {white-space: pre-wrap}\n"
"</style>\n"
- "</head><body id=\"dillo_vs\">\n<table cellpadding='0'>\n");
+ "</head>\n"
+ "<body id=\"dillo_vs\">\n<table cellpadding='0'>\n");
while (bytes_read < data_size &&
(src_str = a_Dpip_dsh_read_token(sh, 1))) {
@@ -146,7 +147,9 @@ void send_html_text(Dsh *sh, int data_size)
dFree(src_str);
}
- a_Dpip_dsh_printf(sh, 1, "</pre></table></body></html>");
+ if (data_size > 0)
+ a_Dpip_dsh_printf(sh, 0, "</pre>");
+ a_Dpip_dsh_printf(sh, 1, "</table></body></html>");
}
/*