summaryrefslogtreecommitdiff
path: root/sys/src/cmd/mothra/snoop.c
diff options
context:
space:
mode:
authorstanley lieber <stanley.lieber@gmail.com>2011-10-03 20:27:59 -0500
committerstanley lieber <stanley.lieber@gmail.com>2011-10-03 20:27:59 -0500
commiteff23cb32e2b9842d5e104216ae8ae28227bf7d3 (patch)
treebdf0c5f670b187cfee44849adb5221c5e8c33c63 /sys/src/cmd/mothra/snoop.c
parentfce88957a47cc24d19e9db4ae062c9c80c1ebb10 (diff)
mothra: interpret files beggining with <head> as html; include <html> tag in newly created hit.html files
Diffstat (limited to 'sys/src/cmd/mothra/snoop.c')
-rw-r--r--sys/src/cmd/mothra/snoop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/cmd/mothra/snoop.c b/sys/src/cmd/mothra/snoop.c
index 3ab8075f7..da72234d9 100644
--- a/sys/src/cmd/mothra/snoop.c
+++ b/sys/src/cmd/mothra/snoop.c
@@ -18,7 +18,8 @@ snooptype(int fd)
buf[n] = 0;
if(cistrstr(buf, "<?xml") ||
cistrstr(buf, "<!DOCTYPE") ||
- cistrstr(buf, "<HTML"))
+ cistrstr(buf, "<HTML") ||
+ cistrstr(buf, "<head"))
typ = HTML;
else if(memcmp(buf, "\x1F\x8B", 2) == 0)
typ = GUNZIP;