Bug 11723 - XMLHttpRequest fails in a page loaded with WebFrame's loadHTMLString: or loadData:
Summary: XMLHttpRequest fails in a page loaded with WebFrame's loadHTMLString: or load...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Major
Assignee: Timothy Hatcher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-30 09:33 PST by Timothy Hatcher
Modified: 2006-11-30 09:49 PST (History)
0 users

See Also:


Attachments
Patch (1.27 KB, patch)
2006-11-30 09:38 PST, Timothy Hatcher
beidson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2006-11-30 09:33:23 PST
All XMLHttpRequest's fail in a pages loaded with WebFrame's loadHTMLString: or loadData:. This failure happens because of the cross-domian check since the frame has a applewebdata://... URL. These URLs should be treated like other file URLs and be allowed to open an XMLHttpRequest to any domain.
Comment 1 Timothy Hatcher 2006-11-30 09:38:20 PST
Created attachment 11682 [details]
Patch

XMLHttpRequest fails in a page loaded with WebFrame's loadHTMLString: or loadData:
http://bugs.webkit.org/show_bug.cgi?id=11723

Allow cross-domain XMLHTTPRequest for applewebdata URLs. No automated way to test,
tested in Safari's debug Snippet Editor.

* xml/xmlhttprequest.cpp:
(WebCore::XMLHttpRequest::urlMatchesDocumentDomain):
Comment 2 Brady Eidson 2006-11-30 09:46:33 PST
Comment on attachment 11682 [details]
Patch

r=me
Comment 3 Timothy Hatcher 2006-11-30 09:49:06 PST
Landed in r17939.