get request with WWW class done with error "transfer closed with bytes remaining to read"

I tried to get a JSON string result from my team’s PHP server with WWW call without WWWForm
the isDone flag on www object was set to true after “yield return www;” and then when i examined the received JSON string(www.text), I found out that the string was not completely loaded.
So I printed out www.error and got the error message and knew what was wrong.

“transfer closed with xxx bytes remaining to read”

I did some research on the error and found 2 topics talked about this facing the similar( almost the same ) problem. without any appreciated solution ;-;

  1. WWW class - Transfer closed with bytes remaining to read - Questions & Answers - Unity Discussions
  2. Transfer closed with bytes remaining to read - Questions & Answers - Unity Discussions

these are the methods i tried and still do not work

  1. reconnect and request again many times → still got same error everytime
  2. try to delay with WaitForSecond(1) → still the same
  3. try using POST request instead of GET → got another error
  4. try directly get the json response using postman app → json object receive is correct on the app

Can anyone know let me know what is wrong and how to fix this?
I am still not even sure whether the problem is caused by client or server side can anyone please suggest.

PS. for my case the error show different bytes remaining on each time
and this is my source code

WWW www;
do
{
	WWW temp_www = new WWW("http://orangetree.swe-oriental.com/api.php/devince/2/3/3/4/65");

	print("try connecting");
	while (temp_www.isDone == false)
		yield return null;

	print("result : " + temp_www.error);
	yield return new WaitForSeconds(10000);
	www = temp_www;
}
while (string.IsNullOrEmpty(www.error) == false);

I found the cause and the solution for this case.
The cause is that the running php server requires headers to be attached on GET request call,
so with only browser or new WWW(url) call, it does not automatically generate and attach headers like Postman did.

to attach the headers info into the GET request, I implemented this source code
and everything works like a charm :3

Dictionary<string,string> headers = new Dictionary<string,string>();

headers.Add("Cache-Control", "no-cache");
headers.Add("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36");
headers.Add("Postman-Token", "163476fc-5220-d299-7b91-8fbe5fa24cad");
headers.Add("Accept", "*/*");
headers.Add("Accept-Encoding", "gzip, deflate, sdch");
headers.Add("Accept-Language", "en-US,en;q=0.8,ja;q=0.6");

WWW www = new WWW("http://orangetree.swe-oriental.com/api.php/devince/2/3/3/4/65", null, headers);

yield return www;

print(www.isDone);
print(www.error);
print(www.text);

for anyone who do not know how should you add stuff into headers attachment I do not know well about the concept of this headers things but I suggest that you can simply use an application “Postman” to launch a request and get a header generated from the app