• 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


New member
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


XenForo developer
Staff member
It sounds like your server is modifying the output, as the code literally takes the length and outputs the string:
        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?