зеркало из https://github.com/mozilla/pjs.git
forgot files !
166517 r=cavin sr=bienvenu Handle invalid custom headers in rules.dat and parse custom header pref in such a way that strtok and split(js) return same tokens. fixes some corruption issues
This commit is contained in:
Родитель
b8db543571
Коммит
26bccb7e15
|
@ -621,3 +621,21 @@ nsresult CreateServicesForPasswordManager()
|
|||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult IsRFC822HeaderFieldName(const char *aHdr, PRBool *aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aHdr);
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
PRUint32 length = strlen(aHdr);
|
||||
for(PRUint32 i=0; i<length; i++)
|
||||
{
|
||||
char c = aHdr[i];
|
||||
if ( c < '!' || c == ':' || c > '~')
|
||||
{
|
||||
*aResult = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
*aResult = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -85,5 +85,7 @@ NS_MSG_BASE PRBool IsAFromSpaceLine(char *start, const char *end);
|
|||
|
||||
NS_MSG_BASE nsresult CreateServicesForPasswordManager();
|
||||
|
||||
NS_MSG_BASE nsresult IsRFC822HeaderFieldName(const char *aHdr, PRBool *aResult);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче