2183 Commits

Author SHA1 Message Date
Benoit Chesneau
cfabfc8474 fix typo 2015-12-29 01:35:27 +01:00
Benoit Chesneau
d63571d17a fix news 2015-12-29 01:34:03 +01:00
Benoit Chesneau
01cdd8b62a bump to 19.4.2
fix #1159
2015-12-29 01:32:53 +01:00
Randall Leeds
98c9e3b375 Catch sendfile failure from no file descriptor
If the filelike response object has no `fileno` attribute, then skip
trying to use sendfile rather than failing with an error.

Close #1160
2015-12-28 14:50:46 -08:00
Benoit Chesneau
960d5ef7cc Merge pull request #1168 from benoitc/fix-config-test
fix sendfile option validation
2015-12-28 22:59:24 +01:00
Benoit Chesneau
9730978782 fix sendfile option validation
sendfile option don't set any default for now which makes the validation fail
(and then tests) since no boolean is given. For now just return when the value
is not set.
2015-12-28 20:39:45 +01:00
Benoit Chesneau
94c6dfe202 Merge pull request #1167 from benoitc/fix/gh1157
check auth before trying to own a file
2015-12-28 20:35:36 +01:00
Benoit Chesneau
3fdc113d81 fix gaiohttp test
fix #1164
2015-12-28 20:22:03 +01:00
Benoit Chesneau
c805bd2960 check auth before trying to own a file
fix #1157
2015-12-28 13:00:44 +01:00
Benoit Chesneau
d199e76cea revert TCP__FASTOPEN change
on OSX socket.TCP_FASTOPEN is set but make the server enter in a loop while
trying to set the options which makes gunicorn unusable.

For now remove TCP_FASTOPEN option until we find a solution
2015-12-28 12:56:11 +01:00
Randall Leeds
2f8e7503fe Always send access log to syslog if syslog is on 2015-12-27 13:30:37 -08:00
Randall Leeds
d8b6f0afff Clarify --no-sendfile default
The --no-sendfile option had a confusing entry in the usage message.
Even though sendfile is enabled by default, the --no-sendfile flag
showed a true value as the default, which could be interpreted to
mean that by default sendfile support is disabled.

This change makes the default "None", meaning sendfile is not
disabled, which is hopefully slightly more clear.

Close #1156
2015-12-27 13:27:20 -08:00
Randall Leeds
2ac41c406b Merge pull request #1095 from danc86/handle-HaltServer-in-manage_workers
handle HaltServer in manage_workers
2015-12-26 14:35:55 -08:00
benoitc
0fbb94e8c6 Merge branch 'master' of github.com:benoitc/gunicorn 2015-12-24 09:52:59 +01:00
benoitc
c66a9722f6 Merge branch 'feature/tcp_fastopen' into tcp_fast 2015-12-24 09:51:18 +01:00
Berker Peksag
58108ef7e6 Tweak markup in faq.rst 2015-12-15 01:15:51 +02:00
Berker Peksag
4f597dc0aa Merge pull request #1163 from molivier/master
Fix Slowloris broken link. Close #1142
2015-12-15 01:13:58 +02:00
molivier
1025c4c55d Fix Slowloris broken link. Close #1142 2015-12-14 17:38:19 +01:00
Randall Leeds
1f3bdddfb2 Do not rely on sendfile sending requested count
Close #1155
2015-11-29 11:14:04 -08:00
benoitc
79e14a98dd update site demo.
fix #1145
2015-11-25 17:48:59 +01:00
benoitc
3b1c9b4ff7 update site 2015-11-25 17:23:42 +01:00
benoitc
6aba0680b9 document change 2015-11-25 16:59:37 +01:00
Benoit Chesneau
2a04b91dfa Merge pull request #1153 from mtustin-handy/patch-1
Fix random outdent which makes gtornado worker unusable
2015-11-25 16:53:39 +01:00
mtustin-handy
5c2cb816d0 Fix random outdent which makes gtornado worker unusable 2015-11-25 10:41:04 -05:00
benoitc
57e690d1b7 bump version 2015-11-25 16:25:41 +01:00
benoitc
09e0d4c7fc encode fix test 2015-11-25 14:11:54 +01:00
benoitc
55397be78a document the #1151 change 2015-11-25 13:35:16 +01:00
benoitc
5f4ebd2eb2 don't return utf8 header in example
Since the updated RFC 7230 implys that new Headers Key and Value should be
sent as USASCII only don't try to test utf8 headers in examples.

We now only encode them to ascii. Gunicorn will fail if it's unable to encode
them letting the responsability to the application to correctly encode the
response. (we are just a gateway).

While i'm here simplify the code to not create an extra function only used at
one place.

NOTE: if anyone come to a better solution, i am happy to revisit it on the
next release.

fix #1151
2015-11-25 13:29:46 +01:00
Benoit Chesneau
6b92575e00 Merge pull request #1094 from benoitc/1038-sendfile-seek
Simplify sendfile logic
2015-11-23 09:24:46 +01:00
Benoit Chesneau
f74dd0aa3c Merge pull request #1149 from benoitc/fix/gh1148
check if the auth type is Basic before getting the user name
2015-11-21 12:10:27 +01:00
benoitc
45f008187b also ignore binascii error when decoding the user in access log 2015-11-21 11:27:27 +01:00
benoitc
38261b5235 check if the auth type is Basic before getting the user name
fix #1148
2015-11-21 11:27:27 +01:00
benoitc
fd2350aa4f asert plain, to work with py35
fix #1150
2015-11-21 11:22:34 +01:00
benoitc
a5212691e5 Revert "add mock to the requirements"
This reverts commit 48831f526f0fd4235b953b6637cc86f1b9f0b7b4.
2015-11-21 10:03:45 +01:00
benoitc
48831f526f add mock to the requirements 2015-11-21 09:52:12 +01:00
benoitc
5d2ff5e2ce bump pytest version
fix #1150
2015-11-21 09:49:59 +01:00
benoitc
f154a889dc fix python 3.5 support 2015-11-20 13:56:09 +01:00
benoitc
6999878a40 forgot to remove the targets from tox 2015-11-20 13:46:13 +01:00
benoitc
8609a36f1c only support N, N-1 versions of pythons 2015-11-20 13:37:43 +01:00
benoitc
5d902e2a07 prepare the 19.4 release.
update changelog, bump the version.
2015-11-20 11:00:00 +01:00
Benoit Chesneau
c8f820b95a Merge pull request #1136 from shrkw/1135-fix-ssl-options-for-tornado
fix-ssl-options-for-tornado
2015-11-16 15:37:09 +01:00
Randall Leeds
18d2b92146 Simplify sendfile logic
A safe and reliable check for whether a file descriptor supports mmap
is to directly check if it is seekable. However, some seekable file
descriptors may also report a zero size when calling fstat. If there
is no content length specified for the response and it cannot be
determined from the file descriptor then it is not possible to know
what chunk size to send to the client. In this case, is it necessary
to fall back to unwinding the body by iteration.

The above conditions together reveal a straightforward and reliable
way to check for sendfile support. This patch modifies the Response
class to assert these conditions using a try/catch block as part of
a new, simplified sendfile method. This method returns False if it
is not possible to serve the response using sendfile. Otherwise, it
serves the response and returns True. By returning False when SSL is
in use, the code is made even simpler by removing the special support
for SSL, which is served well enough by the iteration protocol.

Fix #1038
2015-11-10 17:57:56 -08:00
Berker Peksag
302abd551a Merge pull request #1144 from edmorley/fix-faq-proc_name-link
Docs: Fix the link to the proc_name setting on the FAQ page
2015-11-11 02:28:58 +02:00
Ed Morley
b4523cfe7d Docs: Fix the link to the proc_name setting on the FAQ page 2015-11-10 14:14:07 +00:00
Berker Peksag
cf01376edc Merge pull request #1141 from irachex/fix-docs
Fix worker class link in FAQ
2015-11-04 21:50:23 +02:00
Huayi Zhang
dc0dbf3f6c Fix worker class link in FAQ 2015-11-05 02:47:59 +08:00
Berker Peksag
eb29a449aa Merge pull request #1137 from abesto/doc/graceful_timeout
Clarify documentation of graceful_timeout
2015-11-02 12:15:38 +02:00
Zoltán Nagy
f1bb0342ec Clarify documentation of graceful_timeout 2015-11-02 08:49:13 +01:00
Benoit Chesneau
d922df3902 make sure the users can access to the logs
make sure that a user is able to access to the logs after dropping a
privilege.

fix #1116
2015-10-31 09:17:43 +01:00
Hiroyuki Shirakawa
b4e86ad73f Fixes #1135 2015-10-28 12:04:08 +09:00