-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
The gevent server keeps connections open for HTTP/1.1 requests, which will cause other connections to block.
To illustrate this issue, I configured gevent to use a pool of 1 greenlet. I accessed my long polling URL with Firefox, and observed the operation time out correctly. I then attempt to access the URL with wget, and it blocked until I quit Firefox or killed the server. This can be fixed by setting the 'Connection' response attribute to 'close', like this:
def dispatch(self, request, *args, **kwargs):
response = BaseLongPollingView.dispatch(self, request, *args, **kwargs)
response['Connection'] = 'close'
return response
Can you add a variable into BaseLongPollingView that, if true, will automatically add this attribute to the response?
Metadata
Metadata
Assignees
Labels
No labels