Last few characters missing in Codeigniter REST API, json Response -


i using codeigniter rest api, , having response code this

$this->response(array('error' => 'items not found'),403); 

it works correctly in local machine, on server output this

{"error":"items not foun 

the last few characters missing

the actual output should this

{"error":"items not found"} 

i having same problem rest_controller. bit of hack, worked me.

  1. open rest_controller.php
  2. locate , delete following code (at end of response function):

    if ( ! $this->_zlib_oc && ! $cfg->item('compress_output')) {     header('content-length: ' . strlen($output)); } 

then started showing complete json response.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -