[webkit-dev] Allow "cross-origin" XHR requests for non-standard URLs?

Benjamin ikipou at gmail.com
Sat Mar 19 03:21:04 PDT 2011


On Sat, Mar 19, 2011 at 10:56 AM, Joe Andrieu <joe at andrieu.net> wrote:

>  Well, I am defining a custom scheme. But its semantics are not
> hierarchical and do not have the typical authority-part that allows
> cross-origin checks to make sense. Because of that, WebKit's CanonicalizeURL
> fails if my scheme is registered as standard. Which makes sense, because it
> isn't standard.
>
> I'm not familiar with QtWebKit's integration. From the first couple of web
> pages Google brought up, it isn't clear that their protocols will actually
> work with AJAX / XMLHttpRequest. There are no examples of doing it, and from
> walking through the WebKit code, I'm skeptical a stock version of WebKit
> would allow it.
>

With a valid scheme, XMLHttpRequest, cross origin or not, can be made to
work without changing WebKit.

But if your scheme is non standard that does not gonna for the reason you
describe. My suggestion is just to use a standard scheme to avoid patching
WebKit.  It is no uncommon to use a valid scheme internally, and display
something else in the interface. Rekonq new-tab-page branch uses rekonq://
internally, and "about:" for display. Chromium uses chrome:// for its
internally as well (for example, about:version is chrome://about/version).

cheers,
Benjamin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110319/fc0b8b25/attachment.html>


More information about the webkit-dev mailing list