mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-01-13 00:00:12 +01:00
better parsing of multiline subjects
This commit is contained in:
parent
63339e48c1
commit
66db430f24
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#define VERSION "1.1.1-pre"
|
#define VERSION "1.1.1-pre"
|
||||||
|
|
||||||
#define BUILD 898
|
#define BUILD 899
|
||||||
|
|
||||||
#define HOSTID "mailarchiver"
|
#define HOSTID "mailarchiver"
|
||||||
|
|
||||||
|
15
src/parser.c
15
src/parser.c
@ -452,15 +452,20 @@ int parse_line(char *buf, struct _state *state, struct session_data *sdata, int
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
p = strrchr(state->b_subject, ' ');
|
/*
|
||||||
if(p && ( strcasestr(p+1, "?Q?") || strcasestr(p+1, "?B?") ) ){
|
* if the next subject line is encoded, then strip the whitespace characters at the beginning of the line
|
||||||
strncat(state->b_subject, buf+1, MAXBUFSIZE-1);
|
*/
|
||||||
}
|
|
||||||
else strncat(state->b_subject, buf, MAXBUFSIZE-1);
|
|
||||||
|
|
||||||
|
p = buf;
|
||||||
|
|
||||||
|
if(strcasestr(buf, "?Q?") || strcasestr(buf, "?B?")){
|
||||||
|
while(isspace(*p)) p++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
strncat(state->b_subject, p, MAXBUFSIZE-1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(state->is_1st_header == 1){
|
if(state->is_1st_header == 1){
|
||||||
fixupEncodedHeaderLine(buf, MAXBUFSIZE);
|
fixupEncodedHeaderLine(buf, MAXBUFSIZE);
|
||||||
|
Loading…
Reference in New Issue
Block a user