MDL-39759 REST SERVER HTTP response code

Moodle should response 403 if web service or REST protocol not enabled
This commit is contained in:
Dongsheng Cai
2013-05-20 22:45:13 +10:00
parent e2637d1da3
commit 7d18e32afc
+1
View File
@@ -37,6 +37,7 @@ require('../../config.php');
require_once("$CFG->dirroot/webservice/rest/locallib.php");
if (!webservice_protocol_is_enabled('rest')) {
header("HTTP/1.0 403 Forbidden");
debugging('The server died because the web services or the REST protocol are not enable',
DEBUG_DEVELOPER);
die;