Missing MIME types for XML/XSL files

Request #67079 Missing MIME types for XML/XSL files
Submitted: 2014-04-15 11:22 UTC Modified: 2014-04-15 13:30 UTC
From: dde at innovaphone dot com Assigned:
Status: Closed Package: Built-in web server
PHP Version: 5.5.11 OS: Windows 7 x64
Private report: No CVE-ID: None

 [2014-04-15 11:22 UTC] dde at innovaphone dot com

Description:
------------
I'm currently developing a website with XML and XSL files where XSLT is done.
First an XML file is served which contains a reference to an XSL file and the browser does the transformation.

Sadly this doesn't work (at least with Firefox/Chrome) if the web server doesn't set a correct Content-Type header.

So I vote for two new lines inside the mime_type_map in php_cli_server.c:

{ "xml",  "application/xml" },
{ "xsl",  "application/xml" },

A router script with custom mime types is no option as the debugging gets extremely slow (Visual Studio 2013 with plugin PHP tools and xdebug).

Greetings,
Daniel


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports

 [2014-04-15 13:10 UTC] ab@php.net

-Status: Open +Status: Feedback

 [2014-04-15 13:10 UTC] ab@php.net

Could you please post short file snippets you have erroneous behaviour with?

thanks

 [2014-04-15 13:20 UTC] dde at innovaphone dot com

-Status: Feedback +Status: Open

 [2014-04-15 13:20 UTC] dde at innovaphone dot com

Ok, sample XML file test.xml:

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<info lang="de,en">
</info>

Sample XSL file test.xsl:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output encoding='utf-8' method='html' standalone='yes' doctype-system="about:legacy-compat"/>
    <xsl:template match="info">
        <div>Test</div>
    </xsl:template>
</xsl:stylesheet>

Greetings,
Daniel

 [2014-04-15 13:30 UTC] dde at innovaphone dot com

"text/xml" would be fine too!

Greetings,
Daniel

 [2014-04-16 07:51 UTC] ab@php.net

-Status: Open +Status: Closed