Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New NSURProtocols, canInitWithRequest



General question (the details behind it are below).

I register a new protocol class, and then when anything is loaded into my app's WebView, my class's 'canInitWithRequest' gets called.

I would like to guarantee that this protocol is called first for all URLs (especially including file:// ) -- assuming no other protocols are registered after mine. Can I assume that? That is, is it a last- registered-first-asked algorithm, and can I depend on that?

Thanks,
Rudi

Details:

I'm working on a WebView in a sandbox where we want to control all accesses to the file:// protocol. This includes files read by Flash .swf files. I found from experimentation that when a WebView loads a SWF file that itself is configured to read files from the same directory as the SWF, then the resource-delegate is called for the SWF file but not for the files that Flash itself is loading... so simply having a resource delegate won't control files loaded by Flash when the SWF file itself is file://

Further experimentation showed that for custom protocols, the resource-delegate *is* called for the files that Flash itself is loading.

So I'm implementing a custom protocol, and whenever we load a SWF file we load it with our custom protocol scheme; my protocol knows how to serve the swf file; in addition, my protocol is called with the files loaded by the swf.

I'm worried that someone could create a malicious Flash file that specifically loads the file:// protocol, and my protocol won't know about that because some other protocol will load it first, and since it's file:// my resource delegate won't know about it.

-- R
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.