mirror of
https://github.com/django/daphne.git
synced 2025-07-10 08:02:16 +03:00
Increase FileResponse chunk size for staticfiles handler
This commit is contained in:
parent
61b8940e99
commit
b129adf4a4
|
@ -49,7 +49,10 @@ class StaticFilesHandler(AsgiHandler):
|
||||||
|
|
||||||
if self._should_handle(request.path):
|
if self._should_handle(request.path):
|
||||||
try:
|
try:
|
||||||
return self.serve(request)
|
response = self.serve(request)
|
||||||
|
# Increase FileResponse block sizes so they're not super slow
|
||||||
|
response.block_size = 1024 * 256
|
||||||
|
return response
|
||||||
except Http404 as e:
|
except Http404 as e:
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
from django.views import debug
|
from django.views import debug
|
||||||
|
|
Loading…
Reference in New Issue
Block a user