chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1751223 - /chemistry/portcmis/trunk/PortCMIS/binding/atompub/AtomPubBinding.cs
Date Mon, 04 Jul 2016 07:52:01 GMT
Author: fmui
Date: Mon Jul  4 07:52:01 2016
New Revision: 1751223

URL: http://svn.apache.org/viewvc?rev=1751223&view=rev
Log:
CMIS-985: fixed AtomPub error handling

Modified:
    chemistry/portcmis/trunk/PortCMIS/binding/atompub/AtomPubBinding.cs

Modified: chemistry/portcmis/trunk/PortCMIS/binding/atompub/AtomPubBinding.cs
URL: http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/binding/atompub/AtomPubBinding.cs?rev=1751223&r1=1751222&r2=1751223&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/binding/atompub/AtomPubBinding.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/binding/atompub/AtomPubBinding.cs Mon Jul  4 07:52:01
2016
@@ -621,7 +621,8 @@ namespace PortCMIS.Binding.AtomPub
                 return null;
             }
 
-            return errorContent.Substring(begin + "<!--exception-->".Length, end);
+            int textStart = begin + "<!--exception-->".Length;
+            return errorContent.Substring(textStart, end - textStart);
         }
 
         protected string ExtractErrorMessage(string message, string errorContent)
@@ -639,7 +640,8 @@ namespace PortCMIS.Binding.AtomPub
                 return message;
             }
 
-            return errorContent.Substring(begin + "<!--message-->".Length, end);
+            int textStart = begin + "<!--message-->".Length;
+            return errorContent.Substring(textStart, end - textStart);
         }
 
         // ---- helpers ----



Mime
View raw message