|
a/src/internfile/mimehandler.cpp |
|
b/src/internfile/mimehandler.cpp |
|
... |
|
... |
139 |
lmime.c_str()));
|
139 |
lmime.c_str()));
|
140 |
return new MimeHandlerUnknown(config, lmime);
|
140 |
return new MimeHandlerUnknown(config, lmime);
|
141 |
}
|
141 |
}
|
142 |
}
|
142 |
}
|
143 |
|
143 |
|
|
|
144 |
static const string cstr_mh_charset("charset");
|
144 |
/**
|
145 |
/**
|
145 |
* Create a filter that executes an external program or script
|
146 |
* Create a filter that executes an external program or script
|
146 |
* A filter def can look like:
|
147 |
* A filter def can look like:
|
147 |
* someprog -v -t " h i j";charset= xx; mimetype=yy
|
148 |
* someprog -v -t " h i j";charset= xx; mimetype=yy
|
148 |
* A semi-colon list of attr=value pairs may come after the exec spec.
|
149 |
* A semi-colon list of attr=value pairs may come after the exec spec.
|
|
... |
|
... |
177 |
h->params.insert(h->params.end(), it, cmdtoks.end());
|
178 |
h->params.insert(h->params.end(), it, cmdtoks.end());
|
178 |
|
179 |
|
179 |
// Handle additional attributes. We substitute the semi-colons
|
180 |
// Handle additional attributes. We substitute the semi-colons
|
180 |
// with newlines and use a ConfSimple
|
181 |
// with newlines and use a ConfSimple
|
181 |
string value;
|
182 |
string value;
|
182 |
if (attrs.get(cstr_charset, value))
|
183 |
if (attrs.get(cstr_mh_charset, value))
|
183 |
h->cfgFilterOutputCharset = stringtolower((const string&)value);
|
184 |
h->cfgFilterOutputCharset = stringtolower((const string&)value);
|
184 |
if (attrs.get(cstr_mimetype, value))
|
185 |
if (attrs.get(cstr_dj_keymt, value))
|
185 |
h->cfgFilterOutputMtype = stringtolower((const string&)value);
|
186 |
h->cfgFilterOutputMtype = stringtolower((const string&)value);
|
186 |
|
187 |
|
187 |
#if 0
|
188 |
#if 0
|
188 |
string scmd;
|
189 |
string scmd;
|
189 |
for (it = h->params.begin(); it != h->params.end(); it++) {
|
190 |
for (it = h->params.begin(); it != h->params.end(); it++) {
|