mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
25 lines
551 B
ReStructuredText
25 lines
551 B
ReStructuredText
Fix empty response into webhook.
|
||
|
||
We need to return something “empty”, and “empty” form doesn’t work since
|
||
it’s 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:
|
||
|
||
::
|
||
|
||
{}
|