Browse Source

修复无参数zlm请求代理失败的问题

添加对无密码直接注册功能的支持
pull/110/head
64850858 4 years ago
parent
commit
641d7d8e42
  1. 7
      src/main/java/com/genersoft/iot/vmp/conf/ProxyServletConfig.java
  2. 3
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/RegisterRequestProcessor.java

7
src/main/java/com/genersoft/iot/vmp/conf/ProxyServletConfig.java

@ -51,12 +51,11 @@ public class ProxyServletConfig {
@Override
protected String rewriteQueryStringFromRequest(HttpServletRequest servletRequest, String queryString) {
String queryStr = super.rewriteQueryStringFromRequest(servletRequest, queryString);
if (queryStr != null) {
queryStr += "&";
if (!StringUtils.isEmpty(queryStr)) {
queryStr += "&secret=" + mediaConfig.getSecret();
}else {
queryStr = "?";
queryStr = "secret=" + mediaConfig.getSecret();
}
queryStr += "secret=" + mediaConfig.getSecret();
return queryStr;
}

3
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/RegisterRequestProcessor.java

@ -77,6 +77,9 @@ public class RegisterRequestProcessor extends SIPRequestAbstractProcessor {
passwordCorrect = new DigestServerAuthenticationHelper().doAuthenticatePlainTextPassword(request,
sipConfig.getSipPassword());
}
if (StringUtils.isEmpty(sipConfig.getSipPassword())){
passwordCorrect = true;
}
// 未携带授权头或者密码错误 回复401
if (authorhead == null || !passwordCorrect) {

Loading…
Cancel
Save