mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-05 20:52:20 +03:00
Attempt better debug for #79
This commit is contained in:
parent
673815364f
commit
971bd70314
1 changed files with 4 additions and 2 deletions
|
|
@ -113,7 +113,9 @@ class Client
|
|||
'Content-Type: application/xml'
|
||||
));
|
||||
if (301 == $response->status) {
|
||||
$url = preg_replace('@^(https?:)?//[^/]+/@', '/', $result->getRedirectLocation());
|
||||
$location = $result->getRedirectLocation();
|
||||
\trigger_error("Redirect {$url} to {$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(
|
||||
|
|
@ -122,7 +124,7 @@ class Client
|
|||
));
|
||||
}
|
||||
if (300 <= $response->status) {
|
||||
throw new \SnappyMail\HTTP\Exception('', $response->status, $response);
|
||||
throw new \SnappyMail\HTTP\Exception("PROPFIND {$url}", $response->status, $response);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue