If version and/or encoding attributes are missing from XML declaration, assume the default values.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4697 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
6027359a64
commit
2e9b846094
|
@ -5728,7 +5728,7 @@ bool XmlToTcap::validDeclaration()
|
|||
const NamedList& decl = m_decl->getDec();
|
||||
NamedString* vers = decl.getParam(YSTRING("version"));
|
||||
NamedString* enc = decl.getParam(YSTRING("encoding"));
|
||||
if (TelEngine::null(vers) || (*vers != "1.0") || TelEngine::null(enc) || (*enc != "UTF-8"))
|
||||
if ((!TelEngine::null(vers) && (*vers != "1.0")) || (!TelEngine::null(enc) && (*enc |= "UTF-8")))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue