|
a/src/internfile/mh_mail.cpp |
|
b/src/internfile/mh_mail.cpp |
1 |
#ifndef lint
|
1 |
#ifndef lint
|
2 |
static char rcsid[] = "@(#$Id: mh_mail.cpp,v 1.6 2005-10-15 12:18:04 dockes Exp $ (C) 2005 J.F.Dockes";
|
2 |
static char rcsid[] = "@(#$Id: mh_mail.cpp,v 1.7 2005-10-31 08:59:05 dockes Exp $ (C) 2005 J.F.Dockes";
|
3 |
#endif
|
3 |
#endif
|
4 |
|
4 |
|
5 |
#include <stdio.h>
|
5 |
#include <stdio.h>
|
6 |
#include <fcntl.h>
|
6 |
#include <fcntl.h>
|
7 |
#include <errno.h>
|
7 |
#include <errno.h>
|
|
... |
|
... |
328 |
doc.getBody(body, 0, doc.bodylength);
|
328 |
doc.getBody(body, 0, doc.bodylength);
|
329 |
|
329 |
|
330 |
// Decode content transfer encoding
|
330 |
// Decode content transfer encoding
|
331 |
if (!stringlowercmp("quoted-printable", cte)) {
|
331 |
if (!stringlowercmp("quoted-printable", cte)) {
|
332 |
string decoded;
|
332 |
string decoded;
|
333 |
qp_decode(body, decoded);
|
333 |
if (!qp_decode(body, decoded)) {
|
|
|
334 |
LOGERR(("walkmime: quoted-printable decoding failed !\n"));
|
|
|
335 |
return;
|
|
|
336 |
}
|
334 |
body = decoded;
|
337 |
body = decoded;
|
335 |
} else if (!stringlowercmp("base64", cte)) {
|
338 |
} else if (!stringlowercmp("base64", cte)) {
|
336 |
string decoded;
|
339 |
string decoded;
|
337 |
base64_decode(body, decoded);
|
340 |
if (!base64_decode(body, decoded)) {
|
|
|
341 |
LOGERR(("walkmime: base64 decoding failed !\n"));
|
|
|
342 |
#if 0
|
|
|
343 |
FILE *fp = fopen("/tmp/recoll_decodefail", "w");
|
|
|
344 |
if (fp) {
|
|
|
345 |
fprintf(fp, "%s", body.c_str());
|
|
|
346 |
fclose(fp);
|
|
|
347 |
}
|
|
|
348 |
#endif
|
|
|
349 |
return;
|
|
|
350 |
}
|
338 |
body = decoded;
|
351 |
body = decoded;
|
339 |
}
|
352 |
}
|
340 |
|
|
|
341 |
|
353 |
|
342 |
string transcoded;
|
354 |
string transcoded;
|
343 |
if (!stringlowercmp("text/html", content_type.value)) {
|
355 |
if (!stringlowercmp("text/html", content_type.value)) {
|
344 |
MimeHandlerHtml mh;
|
356 |
MimeHandlerHtml mh;
|
345 |
Rcl::Doc hdoc;
|
357 |
Rcl::Doc hdoc;
|