php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
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
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9eb726b3ab2808b3c25ac966388e7d361bfbb21c
Log: Fixed bug #67079 Missing MIME types for XML/XSL files
 [2014-04-16 07:51 UTC] ab@php.net
-Status: Open +Status: Closed
 [2014-04-17 19:34 UTC] philip@php.net
Automatic comment from SVN on behalf of philip
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=333364
Log: Moved supported MIME type changes to a changelog table, and added 5.5.12 additions '.xml, .xsl, and .xsd' as per PHP Bug #67079
 [2014-04-20 18:38 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9eb726b3ab2808b3c25ac966388e7d361bfbb21c
Log: Fixed bug #67079 Missing MIME types for XML/XSL files
 [2014-04-20 18:39 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9eb726b3ab2808b3c25ac966388e7d361bfbb21c
Log: Fixed bug #67079 Missing MIME types for XML/XSL files
 [2014-05-01 14:59 UTC] tyrael@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9eb726b3ab2808b3c25ac966388e7d361bfbb21c
Log: Fixed bug #67079 Missing MIME types for XML/XSL files
 [2014-10-04 21:48 UTC] 7raivis at inbox dot lv
The correct mime type is application/xslt+xml, see http://www.w3.org/TR/xslt-30/
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC