Changeset 1825

Show
Ignore:
Timestamp:
04/09/08 10:24:42 (8 months ago)
Author:
fumiakiy
Message:

Return appropriate error contents in error condition from AtomServer. BugId:68405

URL to the category document in the service document was wrong. BugId:67832

Thanks Witha System for these bug reports!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/release-34/lib/MT/AtomServer.pm

    r1823 r1825  
    8888    return unless ref($app); 
    8989    if ($code && $msg) { 
     90        chomp($msg = encode_xml($msg));  
    9091        $app->response_code($code); 
    9192        $app->response_message($msg); 
     93        $app->response_content_type('text/xml');  
     94        $app->response_content("<error>$msg</error>");  
    9295    } 
    9396    elsif ($code) { 
     
    467470 
    468471        my $cats = XML::XPath::Node::Element->new('categories'); 
    469         $cats->appendAttribute(XML::XPath::Node::Attribute->new('href', $uri . '?svc=categories')); 
     472        $cats->appendAttribute(XML::XPath::Node::Attribute->new('href', $uri . '/svc=categories')); 
    470473        $entries->appendChild($cats); 
    471474    }