[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/kioslave/http
From:       Thiago Macieira <thiago () kde ! org>
Date:       2006-04-04 14:55:08
Message-ID: 1144162508.784243.21187.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 526404 by thiago:

Keep the fragment when doing redirections. (the HTTP requests and
redirections don't include fragments; it's a browser thing).

BUG:124654


 M  +10 -0     http.cc  


--- branches/KDE/3.5/kdelibs/kioslave/http/http.cc #526403:526404
@@ -3596,6 +3596,16 @@
       error(ERR_ACCESS_DENIED, u.url());
       return false;
     }
+
+    // preserve #ref: (bug 124654)
+    // if we were at http://host/resource1#ref, we sent a GET for "/resource1"
+    // if we got redirected to http://host/resource2, then we have to re-add
+    // the fragment:
+    if (m_request.url.hasRef() && !u.hasRef() &&
+        (m_request.url.host() == u.host()) &&
+        (m_request.url.protocol() == u.protocol()))
+      u.setRef(m_request.url.ref());
+    
     m_bRedirect = true;
     m_redirectLocation = u;
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic