Skip to content

Commit

Permalink
fix: url with blank spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jecastro committed May 30, 2017
1 parent 83876e8 commit 4393e1a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Thybag/Auth/SoapClientAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
}
}

0 comments on commit 4393e1a

Please sign in to comment.