aboutsummaryrefslogtreecommitdiffstats
path: root/unmime.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-05-12 16:30:16 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-05-12 16:30:16 +0000
commit208dae95cc1ad48a7d39510e6485b77dd55c3a27 (patch)
tree8e9ee6edb3e6fa1d2fa549d1c80af7b580062af6 /unmime.c
parentbdf5efca37bc22262cef9a4f049ba59b154c3bf1 (diff)
downloadfetchmail-208dae95cc1ad48a7d39510e6485b77dd55c3a27.tar.gz
fetchmail-208dae95cc1ad48a7d39510e6485b77dd55c3a27.tar.bz2
fetchmail-208dae95cc1ad48a7d39510e6485b77dd55c3a27.zip
Henrik's fix.
svn path=/trunk/; revision=1767
Diffstat (limited to 'unmime.c')
-rw-r--r--unmime.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/unmime.c b/unmime.c
index 26c41637..0f0dcf42 100644
--- a/unmime.c
+++ b/unmime.c
@@ -339,7 +339,7 @@ static char *GetBoundary(char *CntType)
*
* 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;
@@ -440,7 +440,9 @@ int MimeBodyType(unsigned char *hdrs)
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;
@@ -643,7 +645,7 @@ int main(int argc, char *argv[])
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);