diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/SIPRequestProcessorParent.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/SIPRequestProcessorParent.java index bfc7e23b..cd72c8d8 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/SIPRequestProcessorParent.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/SIPRequestProcessorParent.java @@ -12,6 +12,7 @@ import org.dom4j.DocumentException; import org.dom4j.Element; import org.dom4j.io.SAXReader; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.ObjectUtils; import javax.sip.*; import javax.sip.address.Address; @@ -171,7 +172,10 @@ public abstract class SIPRequestProcessorParent { public Element getRootElement(RequestEvent evt, String charset) throws DocumentException { byte[] rawContent = evt.getRequest().getRawContent(); - if (rawContent == null) { + if (evt.getRequest().getContentLength().getContentLength() == 0 + || rawContent == null + || rawContent.length == 0 + || ObjectUtils.isEmpty(new String(rawContent))) { return null; }