aboutsummaryrefslogtreecommitdiffstats
path: root/x11/kdelibs3/files/patch-kioslave_http-http.cc
blob: 7c2565aa3a87f7c9e4dbafbf216c82d5361c9a30 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- kioslave/http/http.cc.orig  Fri Apr  7 06:17:01 2006
+++ kioslave/http/http.cc   Fri Apr  7 06:18:00 2006
@@ -3590,6 +3590,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;