chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r1032617 - /incubator/chemistry/cmislib/trunk/src/cmislib/model.py
Date Mon, 08 Nov 2010 16:12:26 GMT
Author: fguillaume
Date: Mon Nov  8 16:12:26 2010
New Revision: 1032617

URL: http://svn.apache.org/viewvc?rev=1032617&view=rev
Log:
Fix descendants URL parsing

Modified:
    incubator/chemistry/cmislib/trunk/src/cmislib/model.py

Modified: incubator/chemistry/cmislib/trunk/src/cmislib/model.py
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/src/cmislib/model.py?rev=1032617&r1=1032616&r2=1032617&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/src/cmislib/model.py (original)
+++ incubator/chemistry/cmislib/trunk/src/cmislib/model.py Mon Nov  8 16:12:26 2010
@@ -25,6 +25,7 @@ from cmislib.exceptions import CmisExcep
 from cmislib import messages
 from urllib import quote_plus
 from urllib2 import HTTPError
+from urlparse import urlparse, urlunparse
 import re
 import mimetypes
 from xml.parsers.expat import ExpatError
@@ -2850,9 +2851,11 @@ class Folder(CmisObject):
         assert len(url) > 0, "Could not find the descendants url"
 
         # some servers return a depth arg as part of this URL
-        # so strip it off
+        # so strip it off but keep other args
         if url.find("?") >= 0:
-            url = url[:url.find("?")]
+            u = list(urlparse(url))
+            u[4] = '&'.join([p for p in u[4].split('&') if not p.startswith('depth=')])
+            url = urlunparse(u)
 
         return url
 



Mime
View raw message