Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Handling Requests with SSL Encountered #53

Open
mrzangivand opened this issue Mar 14, 2024 · 0 comments
Open

Error Handling Requests with SSL Encountered #53

mrzangivand opened this issue Mar 14, 2024 · 0 comments

Comments

@mrzangivand
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant