Skip to content

Commit edad115

Browse files
committed
Fixed Missing rest_enabled_logging check for response code logging
As noted here chriskacerguis#412 (comment)
1 parent c5b92cf commit edad115

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

application/libraries/REST_Controller.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,11 @@ public function response($data = NULL, $http_code = NULL, $continue = FALSE)
500500
}
501501

502502
set_status_header($http_code);
503-
$this->_log_response_code($http_code);
503+
504+
// JC: Log response code only if rest logging enabled
505+
if (config_item('rest_enable_logging')) {
506+
$this->_log_response_code($http_code);
507+
}
504508

505509
// If zlib.output_compression is enabled it will compress the output,
506510
// but it will not modify the content-length header to compensate for

0 commit comments

Comments
 (0)