Send X-Error-Format workaround on OAuth PUT too
authorRichard Fairhurst <richard@systemeD.net>
Mon, 18 Apr 2011 11:36:39 +0000 (12:36 +0100)
committerRichard Fairhurst <richard@systemeD.net>
Mon, 18 Apr 2011 11:36:39 +0000 (12:36 +0100)
net/systemeD/halcyon/connection/XMLConnection.as

index 0bf342d..a76f5ff 100644 (file)
@@ -179,7 +179,8 @@ package net.systemeD.halcyon.connection {
             urlReq.method = "POST";
                        if (xml) { urlReq.data = xml.toXMLString(); } else { urlReq.data = true; }
             urlReq.contentType = "application/xml";
             urlReq.method = "POST";
                        if (xml) { urlReq.data = xml.toXMLString(); } else { urlReq.data = true; }
             urlReq.contentType = "application/xml";
-            urlReq.requestHeaders = new Array(new URLRequestHeader("X_HTTP_METHOD_OVERRIDE", "PUT"));
+            urlReq.requestHeaders = [ new URLRequestHeader("X_HTTP_METHOD_OVERRIDE", "PUT"), 
+                                                 new URLRequestHeader("X-Error-Format", "XML") ];
             var loader:URLLoader = new URLLoader();
             loader.addEventListener(Event.COMPLETE, onComplete);
             loader.addEventListener(IOErrorEvent.IO_ERROR, onError);
             var loader:URLLoader = new URLLoader();
             loader.addEventListener(Event.COMPLETE, onComplete);
             loader.addEventListener(IOErrorEvent.IO_ERROR, onError);