Partial fix to bug 23167
[lhc/web/wiklou.git] / includes / HttpFunctions.php
index 8355ec1..5bf7050 100644 (file)
@@ -211,6 +211,15 @@ class HttpRequest {
                return $this->content;
        }
 
+       /**
+        * Set the parameters of the request
+        * @param $params array
+        * @todo overload the args param
+        */
+       public function setData($args) {
+               $this->postData = $args;
+       }
+
        /**
         * Take care of setting up the proxy
         * (override in subclass)
@@ -296,6 +305,8 @@ class HttpRequest {
        public function execute() {
                global $wgTitle;
 
+               $this->content = "";
+
                if( strtoupper($this->method) == "HEAD" ) {
                        $this->headersOnly = true;
                }