summaryrefslogtreecommitdiff
path: root/plugins
Commit message (Collapse)AuthorAgeFilesLines
* fix build with PHP >= 8.2Alexandre Rossi2023-01-101-0/+4
| | | | | | from https://raw.githubusercontent.com/php/php-src/PHP-8.2/UPGRADING.INTERNALS: ======================== 5. SAPI changes ======================== * The signature of php_module_startup() has changed from int php_module_startup(sapi_module_struct *sf, zend_module_entry +*additional_modules, uint32_t num_additional_modules) to zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry +*additional_module) as only one additional module was ever provided.
* plugins/python: Use "backslashreplace" on stderr initializationNicolas Evrard2022-11-171-1/+1
| | | | | Failing to use this value will result in enconding errors when logging unicode characters to stderr
* Use parentheses in print() statement.eleksir2022-10-221-1/+1
| | | | | | In py3 print is not a keyword, it is function, so it must be called with parentheses. This fix compatible with py2 as it does not denies using print as print().
* Merge pull request #2150 from ddowling/masterRiccardo Magliocchetti2022-09-191-0/+2
|\ | | | | Ensure '-lrt' is included on the link line after linking to python li…
| * Ensure '-lrt' is included on the link line after linking to python library. ↵Denis Dowling2020-04-151-0/+2
| | | | | | | | Python depends on clock_gettime() and other functions in librt. Nothing else in uwsgi has a dependency on librt so if this library is only specified early on the link line then the library is dropped by the linker.
* | Merge pull request #2459 from wpj-cz/php_81_appRiccardo Magliocchetti2022-08-291-0/+1
|\ \ | | | | | | PHP: Fix php-app for php81
| * | PHP: Fix php-app for php81Joe2022-07-111-0/+1
| | |
* | | Merge pull request #2458 from gavin-jeong/fix-segfaultRiccardo Magliocchetti2022-08-281-1/+1
|\ \ \ | | | | | | | | Fix segfault from GEVENT_SWITCH
| * | | Fix segfault from GEVENT_SWITCHgavin.jeong2022-07-111-1/+1
| |/ /
* | | Merge pull request #2453 from vstinner/python311Riccardo Magliocchetti2022-07-303-6/+57
|\ \ \ | |/ / |/| | Add Python 3.11 support
| * | Add Python 3.11 supportVictor Stinner2022-06-303-6/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use PyFrame_GetCode(). * Add PyFrame_GetCode() for Python 3.8 and older. * Add UWSGI_PY311 macro: defined on Python 3.11 and newer. * struct uwsgi_python: "current_recursion_depth" becomes "current_recursion_remaining" and current_frame type becomes _PyCFrame** on Python 3.11. Related Python 3.11 changes: * https://docs.python.org/dev/whatsnew/3.11.html#id6 * The PyFrameObject structure became opaque. * PyThreadState.frame (PyFrameObject) became PyThreadState.cframe (_PyCFrame) in Python 3.11. * PyThreadState: recursion_depth was replaced with recursion_remaining + recursion_limit.
* | | Merge pull request #2445 from hugovk/masterRiccardo Magliocchetti2022-06-291-9/+1
|\ \ \ | | | | | | | | Use threading.current_thread, has existed since Python 2.6
| * | | Use threading.current_thread, has existed since Python 2.6Hugo van Kemenade2022-06-121-9/+1
| | | |
* | | | Replace all `os.system` usage with `subprocess.call`Peter Law2022-06-233-5/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This aims to fix intermittent build failures on some platforms (most notably Debian Bullseye) which appear to be due to the use of `os.system` from background threads. The exact nature of the issue is unclear, however moving to `subprocess.call` appears to fix it. Fixes https://github.com/unbit/uwsgi/issues/2447. While there's more that could be done here to modernise these calls, this aims to be a minimal change which introduces subprocess without much intrusion.
* | | plugins/python: Properly call `.close()` as mandated by WSGI specs.Florian Apolloner2022-04-041-15/+16
| | | | | | | | | | | | | | | | | | | | | uWSGI did not call `.close()` on objects returned by `wsgi.file_wrapper`. This resulted on `.close()` beeing called when the gc managed to clean up the object (which apparently did not happen with refcounting due to cyclic references) resulting in hard to debug errors.
* | | Merge pull request #2388 from majorgreys/fix-worker-deadlockRiccardo Magliocchetti2022-03-212-5/+77
|\ \ \ | |/ / |/| | fix(python-plugin): update internal interpreter state immediately upon forking
| * | fix(python-plugin): add uwsgi fork hooks to update internal interpreter stateTahir Butt2021-12-292-5/+77
| | |
* | | Remove stray license headers that don't comply with the global GPL2 + ↵Niels Doucet2022-02-021-20/+0
| | | | | | | | | | | | | | | | | | linking exception licensing model adopted with version 2. Fixes #2401
* | | plugins/php: handle php8.1 zend_file_handle signature changeRiccardo Magliocchetti2022-01-301-6/+11
| | | | | | | | | | | | | | | | | | filename is now a zend_string. Refs #2394
* | | fix: missing arginfo when compiling against PHP 8Дамјан Георгиевски2021-12-291-14/+17
| | | | | | | | | | | | fixes https://github.com/unbit/uwsgi/issues/2356
* | | Add PY_SSIZE_T_CLEAN define for Python 3.10 supportThea Flowers2021-11-021-0/+2
|/ /
* | Merge pull request #2331 from jrd/masterUnbit2021-07-151-3/+3
|\ \ | | | | | | Allow to compile on Python versions with more that two digits (Python 3.10)
| * | Allow to compile on Python versions with more that two digits (Python 3.10)Cyrille Pontvieux2021-07-011-3/+3
| | |
* | | allow 'iteration' option to uwsgi::add_rb_timerLuciano Rocha2021-06-301-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The caller can now specify a custom iteration value when setting an rb_timer. The default is still zero if no third parameter is passed, i.e.: uwsgi::add_rb_timer($signal, $interval); Is the same as: uwsgi::add_rb_timer($signal, $interval, 0);
* | | take into account new naming for LIBPL since python 3.6ilrico2021-06-251-0/+4
|/ / | | | | related to issues 2270 and 2293
* | Merge pull request #2265 from ehossack/docs/http-timeoutUnbit2021-06-011-1/+1
|\ \ | | | | | | Document http-timeout default of 60 seconds
| * | plugins/http: document http-timeout default of 60 secondsÉtienne H2020-12-051-1/+1
| | | | | | | | | | | | Refs #2264
* | | plugins/gevent: fix compilation with clang11László Károlyi2021-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | plugins/gevent/gevent.c[thread 11]: 392:21: error: cast to smaller integer type 'PyGILState_STATE' from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast] PyGILState_Release((PyGILState_STATE) pthread_getspecific(up.upt_gil_key)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix #2238
* | | plugins/php: fixup sapi_uwsgi_log_message signature for PHP 8Riccardo Magliocchetti2021-02-211-1/+3
| | |
* | | plugins/php: remove TSRMLS_* macrosRiccardo Magliocchetti2021-02-211-37/+33
| | | | | | | | | | | | They are gone in PHP 8 and were inert since PHP 7.
* | | plugins/php: drop PHP < 7 codeRiccardo Magliocchetti2021-02-213-54/+0
| | | | | | | | | | | | Not supported upstream since years.
* | | fix segfaults when using --wsgi-env-behavior=holy.Antonio Cuni2021-01-221-0/+1
|/ / | | | | | | | | | | PyTuple_SetItem does NOT increment the item, so we need to do it explicitly. Without this, then env gets a negative refcnt during the deallocation of async_args, with all kinds of funny behaviors.
* | plugins/python: use Py_CompileStringRiccardo Magliocchetti2020-11-292-32/+16
| | | | | | | | | | | | | | | | | | Instead of the deprecated PyParser_SimpleParseString, PyParser_SimpleParseFile and PyNode_Compile. While at it fixup a possible null pointer dereference when uwsgi_open_and_read returns an empty string. See https://bugs.python.org/issue40939
* | plugins/python: don't call PyEval_InitThreads on python >= 3.7Riccardo Magliocchetti2020-11-292-0/+6
| | | | | | | | As it's already called in Py_Initialize() there.
* | plugins: use PyObject_CallObject() instead of PyEval_CallObject()Riccardo Magliocchetti2020-11-227-17/+17
| | | | | | | | | | Reference: https://bugs.python.org/issue29548
* | python: Use new Py_SET_SIZE API introduced in Python 3.9Daniel2020-10-072-4/+4
| | | | | | | | Fixes compile error using Python 3.10 while keeping backwards compatibility
* | (re)acquire GIL before calling any Python methodNick Brachet2020-06-221-0/+1
| |
* | in raw_body mode don't overwrite hr->remainsNick Brachet2020-06-221-2/+3
| |
* | use strrchr to get portDaniel Holth2020-06-121-1/+1
| | | | | | Noticed an ipv6 --http-socket=[::]:80 had a bad port.
* | Merge pull request #2147 from efficiosoft/cgi-chunked-inputRiccardo Magliocchetti2020-06-121-17/+44
|\ \ | | | | | | Add chunked request decoding to the CGI plugin
| * | Add chunked request decoding to the CGI pluginRobert Schindler2020-06-121-17/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a request using 'Transfer-Encoding: chunked' is routed to the CGI backend, the request body is now read and sent to the script chunk by chunk, allowing for requests with dynamic body length to pass. The CGI process's stdin is always closed after the last chunk has been written, regardless of --cgi-close-stdin-on-eof. A caveat is that it's only started to read the CGI process's output after the full request body has been consumed, meaning a CGI script may not start writing a response before it has read the entire body to avoid getting blocked during the write operation to stdout. Closes #2140
* | | Merge pull request #2142 from xenols/psgi-fix-chunked-read-eofRoberto De Ioris2020-06-071-2/+2
|\ \ \ | |/ / |/| | psgi: fix impossibility of determining the end of the chunked stream
| * | At the end of the stream, the uwsgi_chunked_read function returnsols2020-04-091-2/+2
| |/ | | | | | | | | | | | | | | len 0 and a pointer to a buffer filled with old data. Based on the description: https://perldoc.perl.org/5.16.1/perlapi.html, The newSVpv function in the case when the len is zero uses the strlen. This makes it impossible to determine the end of the stream since the last chunk returns endlessly.
* | Merge pull request #2152 from ncopa/cgi-improve-fd-santitizingRiccardo Magliocchetti2020-04-251-2/+15
|\ \ | | | | | | plugins/cgi: improve performance for santitizing file descriptors
| * | plugins/cgi: improve performance for santitizing file descriptorsNatanael Copa2020-04-201-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Only close file descriptors that are known to be open when /proc/self/fd or /dev/fd exists. Fall back and loop over all when those are missing. This improves performance significantly when number of max fds is high. fixes #2053
* | | Merge pull request #2138 from patrickdepinguin/loggingRiccardo Magliocchetti2020-04-182-3/+3
|\ \ \ | | | | | | | | plugins/{pypy,python}: get rid of unnecessary paste.script dependency
| * | | plugins/{pypy,python}: get rid of unnecessary paste.script dependencyThomas De Schampheleire2020-03-312-3/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | paste.script.util.logging_config is an old copy of logging.config from Python 2.5.1 (see [1]). There are no paste-specific details in it. By using logging.config directly, Python WSGI environments no longer need to have pastescript installed. [1] https://bitbucket.org/wilig/pastescript/commits/04d0db6b2f5ab360bdaa5b10511d969a24fde0ec
* | | Merge pull request #2141 from thekad/fix_psgi_gcc10Riccardo Magliocchetti2020-04-183-5/+2
|\ \ \ | |_|/ |/| | fix psgi plugin for GCC 10
| * | fix psgi plugin for GCC 10Jorge Gallegos2020-04-063-5/+2
| |/ | | | | | | Following guide here https://gcc.gnu.org/gcc-10/porting_to.html
* | gevent plugin: adapt to removal of deprecated interfaces in gevent 1.5.0 (#2149)Vytautas Liuolia2020-04-151-2/+7
|/ | | Adapt to removal of deprecated interfaces in gevent 1.5.0 still keep compatibility with gevent 1.1 & 1.2 series.