[SOUP] Stop removing the fragment identifier from resource requests
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2017 14:46:32 +0000 (14:46 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2017 14:46:32 +0000 (14:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=168509

Reviewed by Sergio Villar Senin.

I don't know why, but have always removed the fragment identifier from the URL when creating the SoupURI that
is passed to libsoup. Maybe it was a bug in a very old version of libsoup, but it doesn't look necessary anymore
and it's causing several layout test failures.

Fixes: http/tests/svg/svg-use-external.html
       imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-same-origin-with-hash.html
       imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-same-origin-with-hash.html

* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::createSoupURI): Do not remove the fragment identifier from the URL.

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

Source/WebCore/ChangeLog
Source/WebCore/platform/network/soup/ResourceRequestSoup.cpp

index f4f27c6..a26dbfe 100644 (file)
@@ -1,3 +1,21 @@
+2017-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [SOUP] Stop removing the fragment identifier from resource requests
+        https://bugs.webkit.org/show_bug.cgi?id=168509
+
+        Reviewed by Sergio Villar Senin.
+
+        I don't know why, but have always removed the fragment identifier from the URL when creating the SoupURI that
+        is passed to libsoup. Maybe it was a bug in a very old version of libsoup, but it doesn't look necessary anymore
+        and it's causing several layout test failures.
+
+        Fixes: http/tests/svg/svg-use-external.html
+               imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-same-origin-with-hash.html
+               imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-same-origin-with-hash.html
+
+        * platform/network/soup/ResourceRequestSoup.cpp:
+        (WebCore::ResourceRequest::createSoupURI): Do not remove the fragment identifier from the URL.
+
 2017-02-16  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         [JSC] Drop PassRefPtr from ArrayBuffer
index c5767e8..6457861 100644 (file)
@@ -208,13 +208,7 @@ GUniquePtr<SoupURI> ResourceRequest::createSoupURI() const
         return GUniquePtr<SoupURI>(soup_uri_new(urlString.utf8().data()));
     }
 
-    GUniquePtr<SoupURI> soupURI;
-    if (m_url.hasFragmentIdentifier()) {
-        URL url = m_url;
-        url.removeFragmentIdentifier();
-        soupURI.reset(soup_uri_new(url.string().utf8().data()));
-    } else
-        soupURI = m_url.createSoupURI();
+    GUniquePtr<SoupURI> soupURI = m_url.createSoupURI();
 
     // Versions of libsoup prior to 2.42 have a soup_uri_new that will convert empty passwords that are not
     // prefixed by a colon into null. Some parts of soup like the SoupAuthenticationManager will only be active