OSX and iOS applications can modify load request with an NSURLProtocol subclass. This is supported for data that is loaded with WebCore's resource loader classes but because WebCore on iOS and OS X uses the system media engines to load media data, we should canonicalize a media url before passing it to the media framework.
Created attachment 233869 [details] Proposed patch.
Comment on attachment 233869 [details] Proposed patch. Before you check this in, is there a way to make it conditional on whether a custom protocol handler is installed for the scheme in question?
Drat, looks like there's not API for determining if there's a custom NSURLProtocol registered for a given scheme. Carry on.
Comment on attachment 233869 [details] Proposed patch. Clearing flags on attachment: 233869 Committed r170478: <http://trac.webkit.org/changeset/170478>
All reviewed patches have been landed. Closing bug.
Comment on attachment 233869 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=233869&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:754 > - NSURL *cocoaURL = URL(ParsedURLString, url); > + NSURL *cocoaURL = canonicalURL(url); Where does the guarantee that this URL string came from a URL object come from? Can we change this to pass in the URL if we really need to rely on it being a parsed URL? Generally we need to avoid the pattern of using ParsedURLString.