summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@centraldogma>2011-09-26 16:24:47 +0200
committercinap_lenrek <cinap_lenrek@centraldogma>2011-09-26 16:24:47 +0200
commit80f5df89b2dac2bfd3eb88033016a6f058c9d25d (patch)
treecd993d6403cfe2c0aaca5a4c7626864cb96c4cf3
parent22f094452eb89ff916dbb11d099470c8eb818e08 (diff)
downloadplan9front-80f5df89b2dac2bfd3eb88033016a6f058c9d25d.tar.xz
mothra: fix content handling, run uhtml only on actual html content
-rw-r--r--sys/src/cmd/mothra/mothra.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/cmd/mothra/mothra.c b/sys/src/cmd/mothra/mothra.c
index a2e0f8064..d562234d0 100644
--- a/sys/src/cmd/mothra/mothra.c
+++ b/sys/src/cmd/mothra/mothra.c
@@ -932,14 +932,14 @@ void geturl(char *urlname, int method, char *body, int cache, int map){
fd=pipeline("/bin/uncompress", fd);
else if(selection->type&GUNZIP)
fd=pipeline("/bin/gunzip", fd);
- snprint(cmd, sizeof(cmd), selection->charset[0] ?
- "/bin/uhtml -c %s" : "/bin/uhtml", selection->charset);
- fd = pipeline(cmd, fd);
switch(selection->type&~COMPRESSION){
default:
message("Bad type %x in geturl", selection->type);
break;
case HTML:
+ snprint(cmd, sizeof(cmd), selection->charset[0] ?
+ "/bin/uhtml -c %s" : "/bin/uhtml", selection->charset);
+ fd = pipeline(cmd, fd);
case PLAIN:
w = www(i = wwwtop++);
if(i >= NWWW){