Changeset 150964 in webkit


Ignore:
Timestamp:
May 30, 2013 8:12:54 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Peter Gal <galpeter@inf.u-szeged.hu> 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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r150962 r150964  
     12013-05-30  Peter Gal  <galpeter@inf.u-szeged.hu>
     2
     3        CURL: Incorrect stripping of query from file URL
     4        https://bugs.webkit.org/show_bug.cgi?id=104307
     5
     6        Reviewed by Darin Adler.
     7
     8        Clear the query part of the file URL if there is any.
     9
     10        * platform/network/curl/ResourceHandleManager.cpp:
     11        (WebCore::ResourceHandleManager::initializeHandle):
     12
    1132013-05-30  Antti Koivisto  <antti@apple.com>
    214
  • trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp

    r150221 r150964  
    667667
    668668    if (kurl.isLocalFile()) {
    669         String query = kurl.query();
    670669        // Remove any query part sent to a local file.
    671         if (!query.isEmpty()) {
    672             int queryIndex = url.find(query);
    673             if (queryIndex != -1)
    674                 url = url.left(queryIndex - 1);
     670        if (!kurl.query().isEmpty()) {
     671            // By setting the query to a null string it'll be removed.
     672            kurl.setQuery(String());
     673            url = kurl.string();
    675674        }
    676675        // Determine the MIME type based on the path.
Note: See TracChangeset for help on using the changeset viewer.