Iframe don't render XML documents

VERIFIED INVALID

Status

()

Firefox
General
VERIFIED INVALID
11 years ago
11 years ago

People

(Reporter: Ferran Basora, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 XPCOMViewer/0.9.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 XPCOMViewer/0.9.5

When I try to load a XML document in a iframe, firefox don't render de document.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Iframe Bug</title>
</head>
<body>

<iframe id="results" src="about:blank" width="100%" height="500" scrolling="auto" frameborder="1"></iframe>
<iframe id="results2" src="about:blank" width="100%" height="500" scrolling="auto" frameborder="1"></iframe>

<script type="text/javascript">
    document.getElementById("results").contentWindow.location.href = "http://example.server.com/catalog.xml";
    document.getElementById("results2").contentWindow.location.href = "file:///catalog.xml";
</script>

</body>
</html>

-- catalog.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>
<root>
      <example/>
      <example/>
      <example/>
      <example/>
</root>

Only the second iframe works.

Reproducible: Always

Steps to Reproduce:
1.Try to load a remote XML file in a iframe
2.
3.
Actual Results:  
Don't render the XML

Expected Results:  
Render the XML file in the iframe
(Reporter)

Comment 1

11 years ago
An incorrect Content-Type header sent by server. It was text/html.

Firefox tried to render:

<html>
<body>
<root>
      <example/>
      <example/>
      <example/>
      <example/>
</root>
</body>
</html>
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → INVALID
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.