Hi there,
at the moment I use Litespeed 5.4.11 - Cpanel v92.0.6 - Cloudlinux 7.9.
I deployed a Django project with Cloudlinux Python App interface and its work like a charm, except during handling utf8 requests
for example when I make a request like :
domain.com/تست
i face with this error:
and raised this error at app level log:
but there is not any error log at the webserver level.
when I switch the webserver to Apache, the problem will be solved
I think it's relevant with Python Bug that fixed at LSWS 5.4.3 release:
sorry for my bad English <3
at the moment I use Litespeed 5.4.11 - Cpanel v92.0.6 - Cloudlinux 7.9.
I deployed a Django project with Cloudlinux Python App interface and its work like a charm, except during handling utf8 requests
for example when I make a request like :
domain.com/تست
i face with this error:
Code:
Internal Error
The server encountered an unexpected condition which prevented it from fulfilling the request.
and raised this error at app level log:
Code:
2021-02-19 13:55:59.137486 [ERROR] [UID:2001][6653] wsgiAppHandler pApp->start_response() return NULL.
Traceback (most recent call last):
File "/home1/user/virtualenv/name/3.8/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 130, in __call__
set_script_prefix(get_script_name(environ))
File "/home1/user/virtualenv/name/3.8/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 175, in get_script_name
script_url = get_bytes_from_wsgi(environ, 'SCRIPT_URL', '') or get_bytes_from_wsgi(environ, 'REDIRECT_URL', '')
File "/home1/user/virtualenv/name/3.8/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 200, in get_bytes_from_wsgi
return value.encode('iso-8859-1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 6-13: ordinal not in range(256)
when I switch the webserver to Apache, the problem will be solved
I think it's relevant with Python Bug that fixed at LSWS 5.4.3 release:
Code:
BUGFIX Fixed a problem with utf-8 characters in request URLs for Python applications.