Search code examples
zend-frameworkcontent-typezend-framework-mvccontext-switch

Zend ContextSwitch action helper for XML sets wrong Content-Type header


Zend default ContextSwitch Action Helper for XML wrongly sets the Content-Type header to "application/xml" while the documentation claims it sets it to "test/xml".

Did anybody else bump into this. Is it a bug ? Thanks.

zend Action helper documentation


Solution

  • That's definitely a documentation bug.

    From the code

    'xml'  => array(
        'suffix'    => 'xml',
        'headers'   => array('Content-Type' => 'application/xml'),
    )
    

    Update: Bug filed - http://framework.zend.com/issues/browse/ZF-11406