diff --git a/src/Thybag/Auth/SoapClientAuth.php b/src/Thybag/Auth/SoapClientAuth.php index 1e8b698..4f384f5 100644 --- a/src/Thybag/Auth/SoapClientAuth.php +++ b/src/Thybag/Auth/SoapClientAuth.php @@ -92,6 +92,8 @@ public function __doRequest($request, $location, $action, $version, $one_way = 0 ); $this->__last_request_headers = $headers; + $location = $this->sanitizeUrl($location); + $ch = curl_init($location); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); @@ -129,4 +131,14 @@ public function __doRequest($request, $location, $action, $version, $one_way = 0 } } } + + /** + * Sanitize URL to request to Sharepoint + * + * @param string $url + * @return type string + */ + protected function sanitizeUrl($url) { + return str_replace(" ", "%20", $url); + } }