I'm running web2py Version 2.24.1-stable+timestamp.2023.03.23.05.07.17 with Python3.9 on Linux RHEL9. I have a web2py application that exposes a website to the public, it succesfully handles about 50 requests per second :)
Every day I see a few errors with this traceback: Traceback (most recent call last): File "/var/www/medios/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File "applications/lmdiario/compiled/controllers.default.index.py", line 9, in <module> File "/var/www/medios/applications/lmdiario/modules/globales.py", line 2300, in get_publicidades_response layout = request.vars.layout or '' File "/var/www/medios/gluon/globals.py", line 325, in vars self.parse_all_vars() File "/var/www/medios/gluon/globals.py", line 296, in parse_all_vars for key, value in iteritems(self.post_vars): File "/var/www/medios/gluon/globals.py", line 317, in post_vars self.parse_post_vars() File "/var/www/medios/gluon/globals.py", line 253, in parse_post_vars dpost = cgi.FieldStorage(fp=body, environ=env, headers=headers, keep_blank_values=1) File "/usr/lib64/python3.9/cgi.py", line 482, in __init__ self.read_single() File "/usr/lib64/python3.9/cgi.py", line 675, in read_single self.read_binary() File "/usr/lib64/python3.9/cgi.py", line 697, in read_binary self.file.write(data) TypeError: write() argument must be str, not bytes I believe the error is related to this python bug <https://bugs.python.org/issue27777>: apparently *the error occurs when receiving requests with Content-Length but without Content-Disposition headers*. The errors are produced by random clients that send random POST requests. As the python bug is still opened, is there any way I can avoid this ticket errors? Using nginx to add the missing header? Changing web2py source code? What could I do? Thanks in advance! Warm regards, Lisandro -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/afdf34cf-ad90-419c-b738-2329bba5c324n%40googlegroups.com.

