165 Commits

Author SHA1 Message Date
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
Masashi SHIBATA
b15712924f Import unittest.mock unconditionally (#2050) 2019-05-28 16:09:44 +03:00
Masashi SHIBATA
c435341e66 Remove fallback for types.SimpleNamespace (#2049) 2019-05-28 16:05:51 +03:00
Masashi SHIBATA
a13a2096ed Use SourceFileLoader instead instead of execfile_ (#2046) 2019-05-26 22:09:52 +03:00
dblack
96dde54af1 optional datadog tags for statsd metrics 2019-04-27 18:49:47 -07:00
Brett Randall
879651bb6f Header values are encoded using latin-1, not ascii.
This commit reverts one aspect changed by 5f4ebd2eb2b08783a5fbefe79d09fcb3fc1fbc73 (#1151);
header-values are again encoded as latin-1 and not ascii. Test is restored but uses
a latin-1-mappable test-character, not a general utf8 character.

Fixed #1778.

Signed-off-by: Brett Randall <javabrett@gmail.com>
2019-04-18 04:23:19 +03:00
Hasan Ramezani
2b07f2be28 Rewrite parse_address util and add one test 2019-03-16 15:07:53 -07:00
Marat
a8963ef1a5 Remove redundant super() arguments 2019-03-16 15:00:07 -07:00
Benoit Chesneau
97a45805f8
remove gaiohttp worker (#1971)
* remove gaiohttp worker

worker is deprecated and won't work on latest version.
2019-01-24 23:05:28 +01:00
Daniel Pope
2ea5fbdc86 Use Python's default SSL cipher list by default (#1970) 2019-01-24 22:41:04 +01:00
Florian Apolloner
ee7af1247b Added support to --bind to open file descriptors (#1809)
Fixes #1107
2018-11-16 20:21:13 +03:00
Berker Peksag
c66957bbe9 Add support for named constants in the --ssl-version flag
Fixes #1114

Co-Authored-By: Brett Randall <javabrett@gmail.com>
Signed-off-by: Brett Randall <javabrett@gmail.com>
2018-10-31 14:43:40 +03:00
Konstantin vz'One Enchant
927fb2ba02 Prevent removal unix socket for reuse_port (#1887)
If you have two (or more) instances of gunicorn that use `reuse-port`
and bind to single unix socket all work until one of gunicorn will
stopped. Because the first stopped removes unix socket file and other
instances can't longer process requests.
2018-10-02 13:25:35 +02:00
Randall Leeds
e179dc2575 Support str and bytes for UNIX socket addresses (#1882)
Some systems report UNIX socket addresses as bytes while others will
report it as a unicode string type. This patch improves socket type
detection code to support both.

Fix #1861
2018-09-24 08:57:53 +02:00
Hugo
e974f30517 Drop support for Python 2
Co-Authored-By: Dustin Ingram <di@users.noreply.github.com>
Co-Authored-By: Berker Peksag <berker.peksag@gmail.com>
2018-08-01 15:31:17 +03:00
Hugo
78208c8c32 Drop support for EOL Python 3.2 and 3.3 (#1839) 2018-07-29 14:07:36 +03:00
Diego Oliveira
43e31c366b Fix gaiohttp worker 2018-05-26 10:42:15 -03:00
Yun Xu
0af5641117 fixing zero bytes case in atoms access log 2018-05-18 13:15:03 -07:00
Berker Peksag
473ac62a2b Revert "Add test and update documentation"
This reverts commit eab1256052d7446359fb6f65279f9bebd18fafd4.
2018-05-06 18:10:53 +03:00
Berker Peksag
eab1256052 Add test and update documentation 2018-05-06 18:05:54 +03:00
Jacob Eiting
f12ef22281 Handle UnicodeDecodeError in _get_user() (#1684)
Fixes #1683
2018-01-18 04:29:25 +03:00
Berker Peksag
76eaa0805b Fix various warnings and errors reported by pylint 2018-01-11 09:59:31 +03:00
Randall Leeds
b07532be75 Forbid contradictory secure scheme headers
When a request specifies contradictory secure scheme headers, raise a
parse error.
2018-01-10 12:10:35 -08:00
YuppY
5953148573 Do not strip leading slash from path (#1511)
Fixes #1512
2017-12-28 11:32:47 +03:00
Hasan Ramezani
70fd6193f6 Add some tests for to_bytestring util 2017-12-11 22:50:06 +03:30
Juan Julián Merelo Guervós
6ba2ebe545 Make "failed to find application" more informative (#1648)
Co-Authored-By: Luis Liñán Villafranca <luislivilla@gmail.com>

Fixes #1647
2017-11-24 10:42:03 +03:00
Hasan Ramezani
90b7daebb6 Fix invalid auto_int value error when --umask=0 passed (#1632)
Fixes #1622
2017-10-28 10:48:23 +03:00
Hasan Ramezani
595ca263dd Add tests for util.{http_date,is_ipv6,warn} (#1630) 2017-10-22 21:20:19 +03:00
Hasan Ramezani
0ceb00e4ad Improve test coverage of util.parse_address() (#1629) 2017-10-22 19:55:44 +03:00
Hasan Ramezani
81efa40da7 Improve parsing of 'unix://' addresses in parse_address (#1623) 2017-10-16 09:44:00 +03:00
Oliver Bristow
6a2a8b3298 Fix #1576 - config file/module in GUNICORN_CMD_ARGS 2017-09-16 11:41:57 +01:00
Raphaël Slinckx
15e901a5e5 http/message: Split request line as bytes to avoid splitting on 0x0A. Fixes #1577 2017-08-25 10:50:34 +02:00
Raphaël Slinckx
ccfb29871c tests: Fix send_bytes for testing requests 2017-08-25 10:44:00 +02:00
Berker Peksag
2b7b63ae58 Test that os.kill() is called 2017-07-12 18:07:16 +03:00
Berker Peksag
b64c7fa305 Add # noqa to a false-positive for unused-import warning 2017-07-12 18:07:16 +03:00
Benno Rice
a4461ba158 RequestParser takes two parameters. 2017-07-12 16:17:50 +03:00
Benno Rice
032271a030 Empty sequences are false, there's no need to check the len. 2017-07-12 16:15:42 +03:00
Berker Peksag
70947bb96a Skip test if WSGIServerHttpProtocol isn't available 2017-04-15 00:55:13 +03:00
Hasan Ramezni
31fed6b470 add tests for umask config. 2017-02-19 13:33:47 +03:30
Mark Adams
bc20bea7d9 Add support for --reload-engine
Currently, gunicorn automatically uses the preferred reloader (inotify
if present with fallback to polling). However, it would be useful in
some scenarios if users could force polling.

The solution for this is to add a new configuration option called
'reload_engine' which takes one of three options: ['auto', 'poll',
'inotify'].

Fixes #1459
2017-02-14 19:49:37 +03:00
Berker Peksag
31b8e48a78 Silence prospector warnings 2017-02-07 09:05:43 +03:00
Berker Peksag
5559f27ea2 Fix test_ssl 2017-02-06 09:18:41 +03:00
Berker Peksag
577c3eb030 Use the best available reloader when --reload is passed
Fixes #1422
2017-02-06 07:32:14 +03:00
Benoit Chesneau
bd19be1b61 Merge pull request #1414 from benoitc/fix/1091-pidfile-eperm
Fix/1091 pidfile eperm
2017-02-01 14:14:13 +01:00
Benoit Chesneau
21ffa92be1 Merge pull request #1394 from jonashaag/master
Add child_exit() callback to configuration
2017-01-27 16:00:58 +01:00
Hasan Ramezni
e9a00b75c5 add empty line after some tests. 2017-01-17 20:37:02 +03:00
Hasan Ramezni
e007601f0d test error message in test_invalid_enviroment_variables_config test. 2017-01-17 00:55:45 +03:00
Hasan Ramezni
bb2496db7b test_cmd_line_invalid_setting added. 2017-01-15 23:34:23 +03:00
Randall Leeds
22de9c5693 add pidfile validate tests 2017-01-11 19:52:15 -08:00