chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1801447 - in /chemistry/portcmis/trunk: PortCMIS/binding/atompub/AtomPubBinding.cs PortCMISTests/SimpleCmisTest.cs
Date Mon, 10 Jul 2017 11:17:36 GMT
Author: fmui
Date: Mon Jul 10 11:17:36 2017
New Revision: 1801447

URL: http://svn.apache.org/viewvc?rev=1801447&view=rev
Log:
CMIS-1038: PortCMIS AtomPub: fixed incorrect MIME type on SetContentStream

Modified:
    chemistry/portcmis/trunk/PortCMIS/binding/atompub/AtomPubBinding.cs
    chemistry/portcmis/trunk/PortCMISTests/SimpleCmisTest.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=1801447&r1=1801446&r2=1801447&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/binding/atompub/AtomPubBinding.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/binding/atompub/AtomPubBinding.cs Mon Jul 10 11:17:36
2017
@@ -2887,7 +2887,7 @@ namespace PortCMIS.Binding.AtomPub
             }
 
             // send content
-            IResponse resp = Put(url, headers, new AtomPubHttpContent(BindingConstants.MediaTypeEntry,
(stream) =>
+            IResponse resp = Put(url, headers, new AtomPubHttpContent(contentStream.MimeType,
(stream) =>
             {
                 content.CopyTo(stream);
             }));

Modified: chemistry/portcmis/trunk/PortCMISTests/SimpleCmisTest.cs
URL: http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMISTests/SimpleCmisTest.cs?rev=1801447&r1=1801446&r2=1801447&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMISTests/SimpleCmisTest.cs (original)
+++ chemistry/portcmis/trunk/PortCMISTests/SimpleCmisTest.cs Mon Jul 10 11:17:36 2017
@@ -313,6 +313,8 @@ namespace PortCMISTests
                 // get content again
                 IContentStream content2 = doc.GetContentStream();
                 Assert.IsNotNull(content2);
+                Assert.IsNotNull(content2.MimeType);
+                Assert.IsTrue(content2.MimeType.StartsWith("text/plain", System.StringComparison.InvariantCultureIgnoreCase));
                 Assert.IsNotNull(content2.Stream);
 
                 Assert.AreEqual(contentString2, ConvertStreamToString(content2.Stream));



Mime
View raw message