chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmig...@apache.org
Subject svn commit: r1847584 - in /chemistry/cmislib/branches/py3_compat/src: cmislib/browser/binding.py tests/test_repository.py
Date Tue, 27 Nov 2018 19:07:37 GMT
Author: lmignon
Date: Tue Nov 27 19:07:37 2018
New Revision: 1847584

URL: http://svn.apache.org/viewvc?rev=1847584&view=rev
Log:
[PATCH] BrowserBinding: quote literal '+' into url path by default,
python requests doesn't quote the sting literal '+'. Nevertheless this
literal must be quoted when used in the getObjectByPath request


Modified:
    chemistry/cmislib/branches/py3_compat/src/cmislib/browser/binding.py
    chemistry/cmislib/branches/py3_compat/src/tests/test_repository.py

Modified: chemistry/cmislib/branches/py3_compat/src/cmislib/browser/binding.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/branches/py3_compat/src/cmislib/browser/binding.py?rev=1847584&r1=1847583&r2=1847584&view=diff
==============================================================================
--- chemistry/cmislib/branches/py3_compat/src/cmislib/browser/binding.py (original)
+++ chemistry/cmislib/branches/py3_compat/src/cmislib/browser/binding.py Tue Nov 27 19:07:37
2018
@@ -35,7 +35,7 @@ from cmislib.domain import CmisId, CmisO
 from cmislib.exceptions import CmisException, InvalidArgumentException, \
     NotSupportedException, ObjectNotFoundException
 from cmislib.util import parsePropValueByType, parseDateTimeValue, iteritems, \
-    itervalues
+    itervalues, safe_quote
 
 moduleLogger = logging.getLogger('cmislib.browser.binding')
 
@@ -791,7 +791,7 @@ class BrowserRepository(object):
          - includeAllowableActions
         """
 
-        url = self.getRootFolderUrl() + path
+        url = self.getRootFolderUrl() + safe_quote(path)
         params = {
             'cmisselector': 'object',
         }

Modified: chemistry/cmislib/branches/py3_compat/src/tests/test_repository.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/branches/py3_compat/src/tests/test_repository.py?rev=1847584&r1=1847583&r2=1847584&view=diff
==============================================================================
--- chemistry/cmislib/branches/py3_compat/src/tests/test_repository.py (original)
+++ chemistry/cmislib/branches/py3_compat/src/tests/test_repository.py Tue Nov 27 19:07:37
2018
@@ -154,7 +154,7 @@ class TestRepository:
         """Create test objects (one folder, one document) then try to get
         them by path"""
         # names of folders and test docs (without and with unicode char)
-        for suffix in ['', u'_éà€$']:
+        for suffix in ['', u'_éà€$', ' +']:
             parentFolderName = 'testGetObjectByPath folder' + suffix
             subFolderName = 'subfolder' + suffix
             docName = 'testdoc' + suffix



Mime
View raw message