兼容Message缺少消息的异常,回复400错误码

pull/1669/head
648540858 2024-10-30 15:13:43 +08:00
parent dd6beba843
commit b759bdcccd
1 changed files with 5 additions and 0 deletions

View File

@ -102,6 +102,11 @@ public class MessageRequestProcessor extends SIPRequestProcessorParent implement
sipEvent.getErrorEvent().response(eventResult); sipEvent.getErrorEvent().response(eventResult);
} }
}else { }else {
byte[] rawContent = request.getRawContent();
if (rawContent == null) {
responseAck(request, Response.BAD_REQUEST, "content is null");
return;
}
Element rootElement; Element rootElement;
try { try {
rootElement = getRootElement(evt); rootElement = getRootElement(evt);