Title: [118526] trunk/Source/WebKit/blackberry
Revision
118526
Author
[email protected]
Date
2012-05-25 08:04:01 -0700 (Fri, 25 May 2012)

Log Message

[BlackBerry] Pass http headers to loader in download request
https://bugs.webkit.org/show_bug.cgi?id=87449

Reviewed by Rob Buis.

PR# 149283

This is to support byte-range download and we could pass http headers like
"Range" in download request to loader.

Reviewed internally by Lyon Chen.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::download):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (118525 => 118526)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-05-25 14:47:38 UTC (rev 118525)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-05-25 15:04:01 UTC (rev 118526)
@@ -638,7 +638,13 @@
 
 void WebPage::download(const Platform::NetworkRequest& request)
 {
-    d->load(request.getUrlRef().c_str(), 0, "GET", Platform::NetworkRequest::UseProtocolCachePolicy, 0, 0, 0, 0, false, false, true, "", request.getSuggestedSaveName().c_str());
+    vector<const char*> headers;
+    Platform::NetworkRequest::HeaderList& list = request.getHeaderListRef();
+    for (unsigned i = 0; i < list.size(); i++) {
+        headers.push_back(list[i].first.c_str());
+        headers.push_back(list[i].second.c_str());
+    }
+    d->load(request.getUrlRef().c_str(), 0, "GET", Platform::NetworkRequest::UseProtocolCachePolicy, 0, 0, headers.empty() ? 0 : &headers[0], headers.size(), false, false, true, "", request.getSuggestedSaveName().c_str());
 }
 
 void WebPagePrivate::loadString(const char* string, const char* baseURL, const char* contentType, const char* failingURL)

Modified: trunk/Source/WebKit/blackberry/ChangeLog (118525 => 118526)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-05-25 14:47:38 UTC (rev 118525)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-05-25 15:04:01 UTC (rev 118526)
@@ -1,3 +1,20 @@
+2012-05-25  Mary Wu  <[email protected]>
+
+        [BlackBerry] Pass http headers to loader in download request
+        https://bugs.webkit.org/show_bug.cgi?id=87449
+
+        Reviewed by Rob Buis.
+
+        PR# 149283
+
+        This is to support byte-range download and we could pass http headers like
+        "Range" in download request to loader.
+
+        Reviewed internally by Lyon Chen.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPage::download):
+
 2012-05-24  Mike Fenton  <[email protected]>
 
         [BlackBerry] InputHandler can hold a ref on an object when document is cleared.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to