fetchmail-4.4.5 ():
* Make RPA logging use error() rather than stderr.
* Autoconfiguration support for NetBSD.
+* Henrik Storner's fix for a minor mimedecode bug.
There are 273 people on fetchmail-friends and 209 on fetchmail-announce.
UnMimeHeader(headers);
}
/* Check for MIME headers indicating possible 8-bit data */
- mimemsg = MimeBodyType(headers);
+ mimemsg = MimeBodyType(headers, ctl->mimedecode);
/*
* If there is a Return-Path address on the message, this was
#define MSG_IS_8BIT 0x02
#define MSG_NEEDS_DECODE 0x80
extern void UnMimeHeader(unsigned char *buf);
-extern int MimeBodyType(unsigned char *hdrs);
+extern int MimeBodyType(unsigned char *hdrs, int WantDecode);
extern int UnMimeBodyline(unsigned char **buf, int collapsedoubledot);
/* interface.c */
*
* The return value is a bitmask.
*/
-int MimeBodyType(unsigned char *hdrs)
+int MimeBodyType(unsigned char *hdrs, int WantDecode)
{
unsigned char *NxtHdr = hdrs;
unsigned char *XferEnc, *XferEncOfs, *CntType, *MimeVer, *p;
if (strcasecmp(XferEnc, "quoted-printable") == 0) {
CurrEncodingIsQP = 1;
BodyType = (MSG_IS_8BIT | MSG_NEEDS_DECODE);
- SetEncoding8bit(XferEncOfs);
+ if (WantDecode) {
+ SetEncoding8bit(XferEncOfs);
+ }
}
else if (strcasecmp(XferEnc, "7bit") == 0) {
CurrEncodingIsQP = 0;
DBG_FWRITE(buffer, strlen(buffer), 1, fd_orig);
UnMimeHeader(buffer);
- bodytype = MimeBodyType(buffer);
+ bodytype = MimeBodyType(buffer, 1);
i = strlen(buffer);
fwrite(buffer, i, 1, stdout);