Header Content-Length not getting in rest web service using php

549 views Asked by At

I have created web service for ios application using rest. I want Content-Length header field. When I tested on "Advanced Rest Client" chrome's extension it work's fine, but ios application not getting Content-Length. Instead of Content-Length getting Transfer-Encoding - "identity"

Check following response from Advanced Rest Client extension

Date: Wed, 24 Jun 2015 05:25:48 GMT 
Server: Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.5.15 
X-Powered-By: PHP/5.5.15
Content-Length: 1272347 
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/json 

Response from ios application on client side

{
    Connection = "Keep-Alive";
    "Content-Type" = "application/json";
    Date = "Tue, 23 Jun 2015 08:12:34 GMT";
    "Keep-Alive" = "timeout=5, max=97";
    Server = "Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.5.15";
    "Transfer-Encoding" = Identity;
    "X-Powered-By" = "PHP/5.5.15";
}
0

There are 0 answers