|
a/src/internfile/mimehandler.cpp |
|
b/src/internfile/mimehandler.cpp |
|
... |
|
... |
35 |
#include "mh_execm.h"
|
35 |
#include "mh_execm.h"
|
36 |
#include "mh_html.h"
|
36 |
#include "mh_html.h"
|
37 |
#include "mh_mail.h"
|
37 |
#include "mh_mail.h"
|
38 |
#include "mh_mbox.h"
|
38 |
#include "mh_mbox.h"
|
39 |
#include "mh_text.h"
|
39 |
#include "mh_text.h"
|
|
|
40 |
#include "mh_symlink.h"
|
40 |
#include "mh_unknown.h"
|
41 |
#include "mh_unknown.h"
|
41 |
#include "ptmutex.h"
|
42 |
#include "ptmutex.h"
|
42 |
|
43 |
|
43 |
// Performance help: we use a pool of already known and created
|
44 |
// Performance help: we use a pool of already known and created
|
44 |
// handlers. There can be several instances for a given mime type
|
45 |
// handlers. There can be several instances for a given mime type
|
|
... |
|
... |
146 |
LOGDEB2(("mhFactory(%s): returning MimeHandlerMbox\n", mime.c_str()));
|
147 |
LOGDEB2(("mhFactory(%s): returning MimeHandlerMbox\n", mime.c_str()));
|
147 |
return new MimeHandlerMbox(config, lmime);
|
148 |
return new MimeHandlerMbox(config, lmime);
|
148 |
} else if ("message/rfc822" == lmime) {
|
149 |
} else if ("message/rfc822" == lmime) {
|
149 |
LOGDEB2(("mhFactory(%s): returning MimeHandlerMail\n", mime.c_str()));
|
150 |
LOGDEB2(("mhFactory(%s): returning MimeHandlerMail\n", mime.c_str()));
|
150 |
return new MimeHandlerMail(config, lmime);
|
151 |
return new MimeHandlerMail(config, lmime);
|
|
|
152 |
} else if ("inode/symlink" == lmime) {
|
|
|
153 |
LOGDEB2(("mhFactory(%s): ret MimeHandlerSymlink\n", mime.c_str()));
|
|
|
154 |
return new MimeHandlerSymlink(config, lmime);
|
151 |
} else if (lmime.find("text/") == 0) {
|
155 |
} else if (lmime.find("text/") == 0) {
|
152 |
// Try to handle unknown text/xx as text/plain. This
|
156 |
// Try to handle unknown text/xx as text/plain. This
|
153 |
// only happen if the text/xx was defined as "internal" in
|
157 |
// only happen if the text/xx was defined as "internal" in
|
154 |
// mimeconf, not at random. For programs, for example this
|
158 |
// mimeconf, not at random. For programs, for example this
|
155 |
// allows indexing and previewing as text/plain (no filter
|
159 |
// allows indexing and previewing as text/plain (no filter
|