Accept SOAP requests with no cwmp:ID element

Resolves #233
This commit is contained in:
Zaid Abdulla committed 2017-05-14 14:34:18 -07:00
1 parent 3f72bdd84b
commit 549f4f0323
1 file changed
+3 -1
+3 -1
View File
@@ -463,7 +463,9 @@ function request(httpRequest, cwmpVersion, warn) {
}
}
rpc.id = xml.get("/soap-env:Envelope/soap-env:Header/cwmp:ID", NAMESPACES[rpc.cwmpVersion]).text();
let idElement = xml.get("/soap-env:Envelope/soap-env:Header/cwmp:ID", NAMESPACES[rpc.cwmpVersion]);
if (idElement)
rpc.id = idElement.text();
if (methodElement && !(XML_IGNORE_NAMESPACE && methodElement.name() === "Fault")) {
switch (methodElement.name()) {