mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-28481: Send headers before any possible output
This commit is contained in:
parent
4f3632441a
commit
936cabd6f0
1 changed files with 3 additions and 1 deletions
|
@ -765,6 +765,9 @@ abstract class webservice_zend_server extends webservice_server {
|
||||||
//log the web service request
|
//log the web service request
|
||||||
add_to_log(SITEID, 'webservice', '', '' , $this->zend_class." ".getremoteaddr() , 0, $this->userid);
|
add_to_log(SITEID, 'webservice', '', '' , $this->zend_class." ".getremoteaddr() , 0, $this->userid);
|
||||||
|
|
||||||
|
//send headers
|
||||||
|
$this->send_headers();
|
||||||
|
|
||||||
// execute and return response, this sends some headers too
|
// execute and return response, this sends some headers too
|
||||||
$response = $this->zend_server->handle();
|
$response = $this->zend_server->handle();
|
||||||
|
|
||||||
|
@ -772,7 +775,6 @@ abstract class webservice_zend_server extends webservice_server {
|
||||||
$this->session_cleanup();
|
$this->session_cleanup();
|
||||||
|
|
||||||
//finally send the result
|
//finally send the result
|
||||||
$this->send_headers();
|
|
||||||
echo $response;
|
echo $response;
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue