Forums

What does HTTP_ACCEPT_ENCODING means? (4 posts)

  1. elcarpo
    Member
    Posted 3 months ago #

    I'm having ver frequently on my error log this error

    PHP Notice: Undefined index: HTTP_ACCEPT_ENCODING in /var/www/vhosts/mysite.com/httpdocs/wp-includes/js/tinymce/wp-tinymce.php on line 23, referer: http://mysite.com/wp-admin/post.php?action=edit&post=32352&message=1

    does anyone knows what does it mean and how to solve it?

  2. whooami
    Member
    Posted 3 months ago #

    do you have any cache plugins installed?

    that looks to be related to gzip encoding.

    you could just remove or comment out this stuff inside the files:

    if ( isset($_GET['c']) && 1 == $_GET['c'] && false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') && ( $file = get_file($basepath . '/wp-tinymce.js.gz') ) ) {
    	header('Content-Encoding: gzip');
    	echo $file;
    } else {

    and the closing }

    leaving just this:

    <?php
    
    $basepath = dirname(__FILE__);
    
    function get_file($path) {
    
    	if ( function_exists('realpath') )
    		$path = realpath($path);
    
    	if ( ! $path || ! @is_file($path) )
    		return false;
    
    	return @file_get_contents($path);
    }
    
    $expires_offset = 31536000;
    
    header('Content-Type: application/x-javascript; charset=UTF-8');
    header('Vary: Accept-Encoding'); // Handle proxies
    header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
    header("Cache-Control: public, max-age=$expires_offset");
    
    	echo get_file($basepath . '/wp-tinymce.js');
    exit;
  3. elcarpo
    Member
    Posted 3 months ago #

    whooami, yes, i have wp-supercache...

    i know it is related to compression, but i don't know what does that mean exactly...

  4. whooami
    Member
    Posted 3 months ago #

    oh, well if you disable gzip compression in wp-supercache it may go away - check and see.

Reply

You must log in to post.

About this Topic