This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 129919 - MIME type of XML file with illegal encoding not detected correctly
Summary: MIME type of XML file with illegal encoding not detected correctly
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks: 129454
  Show dependency tree
 
Reported: 2008-03-12 15:14 UTC by Andrei Badea
Modified: 2008-12-22 13:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Unit test (2.16 KB, text/plain)
2008-03-12 15:15 UTC, Andrei Badea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Badea 2008-03-12 15:14:48 UTC
There is an assumption in data systems that a template is recognizable with the same data loader that is used to
recognize files created from that template. I have a case where this assumption doesn't hold.

In the Spring support I need to create an XML file with a given encoding, so my template looks starts with:

<?xml version="1.0" encoding="${encoding}"?>
<beans xmlns="http://www.springframework.org/schema/beans">

I have a MIME resolved installed which recognizes files with such a beans element as text/x-springconfig+xml. However,
the MIME type of the template is not text/x-springconfig+xml, but text/xml. Thus the file generated from the template is
recognized with XMLDataLoader instead of the loader for Spring files.

The template has the correct MIME type if I change "${encoding}" to e.g. "UTF-8".
Comment 1 Andrei Badea 2008-03-12 15:15:34 UTC
Created attachment 58238 [details]
Unit test
Comment 2 Jaroslav Tulach 2008-03-12 20:39:20 UTC
The fix will propagate by tomorrow, I guess.

changeset:   72560:54c073dde43e
tag:         tip
user:        Jaroslav Tulach <jtulach@netbeans.org>
date:        Wed Mar 12 20:37:36 2008 +0100
summary:     #129919: Surviving malformed encoding in the XML header
Comment 3 Andrei Badea 2008-03-13 15:45:18 UTC
Verified.