search

Home  >  Q&A  >  body text

HttpResponse response returns string content_length = -1 problem

php environment: THINKPHP5

C# code:

request = (HttpWebRequest) WebRequest.Creeate(uri);

request.KeepAlive = false;

request.Method = "GET";

response = (HttpWebResponse) request.GetResponse();

php is exit($content);

If the length of $content exceeds 8000, then the content_length of the response = -1. If it is less than 8000, it is the real length. Can anyone tell me what is going on?

XYXY2048 days ago1156

reply all(0)I'll reply

No reply
  • Cancelreply