/** curl library fails to handle relative paths with pathed cookies correctly, so have to manually absolutize paths */ public function requestFix($method, $url, $post_vars = array(), $files = null) { //fixed post to handle relative url paths with $url = Http::absoluteUrl($url); $response = $this->request($method, $url, $post_vars, $files); if ($this->follow_redirects && $response->headers['Location']) { $url = Http::absoluteUrl($response->headers['Location'], $url); $response = $this->get($url); } $response->finalUrl = $url; return $response; }