WordPress.org

Make WordPress Core

Ticket #4794: class-IXR.php.diff

File class-IXR.php.diff, 739 bytes (added by sergey.s.betke@…, 6 years ago)

excuse me, correct file name extension

  • class-IXR.php

     
    466466
    467467    function output($xml)
    468468    {
    469         $xml = '<?xml version="1.0"?>'."\n".$xml;
     469        $xml = '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'."\n".$xml;
    470470        $length = strlen($xml);
    471471        header('Connection: close');
    472472        header('Content-Length: '.$length);
    473         header('Content-Type: text/xml');
    474         header('Date: '.date('r'));
     473        header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
     474        header('Date: '.date(DATE_RFC1123));
    475475        echo $xml;
    476476        exit;
    477477    }