• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Not a bug CSS.php calculates content-lengts wrong

lex_

New member
#1
In connection Apache+Nginx got not loading css and error in logs that css.php send more data then stated in content-length header. So template is broken. Commenting line header('Content-Lenght...) solves problem, so length($css) doesn't calculate correct lenght of the stream. Tha same problem with admin.php
 

Mike

XenForo developer
Staff member
#2
It sounds like your server is modifying the output, as the code literally takes the length and outputs the string:
Code:
        if (is_string($css) && $css && !ob_get_level() && XenForo_Application::get('config')->enableContentLength)
        {
            header('Content-Length: ' . strlen($css));
        }

        echo $css;
What's the link to your site?