You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At https://github.com/SherClockHolmes/webpush-go/blob/master/webpush.go#L186
the Content-Length header is set to len(ciphertext).
This is the wrong value but it doesn't matter because somehow the net/http library sets the value to the actual length of the actual content.
I discovered this because I had the same mistake and couldn't get my code to work after porting it to PHP, until I set the Content-Length to recordSize.
When I sent my request to my own server instead of to the notification endpoint, I discovered that the actual value of the Content-Length header is different in Go vs. PHP.
The text was updated successfully, but these errors were encountered:
At https://github.com/SherClockHolmes/webpush-go/blob/master/webpush.go#L186
the
Content-Length
header is set tolen(ciphertext)
.This is the wrong value but it doesn't matter because somehow the
net/http library
sets the value to the actual length of the actual content.I discovered this because I had the same mistake and couldn't get my code to work after porting it to PHP, until I set the
Content-Length
torecordSize
.When I sent my request to my own server instead of to the notification endpoint, I discovered that the actual value of the
Content-Length
header is different in Go vs. PHP.The text was updated successfully, but these errors were encountered: