Skip to content

Error Handling Requests with SSL Encountered #53

@mrzangivand

Description

@mrzangivand

I encountered an issue while deploying the bot on my server. When attempting to access the bot's URL over SSL (HTTPS), I receive the following error:

[14/03/2024 08:24:44] {/root/FileStreamBot/venv/lib/python3.10/site-packages/aiohttp/web_protocol.py:421} ERROR - Error handling request
Traceback (most recent call last):
File "/root/FileStreamBot/venv/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 350, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File "aiohttp/_http_parser.pyx", line 557, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message:
Invalid method encountered:
b'\x16\x03\x01\x02'

This error occurs consistently whenever I try to access the bot's URL with SSL enabled. It seems to be related to the bot's handling of requests under SSL.

I have followed the deployment instructions provided on the GitHub repository and have configured the necessary environment variables, including setting HAS_SSL to True, FQDN to my server's IP address, and ensuring the PORT is set to 443. However, the issue persists.

Could someone assist me in resolving this error so that I can successfully deploy the bot with SSL enabled? Any guidance or suggestions would be greatly appreciated. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions