Jump to content

Why PHP don't send the Content-Length header? (and others)


daniminas

Recommended Posts

Hi guys,

 

I'm posing here because i've a very strange issue, and i can't find anything about.. it is about headers.

 

Normally, when i do a request, the servers says:

  HTTP/1.1 200 OK
  Date: Wed, 06 May 2009 19:47:47 GMT
  Server: Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 PHP/5.2.6-1+lenny2 with Suhosin-Patch
  X-Powered-By: PHP/5.2.6-1+lenny2
  Content-Length: 7470
  Keep-Alive: timeout=15, max=100
  Connection: Keep-Alive
  Content-Type: text/html; charset="utf-8"
Length: 7470 (7.3K) [text/html]

 

Great, it works.

 

But, if the response 'length' is great than 'some' size (somthing like >= 7.3K) it just removes these headers: {Content-Length:, Keep-alive:, and sets the connection as: Connection: closed}

 

The result is:

  HTTP/1.1 200 OK
  Date: Wed, 06 May 2009 19:42:48 GMT
  Server: Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 PHP/5.2.6-1+lenny2 with Suhosin-Patch
  X-Powered-By: PHP/5.2.6-1+lenny2
  Connection: close
  Content-Type: text/html; charset="utf-8"
Length: unspecified [text/html]

 

Don't misunderstand, the content is ok(and contains the right result), the problem is that i need those headers(i need them!!).. and don't know why the heck is PHP doing that?!!

 

Btw, was so hard to realize that was the problem  >:(

 

Thanks for any advice or comment

 

D.-

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.