fix empty response into webhook (#1665)

This commit is contained in:
Suren Khorenyan 2025-04-05 20:31:42 +03:00 committed by GitHub
parent 02683b8c37
commit 870d97c783
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 36 additions and 11 deletions

25
CHANGES/1664.bugfix.rst Normal file
View file

@ -0,0 +1,25 @@
Fix empty response into webhook.
We need to return something “empty”, and “empty” form doesnt work since
its sending only “end” boundary w/o “start”.
An empty formdata should look smth like this for Telegram to understand:
::
--webhookBoundaryvsF_aMHhspPjfOq7O0JNRg
--webhookBoundaryvsF_aMHhspPjfOq7O0JNRg--
But aiohttp sends only the ending boundary:
::
--webhookBoundaryvsF_aMHhspPjfOq7O0JNRg--
Such response doesn't suit Telegram servers.
The fix replaces empty response with empty JSON response:
::
{}