CherryPy changes the response code

In my python application using mod_wsgi and cherrypy ontop from Apache, my response code changes to 500 out of 403. I explicitly set this to 403.

i.e. cherrypy.response.status = 403

I do not understand where and why the response code that the client receives is 500. Does anyone have experience with this problem>

+3
source share
1 answer

HTTP Error 500 is used for internal server errors. Something on the server or in your application probably throws an exception, so no matter what you set for the response code, CherryPy will send 500 back.

, CherryPy ( ). CherryPy , .

+1

Source: https://habr.com/ru/post/1729321/


All Articles