Version 4.7.8
This commit is contained in:
1 parent
7b7404e741
commit
fd22d99e69
688 files changed
+19814
-10890
No files matched your search
@@ -1103,9 +1103,18 @@ class _Notification
|
||||
|
||||
$headers['Content-Length'] = \Minishlink\WebPush\Utils::safeStrlen($content);
|
||||
$headers['Authorization'] = $vapidHeaders['Authorization'];
|
||||
|
||||
// Step 8: Send the damn thing
|
||||
$response = $endpoint->request()->setHeaders( $headers )->post( $content );
|
||||
|
||||
try
|
||||
{
|
||||
// Step 8: Send the damn thing
|
||||
$response = $endpoint->request()->setHeaders( $headers )->post( $content );
|
||||
}
|
||||
catch( \IPS\Http\Request\Exception $e )
|
||||
{
|
||||
/* If the request failed (DNS issues, etc.). Log it and move on. */
|
||||
\IPS\Log::log( $e, 'pwa_notification' );
|
||||
continue;
|
||||
}
|
||||
|
||||
// Step 9: Check the response - 404/410 indicates a permanent problem, so delete that key
|
||||
if( \in_array( $response->httpResponseCode, array( 404, 410 ) ) )
|
||||
|
||||
Reference in new issue
Block a user