You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by ri...@apache.org on 2010/11/29 05:00:09 UTC

svn commit: r1040012 - /incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php

Author: richardm
Date: Mon Nov 29 04:00:08 2010
New Revision: 1040012

URL: http://svn.apache.org/viewvc?rev=1040012&view=rev
Log:
CMIS-281 -- updateProperties does not work -- Patch provided byPatrice Collardez

Modified:
    incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php

Modified: incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php
URL: http://svn.apache.org/viewvc/incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php?rev=1040012&r1=1040011&r2=1040012&view=diff
==============================================================================
--- incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php (original)
+++ incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php Mon Nov 29 04:00:08 2010
@@ -186,9 +186,9 @@ class CMISRepositoryWrapper
         curl_setopt($session, CURLOPT_CUSTOMREQUEST, $method);
         if ($contentType)
         {
-            $headers = array ();
-            $headers["Content-Type"] = $contentType;
-            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
+            curl_setopt($session, CURLOPT_HTTPHEADER, array (
+                "Content-Type: " . $contentType
+            ));
         }
         if ($content)
         {
@@ -196,9 +196,6 @@ class CMISRepositoryWrapper
         }
         if ($method == "POST")
         {
-            curl_setopt($session, CURLOPT_HTTPHEADER, array (
-                "Content-Type: " . $contentType
-            ));
             curl_setopt($session, CURLOPT_POST, true);
         }
         //TODO: Make this storage optional