Fixed a bug when there is a partly Content-Type header
This commit is contained in:
parent
a78ed544a2
commit
33a7c3aebf
@ -214,6 +214,7 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
|||||||
if (q)
|
if (q)
|
||||||
while (*q && isspace(*q))
|
while (*q && isspace(*q))
|
||||||
q++;
|
q++;
|
||||||
|
|
||||||
if (!(q))
|
if (!(q))
|
||||||
q = (char *)"8bit";
|
q = (char *)"8bit";
|
||||||
if ((p = hdr((char *)"Content-Type",msg))) {
|
if ((p = hdr((char *)"Content-Type",msg))) {
|
||||||
@ -230,6 +231,7 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
|||||||
|
|
||||||
q = strtok(p, " \n\0");
|
q = strtok(p, " \n\0");
|
||||||
q = strtok(NULL, "; \n\0");
|
q = strtok(NULL, "; \n\0");
|
||||||
|
if (q) {
|
||||||
while (*q && isspace(*q))
|
while (*q && isspace(*q))
|
||||||
q++;
|
q++;
|
||||||
Syslog('m', "charset part: %s", printable(q, 0));
|
Syslog('m', "charset part: %s", printable(q, 0));
|
||||||
@ -246,6 +248,7 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
|||||||
Syslog('m', "Charset \"%s\"", printable(charset, 0));
|
Syslog('m', "Charset \"%s\"", printable(charset, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (charset == NULL) {
|
if (charset == NULL) {
|
||||||
charset = xstrcpy((char *)"iso-8859-1");
|
charset = xstrcpy((char *)"iso-8859-1");
|
||||||
|
Reference in New Issue
Block a user