Skip to content

Commit

Permalink
Merge pull request thybag#136 from JulioECastro/develop
Browse files Browse the repository at this point in the history
fix: url with blank spaces
  • Loading branch information
thybag authored May 30, 2017
2 parents 83876e8 + 4393e1a commit 007fb8b
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 007fb8b

Please sign in to comment.