You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2013/05/15 11:08:10 UTC

svn commit: r1482731 - in /chemistry/dotcmis/trunk/DotCMIS/binding: atompub/atompub.cs http.cs

Author: fmui
Date: Wed May 15 09:08:10 2013
New Revision: 1482731

URL: http://svn.apache.org/r1482731
Log:
CMIS-632: closing response stream in SetContentStream()

Modified:
    chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs
    chemistry/dotcmis/trunk/DotCMIS/binding/http.cs

Modified: chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs?rev=1482731&r1=1482730&r2=1482731&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs Wed May 15 09:08:10 2013
@@ -1987,6 +1987,7 @@ namespace DotCMIS.Binding.AtomPub
 
             // make the call
             HttpUtils.Response resp = HttpUtils.InvokeDELETE(url, Session);
+            resp.CloseStream();
 
             // check response code
             if (resp.StatusCode == HttpStatusCode.OK || resp.StatusCode == HttpStatusCode.Accepted || resp.StatusCode == HttpStatusCode.NoContent)
@@ -2084,6 +2085,7 @@ namespace DotCMIS.Binding.AtomPub
 
             // send content
             HttpUtils.Response resp = HttpUtils.InvokePUT(url, contentStream.MimeType, headers, output, Session);
+            resp.CloseStream();
 
             // check response code
             if (resp.StatusCode != HttpStatusCode.OK && resp.StatusCode != HttpStatusCode.Created && resp.StatusCode != HttpStatusCode.NoContent)

Modified: chemistry/dotcmis/trunk/DotCMIS/binding/http.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/http.cs?rev=1482731&r1=1482730&r2=1482731&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/http.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/http.cs Wed May 15 09:08:10 2013
@@ -239,6 +239,14 @@ namespace DotCMIS.Binding.Impl
                 try { response.Close(); }
                 catch (Exception) { }
             }
+
+            public void CloseStream()
+            {
+                if (Stream != null)
+                {
+                    Stream.Close();
+                }
+            }
         }
     }