[Resolved] HEAD -> PHP -> "Content-length" removed

Status
Not open for further replies.
#1
Webserver: Litespeed 5.0.7
PHP: 5.4.22
Reported Server API: LiteSpeed V6.6

Sample script:

PHP:
<?php

$content = 'This is some content';

header('Content-type: text/plain');
header('Content-length: '.strlen($content));
echo $content;

?>
Whenever the PHP script is being accessed using HTTP HEAD method, the header "Content-length" is being removed from the response. This happens even if the PHP script actually treats the HEAD request and stops before including any body in the request. The HEAD request works fine directly to a file "sample.txt" with the same content. So the problem is strictly related to HEAD requests to PHP scripts.
Using Apache, the "Content-length" is included, as expected, in the reply. So this is a strictly a Litespeed problem (possible bug).
Please advice, as soon as possible, as this is causing us a big problem.

P.S. Let me know if I should contact you privately, to receive support on my license.
 
Status
Not open for further replies.
Top