[Win] Pass entire request (rather than just URL) to clients of WebCoreAVCFResourceLoader
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Feb 2016 00:00:24 +0000 (00:00 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Feb 2016 00:00:24 +0000 (00:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=153653

Reviewed by Brent Fulgham.

This will allow those clients to see the byte-range request ("Range:") header and respond
appropriately.

* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
(WebCore::WebCoreAVCFResourceLoader::startLoading):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196089 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp

index 5de5df30f4fc9ed2e32f251aa091d8baff9cff9d..1fefd5119960341fd5cd2c39b4c2370a49820b2b 100644 (file)
@@ -1,3 +1,16 @@
+2016-02-03  Jer Noble  <jer.noble@apple.com>
+
+        [Win] Pass entire request (rather than just URL) to clients of WebCoreAVCFResourceLoader
+        https://bugs.webkit.org/show_bug.cgi?id=153653
+
+        Reviewed by Brent Fulgham.
+
+        This will allow those clients to see the byte-range request ("Range:") header and respond
+        appropriately.
+
+        * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
+        (WebCore::WebCoreAVCFResourceLoader::startLoading):
+
 2016-02-03  Jer Noble  <jer.noble@apple.com>
 
         Yosemite build fix; hide the entire WebCoreNSURLSessionDataTask class from Yosemite and prior.
index 52291c2df859129dde1d1f6f8f5da05cd9524d61..e013c66210619b71bea32b23aac1e0b538490072 100644 (file)
@@ -69,10 +69,9 @@ void WebCoreAVCFResourceLoader::startLoading()
         return;
 
     RetainPtr<CFURLRequestRef> urlRequest = AVCFAssetResourceLoadingRequestGetURLRequest(m_avRequest.get());
-    URL requestURL = CFURLRequestGetURL(urlRequest.get());
 
     // ContentSecurityPolicyImposition::DoPolicyCheck is a placeholder value. It does not affect the request since Content Security Policy does not apply to raw resources.
-    CachedResourceRequest request(ResourceRequest(requestURL), ResourceLoaderOptions(SendCallbacks, DoNotSniffContent, BufferData, DoNotAllowStoredCredentials, DoNotAskClientForCrossOriginCredentials, ClientDidNotRequestCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck, DefersLoadingPolicy::AllowDefersLoading, CachingPolicy::DisallowCaching));
+    CachedResourceRequest request(ResourceRequest(urlRequest.get()), ResourceLoaderOptions(SendCallbacks, DoNotSniffContent, BufferData, DoNotAllowStoredCredentials, DoNotAskClientForCrossOriginCredentials, ClientDidNotRequestCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck, DefersLoadingPolicy::AllowDefersLoading, CachingPolicy::DisallowCaching));
 
     request.mutableResourceRequest().setPriority(ResourceLoadPriority::Low);
     CachedResourceLoader* loader = m_parent->player()->cachedResourceLoader();
@@ -80,7 +79,7 @@ void WebCoreAVCFResourceLoader::startLoading()
     if (m_resource)
         m_resource->addClient(this);
     else {
-        LOG_ERROR("Failed to start load for media at url %s", requestURL.string().ascii().data());
+        LOG_ERROR("Failed to start load for media at url %s", URL(CFURLRequestGetURL(urlRequest.get())).string().ascii().data());
         RetainPtr<CFErrorRef> error = adoptCF(CFErrorCreate(kCFAllocatorDefault, kCFErrorDomainCFNetwork, kCFURLErrorUnknown, nullptr));
         AVCFAssetResourceLoadingRequestFinishLoadingWithError(m_avRequest.get(), error.get());
     }