1
0
Fork 0

Merge pull request #4599 from davidfuhr/http-400-error-handling

Fix handling of http 400 errors
pull/4690/head
Jordi Boggiano 2015-11-10 15:36:59 +00:00
commit 04879e82ae
1 changed files with 6 additions and 0 deletions

View File

@ -334,6 +334,12 @@ class RemoteFilesystem
{
switch ($notificationCode) {
case STREAM_NOTIFY_FAILURE:
if (400 === $messageCode) {
// This might happen if your host is secured by ssl client certificate authentication
// but you do not send an appropriate certificate
throw new TransportException("The '" . $this->fileUrl . "' URL could not be accessed: " . $message, $messageCode);
}
case STREAM_NOTIFY_AUTH_REQUIRED:
if (401 === $messageCode) {
// Bail if the caller is going to handle authentication failures itself.