Skip to content

Commit

Permalink
Changed how the HTTP headers are sent in the httpResponse() function.
Browse files Browse the repository at this point in the history
  • Loading branch information
feuzeu committed Nov 17, 2016
1 parent 850e26e commit 3f3c972
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Jaxon.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ public function setup()
public function httpResponse($code = '200')
{
// Send HTTP Headers
$this->response->sendHeaders();
// $this->response->sendHeaders();
// Create and return a Symfony HTTP response
$response = new HttpResponse();
// $response->headers->set('Content-Type', $this->response->getContentType());
// $response->setCharset($this->response->getCharacterEncoding());
$response->headers->set('Content-Type', $this->response->getContentType());
$response->setCharset($this->response->getCharacterEncoding());
$response->setStatusCode($code);
$response->setContent($this->response->getOutput());
// prints the HTTP headers followed by the content
Expand Down

0 comments on commit 3f3c972

Please sign in to comment.