Skip to content

Commit

Permalink
MDL-28481: Send headers before any possible output
Browse files Browse the repository at this point in the history
  • Loading branch information
aolley committed Aug 21, 2011
1 parent 4f36324 commit 936cabd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webservice/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -765,14 +765,16 @@ public function run() {
//log the web service request
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
$response = $this->zend_server->handle();

// session cleanup
$this->session_cleanup();

//finally send the result
$this->send_headers();
echo $response;
die;
}
Expand Down

0 comments on commit 936cabd

Please sign in to comment.