web-push-php
web-push-php copied to clipboard
Getting 413 Request Entity Too Large error on Firefox Android
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](https://user-images.githubusercontent.com/1036139/99182946-5f0c9000-275e-11eb-9047-40f9ffce6ca7.png)
You should disable automatic padding it doesn't work with firefox on android.
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
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 )
See #108