You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by jp...@apache.org on 2013/08/13 04:07:18 UTC
svn commit: r1513319 -
/chemistry/cmislib/trunk/src/cmislib/atompub_binding.py
Author: jpotts
Date: Tue Aug 13 02:07:17 2013
New Revision: 1513319
URL: http://svn.apache.org/r1513319
Log:
Fix for CMIS-701 which is to do a reload in the getContentStream method when the content element is missing
Modified:
chemistry/cmislib/trunk/src/cmislib/atompub_binding.py
Modified: chemistry/cmislib/trunk/src/cmislib/atompub_binding.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/src/cmislib/atompub_binding.py?rev=1513319&r1=1513318&r2=1513319&view=diff
==============================================================================
--- chemistry/cmislib/trunk/src/cmislib/atompub_binding.py (original)
+++ chemistry/cmislib/trunk/src/cmislib/atompub_binding.py Tue Aug 13 02:07:17 2013
@@ -2475,6 +2475,11 @@ class AtomPubDocument(AtomPubCmisObject)
contentElements = self.xmlDoc.getElementsByTagNameNS(ATOM_NS, 'content')
+ #CMIS-701
+ if len(contentElements) != 1:
+ self.reload()
+ contentElements = self.xmlDoc.getElementsByTagNameNS(ATOM_NS, 'content')
+
assert(len(contentElements) == 1), 'Expected to find exactly one atom:content element.'
# if the src element exists, follow that