jooking / closure-library

Automatically exported from code.google.com/p/closure-library
Apache License 2.0
0 stars 1 forks source link

goog.net.IframeIo fails to load XML response #555

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When using IframeIo to send a HTML form, which action is supposed to return a 
XML response, the process fails and returns an error "Access denied to content 
document".

The problem is that the handleLoad_ method does not expect, that the resulting 
contentDocument could be a XML document. To get the response contents it checks 
for stuff in contentDocument.body.

But if there is no body in contentDocument (because it is a XML document) it 
returns the error goog.net.ErrorCode.ACCESS_DENIED.

I think that the handleLoad_ method should first check if the contentDocument 
is not a XML document and if so, than save its contents (maybe for use with 
getResponseXml()).

Here is a minimalistic test (attached as a ZIP as well): 
http://temp.centi.sk/IframeIo-XML-Problem/

Original issue reported on code.google.com by ivan.cen...@etnetera.cz on 25 Apr 2013 at 2:21

Attachments: