Until we have a working HTTP client that doesn't consider 201 as an error
authorJan Schneider <jan@horde.org>
Mon, 14 Sep 2009 10:45:15 +0000 (12:45 +0200)
committerJan Schneider <jan@horde.org>
Mon, 14 Sep 2009 10:45:15 +0000 (12:45 +0200)
response, work around it.

framework/Release/lib/Horde/Release.php

index 44c7ae3..f4e24f6 100644 (file)
@@ -685,7 +685,9 @@ class Horde_Release
                                     Horde_Serialize::serialize($fm_params, Horde_Serialize::JSON),
                                     array('Content-Type' => 'application/json'));
         } catch (Horde_Http_Client_Exception $e) {
-            throw new Horde_Exception($e);
+            if (strpos($e->getMessage(), '201 Created') === false) {
+                throw new Horde_Exception($e);
+            }
         }
 
         // 201 Created