Skip to content

Commit

Permalink
MDL-39759 REST SERVER HTTP response code
Browse files Browse the repository at this point in the history
Moodle should response 403 if web service or REST protocol not enabled
  • Loading branch information
Dongsheng Cai committed May 20, 2013
1 parent e2637d1 commit 7d18e32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions webservice/rest/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
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;
Expand Down

0 comments on commit 7d18e32

Please sign in to comment.