diff --git a/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy b/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy index 3fc7319b825cd577f15ebc72f422f3db282bcab2..59dadbe41c25e64abc0378480a61eeb513168ba3 100755 --- a/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy +++ b/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy @@ -419,28 +419,11 @@ class ApiController { } } else { Config conf = meeting.getDefaultConfig(); - if (conf == null) { - // BEGIN - backward compatibility - invalid("noConfigFound","We could not find a config for this request.", REDIRECT_RESPONSE); - return - // END - backward compatibility - - errors.noConfigFound(); - respondWithErrors(errors); - } else { - configxml = conf.config; - } + configxml = conf.config; } - if (StringUtils.isEmpty(configxml)) { - // BEGIN - backward compatibility - invalid("noConfigFound","We could not find a config for this request.", REDIRECT_RESPONSE); - return - // END - backward compatibility + // Do not fail if there's no default config.xml, needed for an HTML5 client only scenario - errors.noConfigFound(); - respondWithErrors(errors); - } UserSession us = new UserSession(); us.authToken = authToken; us.internalUserId = internalUserID @@ -1217,6 +1200,16 @@ class ApiController { String defConfigXML = paramsProcessorUtil.getDefaultConfigXML(); + if (StringUtils.isEmpty(defConfigXML)) { + // BEGIN - backward compatibility + invalid("noConfigFound","We could not find a config for this request.", REDIRECT_RESPONSE); + return + // END - backward compatibility + + errors.noConfigFound(); + respondWithErrors(errors); + } + response.addHeader("Cache-Control", "no-cache") render text: defConfigXML, contentType: 'text/xml' } @@ -1258,6 +1251,16 @@ class ApiController { } } } else { + if (StringUtils.isEmpty(us.configXML)) { + // BEGIN - backward compatibility + invalid("noConfigFound","We could not find a config for this request.", REDIRECT_RESPONSE); + return + // END - backward compatibility + + errors.noConfigFound(); + respondWithErrors(errors); + } + Map<String, Object> logData = new HashMap<String, Object>(); logData.put("meetingId", us.meetingID); logData.put("externalMeetingId", us.externMeetingID);