Title: [150964] trunk/Source/WebCore
Revision
150964
Author
[email protected]
Date
2013-05-30 08:12:54 -0700 (Thu, 30 May 2013)

Log Message

CURL: Incorrect stripping of query from file URL
https://bugs.webkit.org/show_bug.cgi?id=104307

Patch by Peter Gal <[email protected]> on 2013-05-30
Reviewed by Darin Adler.

Clear the query part of the file URL if there is any.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::initializeHandle):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (150963 => 150964)


--- trunk/Source/WebCore/ChangeLog	2013-05-30 14:55:45 UTC (rev 150963)
+++ trunk/Source/WebCore/ChangeLog	2013-05-30 15:12:54 UTC (rev 150964)
@@ -1,3 +1,15 @@
+2013-05-30  Peter Gal  <[email protected]>
+
+        CURL: Incorrect stripping of query from file URL
+        https://bugs.webkit.org/show_bug.cgi?id=104307
+
+        Reviewed by Darin Adler.
+
+        Clear the query part of the file URL if there is any.
+
+        * platform/network/curl/ResourceHandleManager.cpp:
+        (WebCore::ResourceHandleManager::initializeHandle):
+
 2013-05-30  Antti Koivisto  <[email protected]>
 
         Separate generic font family settings to a class

Modified: trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp (150963 => 150964)


--- trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp	2013-05-30 14:55:45 UTC (rev 150963)
+++ trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp	2013-05-30 15:12:54 UTC (rev 150964)
@@ -666,12 +666,11 @@
     String url = ""
 
     if (kurl.isLocalFile()) {
-        String query = kurl.query();
         // Remove any query part sent to a local file.
-        if (!query.isEmpty()) {
-            int queryIndex = url.find(query);
-            if (queryIndex != -1)
-                url = "" - 1);
+        if (!kurl.query().isEmpty()) {
+            // By setting the query to a null string it'll be removed.
+            kurl.setQuery(String());
+            url = ""
         }
         // Determine the MIME type based on the path.
         d->m_response.setMimeType(MIMETypeRegistry::getMIMETypeForPath(url));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to