无法使用IE7查看XML文件的来源

无法使用IE7查看XML文件的来源

问题描述:

我正在增强我们的Web框架以使用Web服务,我希望能够查看已提交的XML。我正在使用我们的Java servlet来启动一个弹出窗口并提供XML,这是有效的 - 在IE7中,我得到了XML的格式良好和折叠视图时的预期行为。问题是,如果我选择查看源代码,我会弹出一个 XML源文件无法查看的弹出窗口。

I am enhancing our web framework to use web services and one of features I would like is the ability to view XML that has been submitted. I am using our Java servlet to launch a popup and serve the XML and this works - in IE7 I get the expected behaviour when of a nicely formatted and folding view of the XML. The problem is if I select 'View Source' I get a popup saying "The XML source file is unavailable for viewing".

我'我使用Fiddler检查我在下面提供的响应标题:

I've used Fiddler to inspect the response headers which I've provided below:

HTTP/1.1 200 OK
Date: Tue, 08 Sep 2009 15:23:56 GMT
Server: Oracle Containers for J2EE
Content-Length: 7835
Set-Cookie: p_session_id=20DB84E0FB3AAE905A0A07C86AD61A1E; Path=/
Set-Cookie: field_set_F2K_iMm34HT1t=fsF2N_iMm34HT1t; Path=/eng8
Cache-Control: private
Connection: Keep-Alive
Keep-Alive: timeout=15, max=100
Content-Type: text/xml; charset=UTF-8
Expires: Tue, 08 Sep 2009 15:23:59 GMT

任何人都可以解释错误的原因吗?我觉得它可能与缓存有关,但我还没能解决它。 XML是有效且格式良好的。

Can anyone explain the reason for the error? I have a feeling it might be to do with caching but I haven't been able to solve it yet. The XML is valid and well formed.