webhooksite / webhook.site

⚓️ Easily test HTTP webhooks with this handy tool that displays requests instantly.
https://webhook.site
Other
5.13k stars 398 forks source link

500 Internal error when content is Gzip Encoded #150

Open bdalpe opened 10 months ago

bdalpe commented 10 months ago

I'm getting an error "Unable to JSON encode payload. Error code: 5" when sending data that is gzip encoded to a self-hosted instance. I can't seem to figure out what is causing the issue. I've tried a number of Nginx configurations to try and decompress the data, but nothing seems to work.

Doesn't work:

echo '{"mydummy": "json"}' | gzip | curl -X POST -v -i --data-binary @- -H "Content-Encoding: gzip" https://<site>/<token>

Works:

echo '{"mydummy": "json"}' | gzip | curl -X POST -v -i --data-binary @- -H "Content-Encoding: gzip" https://webhook.site/<token>

and I see the "raw" data as Gzip encoded text.