Испытываю проблемы с отправкой больших сообщений через телеграм бота. В ходе поиска проблемы отбросил всю лишнюю обвязку и тестировал с помощью curl.
В случае отправки сообщения с текстом размером примерно до 1500, все работает, отправлял вот так:
curl -s -X POST https://api.telegram.org/bot<ТОКЕН>/sendMessage -d chat_id=<ID_ЧАТА> -d text="1100ertyikgnfdhgmcndgbtowewerttysadasdsasadsadddssasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsas"
В случае отправки большого сообщения, работать перестает, в даннос случае отправляю текст размеров 2200 символов:
curl -s -X POST https://api.telegram.org/bot<ТОКЕН>/sendMessage -d chat_id=<ID_ЧАТА> -d text="2200ertyikgnfdhgmcndgbtowewerttysadasdsasadsadddssasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasertyikgnfdhgmcndgbtowewerttysadasdsasadsadddssasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsasasadsas"
Используя ключ -vvvvvv для curl, увидел следующие подробности:
В первом случае (когда сообщение маленькое и отправка срабатывает) вижу:
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
Во втором случае (когда отправляю большое сообщение и отправка не срабатывает) вижу:
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
* Empty reply from server
* Connection #0 to host api.telegram.org left intact
* Closing connection #0
В чем может быть проблема?