From 3ba473776f08ac511d18b232f7627998b6f60c69 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Wed, 30 Oct 2024 16:18:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9Message=E7=BC=BA=E5=B0=91?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E7=9A=84=E5=BC=82=E5=B8=B8,=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D400=E9=94=99=E8=AF=AF=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../transmit/event/request/SIPRequestProcessorParent.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 bfc7e23bb..cd72c8d8a 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; }