diff --git a/lib/Gitlab/HttpClient/HttpClient.php b/lib/Gitlab/HttpClient/HttpClient.php index 7a84bfb43..6b786227b 100644 --- a/lib/Gitlab/HttpClient/HttpClient.php +++ b/lib/Gitlab/HttpClient/HttpClient.php @@ -148,7 +148,13 @@ public function put($path, array $parameters = array(), array $headers = array() */ public function request($path, array $parameters = array(), $httpMethod = 'GET', array $headers = array(), array $files = array()) { - $path = trim($this->baseUrl.$path, '/'); + $uri = @parse_url($path); + + if(!array_key_exists('scheme', $uri)) { + $path = $this->baseUrl . $path; + } + + $path = trim($path, '/'); $request = $this->createRequest($httpMethod, $path, $parameters, $headers, $files);