2717 Commits

Author SHA1 Message Date
Benoit Chesneau
56e4a6cd7f
Merge pull request #2187 from benoitc/fix-2160
fix gunicorn when used with musl libc
2019-11-21 09:52:09 +01:00
Benoit Chesneau
46b6556a68
Merge pull request #2188 from benoitc/fix-input_terminated
fix wsgi.input_terminated
2019-11-21 09:51:24 +01:00
benoitc
265e58f9e8 fix wsgi.input_terminated
Sometimes both TRANSFER-ENCODING=chunked and CONTENT_LENGTH are set. Since gunicorn prioritise (following the HTTP1.1 spec) chunked encoding we should make sure in this case to signal to th application that the input is terminated by the server.

Without the change gunicorn were always setting wsg.input_terminated to False when a CONTENT_LENGTH header was present ignoring that Gunicorn was afaik handling the termination.
2019-11-20 23:07:14 +01:00
Benoit Chesneau
8d854ba8cd
Merge pull request #2134 from talham7391/2133-delay-reload
Start the reloader after the wsgi app has been loaded.
2019-11-20 22:30:05 +01:00
benoitc
d55c7cb015 fix lib discovery
LD_LIBRARY_PATH is sometimes empty, this change fix it.
Also test suffix with the "." as it seems to be an issue
2019-11-20 21:41:05 +01:00
benoitc
b8860ef615 fix gunicorn when used with musl libc
find_library('c') doesn't work in Alpine Linux. This happen because musl has a simpler implementation of libc.

This patch fix it by extending ctypes.util.find_library to search the libs using LD_LIBRARY_PATH.

Patch is based on e3f67780aa

See also https://bugs.python.org/issue21622

fix #2160
2019-11-20 21:40:58 +01:00
Benoit Chesneau
c5be1bae5c
Merge pull request #2181 from Sytten/fix/http-desync
Fix/http desync
2019-11-20 21:28:18 +01:00
Emile Fugulin
be513237cc Add syttent to THANKS 2019-11-20 12:57:46 -05:00
Emile Fugulin
ddf5e66ac8 Remove strict check of Transfer-Encoding 2019-11-20 12:25:39 -05:00
Gaige B Paulsen
4264e09c6f fix fromfd on solaris
This patches the fromfd code in socketfromfd by grabbing the correct symbol under SmartOS (SunOS).

The patch is pretty straightforward, basically switching on the OS to determine what the symbol is likely to be. If need be, I could put a try block around the original libc.getsockopt and then fall back to looking for _so_getsockopt, if that's preferred in this codebase

fix #2184
2019-11-20 07:09:43 +01:00
David Lord
19cb68f4c3 load application from factory function (#2178)
* load application from factory function

Use `ast.parse` to validate that the string passed to the CLI is either
an attribute name or a function call. Use `ast.literal_eval` to parse
any positional and keyword arguments to the function. Call the function
to get the real application.

Co-authored-by: Connor Brinton <connor.brinton@gmail.com>

* test coverage for util.import_app

* document app factory pattern
2019-11-19 23:09:53 +01:00
Emile Fugulin
f74324bd75 Handle multiple transfer-encoding 2019-11-18 22:29:02 -05:00
Emile Fugulin
bd8670b4db Handle duplicate content-length 2019-11-18 21:16:12 -05:00
Emile Fugulin
b798412444 Remove default strip of header name 2019-11-18 19:44:01 -05:00
Jason Madden
94ab209117
Merge pull request #2172 from benoitc/issue1925
Capture os.sendfile before patching in gevent and eventlet workers.
2019-11-13 13:14:55 -06:00
Jason Madden
902d9c89ab
Capture os.sendfile before patching in gevent and eventlet workers.
Fixes #1925 and fixes #2170.
2019-11-13 07:08:26 -06:00
Benoit Chesneau
438371ee90 fix doc version 2019-11-09 10:53:44 +01:00
Benoit Chesneau
a05a447e76
Change maintainers (#2147)
changes maintainers to shows who is active on the project as of today.
2019-10-30 18:11:31 +01:00
Benoit Chesneau
c1f17a084e doc enhancements. 2019-10-30 17:52:01 +01:00
Benoit Chesneau
83e07e5cf3 Fixed linting error in changelog 2019-10-30 17:40:35 +01:00
Benoit Chesneau
a1bb7a935a add 20.0 changelog 2019-10-30 17:15:29 +01:00
Benoit Chesneau
9edf8e8159 add 2018 changelog doc 2019-10-30 16:15:48 +01:00
Jun
21d6287e15 Fix fdopen RuntimeWarning in 3.8 (#2146) 2019-10-30 09:16:07 +01:00
Talha Malik
51a4afd7ef Remove locking in polling reloader 2019-10-29 15:17:42 -04:00
Talha Malik
a4b6b1385a Fixes #2133 2019-10-29 15:17:42 -04:00
Randall Leeds
3fcb551921
Merge pull request #2144 from Djailla/py38
[py38] Python 3.8 is now official, use it by default
2019-10-28 19:05:03 -07:00
Randall Leeds
c67f4bb742
Merge pull request #2143 from Djailla/coverage
[tests] Remove old coverage required version
2019-10-27 13:00:18 -07:00
Bastien Vallet
f0a9c6b4de [tests] Remove old coverage required version 2019-10-27 19:56:48 +01:00
Bastien Vallet
7d0c8f97f8 [py38] Python 3.8 is now official, use it by default 2019-10-27 19:52:51 +01:00
Benoit Chesneau
fa23cab8a2
Merge pull request #2142 from hramezani/issue_2123
Add some lint errors to .pylintrc disable list (#2123)
2019-10-27 18:17:31 +01:00
Hasan Ramezani
e7890d8d1b
Fix lint errors (#2123) 2019-10-27 11:57:16 +01:00
Hasan Ramezani
5d1d3af7f5
Add import-outside-toplevel to pylintrc disable list. 2019-10-25 11:09:20 +02:00
Randall Leeds
235f06c3af
Merge pull request #2128 from csgactuarial/Fix-Headers-Regex
Ensure header value is string before conducting regex search.
2019-10-19 16:44:00 -07:00
Jeff Brooks
ad6ed3f4c8 Implement check and exception for str type on value in Response process_headers method. 2019-10-15 09:03:44 -05:00
Jeff Brooks
54c820feb3 Ensure header value is string before conducting regex search on it. 2019-10-10 10:41:22 -05:00
Benoit Chesneau
e147feaf8b fix echo example on python 3.7 2019-09-27 23:15:59 +02:00
Benoit Chesneau
bc6b2fd320
Merge pull request #2121 from TylerLubeck/patch-1
Terminology changes
2019-09-27 20:18:53 +02:00
Tyler Lubeck
c6bb90ca82
Update CONTRIBUTING.md 2019-09-27 11:09:45 -07:00
Benoit Chesneau
e6a88dbfcd bump to 20.0.0 2019-09-27 01:47:03 +02:00
Benoit Chesneau
ce03c192f4 fix formatting 2019-09-27 01:45:03 +02:00
Tyler Lubeck
49341f1fb3
Terminology changes 2019-09-26 14:54:54 -07:00
johnthagen
f35ae584b4 Add pypy3 to list of tested environments (#2105) 2019-09-08 04:55:26 +03:00
Leonardo Furtado
799df751c7 Add link to CONTRIBUTING.md from README.rst (#2069) 2019-08-20 03:46:22 +03:00
장준영
d765f0d123 Group exceptions with same body together in Arbiter.run() (#2081) 2019-08-20 03:34:18 +03:00
John Whitlock
40d22ae38d Add setproctitle to extras_require (#2094)
This allows you to specify that you want setproctitle installed so that
gunicorn can set meaningful process names at install time or in a
requirements file.
2019-08-20 03:27:59 +03:00
Randall Leeds
40802904eb Avoid unnecessary chown of temporary files
When Gunicorn is configured to change the effective user or group of the
worker processes, it changes the owner and group fo the the temporary
files used for interprocess communication.

With this change, Gunicorn does not change the owner or group of the
files if the worker processes will run as the current effective user and
gorup. This change avoids calling chown when it is not necessary, which
may allow Gunicorn to be used in environments that restrict use of the
chown syscall.

Relates to #2059.
2019-08-19 11:22:58 -07:00
Martin Bašti
f38f717539 Fix pytest 5.0.0 compatibility
pytest.raises() returns exception info not the exception itself. They
changed implementation of exception info, so now .value property must be
used to get the exception instance and have proper output from str()
method.

https://github.com/pytest-dev/pytest/issues/5412

Signed-off-by: Martin Bašti <mbasti@redhat.com>
2019-07-17 18:56:18 +03:00
Martin Bašti
7e640f804c Logging: Handle auth type case insensitively
According RFC-7617 (inherited from RFC-2978) schema and parameter names are handled
case insensitively:
```
Note that both scheme and parameter names are matched case-
insensitively.
```

Signed-off-by: Martin Bašti <mbasti@redhat.com>
2019-07-17 18:56:18 +03:00
Marwan Rabbâa
dc7b5d5c48 Fix compatility with tornado 6 (#2001) 2019-06-04 14:17:01 -07:00
Masashi SHIBATA
b15712924f Import unittest.mock unconditionally (#2050) 2019-05-28 16:09:44 +03:00