Permalink
Browse files

MDL-28481: Send headers before any possible output

  • Loading branch information...
1 parent f9356f8 commit f22a7de23f10c838e0232ce9debd1d01a946ac3f @aolley aolley committed with stronk7 Aug 21, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 webservice/lib.php
View
@@ -727,14 +727,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;
}

0 comments on commit f22a7de

Please sign in to comment.