Skip to content
Browse files

MDL-28481: Send headers before any possible output

  • Loading branch information...
1 parent 4f36324 commit 936cabd6f00fd2a0ffd9419729e5d5242cefec35 @aolley aolley committed Aug 22, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 webservice/lib.php
View
4 webservice/lib.php
@@ -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;
}

0 comments on commit 936cabd

Please sign in to comment.
Something went wrong with that request. Please try again.