From:             vitaliy dot okulov at gmail dot com
Operating system: Linux
PHP version:      5.1.1
PHP Bug Type:     Apache2 related
Bug description:  Content-Length

Description:
------------
Content-Length bug with php scripts.
I create simple script. Then just send HEAD request to my WebServer:

HEAD -aUuSsx 'http://blabla/media/test2.php'
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: HEAD http://blabla/media/test2.php
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::UserAgent::request: Simple response: OK
HEAD http://blabla/media/test2.php
User-Agent: lwp-request/2.06

As you see there is no Content-Length field. But if i request .html file
or something other like gif or jpeg i can see Content-Length header in
response.

Reproduce code:
---------------
<?
phpinfo();
?>


Expected result:
----------------
HEAD http://blabla/media/test2.php --> 200 OK
Connection: close
Date: Sun, 04 Dec 2005 16:56:31 GMT
Server: Apache
Content-Language: ru
Content-Length: 17
Content-Type: text/html
Client-Date: Sun, 04 Dec 2005 16:56:31 GMT
Client-Peer: 10.0.0.1:80
Client-Response-Num: 1

Actual result:
--------------
HEAD http://blabla/media/test2.php --> 200 OK
Connection: close
Date: Sun, 04 Dec 2005 16:56:31 GMT
Server: Apache
Content-Language: ru
Content-Type: text/html
Client-Date: Sun, 04 Dec 2005 16:56:31 GMT
Client-Peer: 10.0.0.1:80
Client-Response-Num: 1

-- 
Edit bug report at http://bugs.php.net/?id=35546&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=35546&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=35546&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=35546&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=35546&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=35546&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=35546&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=35546&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=35546&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=35546&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=35546&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=35546&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=35546&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=35546&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=35546&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=35546&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=35546&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=35546&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35546&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=35546&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=35546&r=mysqlcfg

Reply via email to