Account for the fact that sometimes headers may be terminated with \r\n instead of just \n

(closes issue #11043, reported by yehavi)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Mark Michelson 19 years ago
parent 0e9071a2e3
commit 222302c0a2

@ -8720,8 +8720,8 @@ static char *get_header_by_tag(char *header, char *tag)
ast_mutex_lock(&imaptemp_lock);
ast_copy_string(imaptemp, start+taglen, sizeof(imaptemp));
ast_mutex_unlock(&imaptemp_lock);
eol_pnt = strchr(imaptemp,'\n');
*eol_pnt = '\0';
if ((eol_pnt = strchr(imaptemp,'\r')) || (eol_pnt = strchr(imaptemp,'\n')))
*eol_pnt = '\0';
return imaptemp;
}

Loading…
Cancel
Save