Don't double-encode URL fragments
authorstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Sep 2007 21:21:37 +0000 (21:21 +0000)
committerstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Sep 2007 21:21:37 +0000 (21:21 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25472 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitQt/Api/qwebnetworkinterface.cpp
WebKitQt/ChangeLog

index e4310ec..6299fc9 100644 (file)
@@ -73,7 +73,7 @@ void QWebNetworkRequestPrivate::init(const WebCore::ResourceRequest &resourceReq
 
 void QWebNetworkRequestPrivate::init(const QString &method, const QUrl &url, const WebCore::ResourceRequest *resourceRequest)
 {
-    httpHeader = QHttpRequestHeader(method, url.toEncoded(QUrl::RemoveScheme|QUrl::RemoveAuthority));
+    httpHeader = QHttpRequestHeader(method, url.toString(QUrl::RemoveScheme|QUrl::RemoveAuthority));
     httpHeader.setValue(QLatin1String("User-Agent"),
                          QLatin1String("Mozilla/5.0 (PC; U; Intel; Linux; en) AppleWebKit/420+ (KHTML, like Gecko)"));
     httpHeader.setValue(QLatin1String("Connection"), QLatin1String("Keep-Alive"));
@@ -484,7 +484,7 @@ void QWebNetworkManager::started(QWebNetworkJob *job)
             }
             
             job->d->request.httpHeader.setRequest(job->d->request.httpHeader.method(),
-                                                  newUrl.toEncoded(QUrl::RemoveScheme|QUrl::RemoveAuthority));
+                                                  newUrl.toString(QUrl::RemoveScheme|QUrl::RemoveAuthority));
             job->d->request.setURL(newUrl);
             job->d->redirected = true;
             return;
index a920232..48186d7 100644 (file)
@@ -1,3 +1,14 @@
+2007-09-10  Qing Zhao  <qing@staikos.net>
+
+        Reviewed by George Staikos.
+
+        Don't re-encode urls, resulting in double encoding.  Fixes login to
+        GMail.
+
+        * Api/qwebnetworkinterface.cpp:
+        (QWebNetworkRequestPrivate::init):
+        (QWebNetworkManager::started):
+
 2007-09-08  Mark Rowe  <mrowe@apple.com>
 
         Qt build fix.  Move stub method implementations to the right class.