web-push-php icon indicating copy to clipboard operation
web-push-php copied to clipboard

Getting 413 Request Entity Too Large error on Firefox Android

Open geetpurwar opened this issue 3 years ago • 3 comments

Hi,

I have tried auto padding and both reducing payload to just word "hello" Still that doesn't work.

Any help. Response attached.

Thanks.

Screenshot 2020-11-15 at 4 15 29 PM

geetpurwar avatar Nov 15 '20 10:11 geetpurwar

You should disable automatic padding it doesn't work with firefox on android.

smeeckaert avatar Nov 16 '20 09:11 smeeckaert

Hello, I managed to make it work on Firefox for Android by reducing the padding to 2048 bytes (instead of 3052 as mentionned in the README).

$webPush = new WebPush();
$webPush ->setAutomaticPadding(2048);

Hope it can help others

DorianThDev avatar Apr 26 '23 02:04 DorianThDev

I've also noticed the padding issue with Firefox for Android, setting it to 2048 (or even higher up to at 2800) will fix it.

But another strange thing I noticed while looking at the content length of the eventual GuzzleHttp\Psr7\Request is that the content length always is 18 bytes larger than the padding should make it.

$webPush->setAutomaticPadding(2048);

[Content-Length] => Array ( [0] => 2066 )

sierky avatar Feb 29 '24 08:02 sierky

See #108

Minishlink avatar Mar 06 '24 11:03 Minishlink