summaryrefslogtreecommitdiffhomepage
path: root/auto/make
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2022-02-08 12:04:41 +0300
committerMax Romanov <max.romanov@nginx.com>2022-02-08 12:04:41 +0300
commit2b5941df74806d344c59ec0ca126b81cc7bbffe1 (patch)
tree653202ded2ce98760c5d4bc81b60ae11fd889db5 /auto/make
parente53ce40c5854d95722cdfc198626fcd5aecbe563 (diff)
downloadunit-2b5941df74806d344c59ec0ca126b81cc7bbffe1.tar.gz
unit-2b5941df74806d344c59ec0ca126b81cc7bbffe1.tar.bz2
Python: fixing incorrect function object dereference.
The __call__ method can be native and not be a PyFunction type. A type check is thus required before accessing op_code and other fields. Reproduced on Ubuntu 21.04, Python 3.9.4 and Falcon framework: here, the App.__call__ method is compiled with Cython, so accessing op_code->co_flags is invalid; accidentally, the COROUTINE bit is set which forces the Python module into the ASGI mode. The workaround is explicit protocol specification. Note: it is impossible to specify the legacy mode for ASGI.
Diffstat (limited to 'auto/make')
0 files changed, 0 insertions, 0 deletions