mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 15:08:28 +03:00
Bugfix: $result undefined for #79
This commit is contained in:
parent
971bd70314
commit
bc36b10348
1 changed files with 3 additions and 2 deletions
|
|
@ -113,9 +113,10 @@ class Client
|
|||
'Content-Type: application/xml'
|
||||
));
|
||||
if (301 == $response->status) {
|
||||
$location = $result->getRedirectLocation();
|
||||
// Like: RewriteRule ^\.well-known/carddav /nextcloud/remote.php/dav [R=301,L]
|
||||
$location = $response->getRedirectLocation();
|
||||
\trigger_error("Redirect {$url} to {$location}");
|
||||
$url = \preg_replace('@^(https?:)?//[^/]+/@', '/', $location);
|
||||
$url = \preg_replace('@^(https?:)?//[^/]+[/$]@', '/', $location);
|
||||
$parts = \parse_url($this->baseUri);
|
||||
$url = $parts['scheme'] . '://' . $parts['host'] . (isset($parts['port'])?':' . $parts['port']:'') . $url;
|
||||
$response = $this->HTTP->doRequest('PROPFIND', $url, $body, array(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue