mailcap.c (acceptableMimeTypes): change default accept: line

w3m should prefer text/html to other text/*.
    reported as Debian Bug#374296
This commit is contained in:
Fumitoshi UKAI
2006-08-07 03:10:26 +00:00
parent 755718c883
commit 8010a800b0
2 changed files with 12 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: mailcap.c,v 1.12 2003/01/17 17:06:04 ukai Exp $ */
/* $Id: mailcap.c,v 1.13 2006/08/07 03:10:26 ukai Exp $ */
#include "fm.h"
#include "myctype.h"
#include <stdio.h>
@@ -252,7 +252,7 @@ acceptableMimeTypes()
/* generate acceptable media types */
l = newTextList();
mhash = newHash_si(16); /* XXX */
pushText(l, "text");
/* pushText(l, "text"); */
putHash_si(mhash, "text", 1);
pushText(l, "image");
putHash_si(mhash, "image", 1);
@@ -272,11 +272,10 @@ acceptableMimeTypes()
}
}
}
types = Strnew();
Strcat_charp(types, "text/html, text/*;q=0.5");
while ((p = popText(l)) != NULL) {
if (types == NULL)
types = Strnew();
else
Strcat_charp(types, ", ");
Strcat_charp(types, ", ");
Strcat_charp(types, p);
Strcat_charp(types, "/*");
}