#30567: Start passing FileResponse.block_size to wsgi.file_wrapper
-------------------------------------+-------------------------------------
               Reporter:  Chris      |          Owner:  nobody
  Jerdonek                           |
                   Type:             |         Status:  new
  Cleanup/optimization               |
              Component:  HTTP       |        Version:  master
  handling                           |       Keywords:
               Severity:  Normal     |  
block_size,wsgi.file_wrapper,FileResponse,wsgi
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 I noticed that Django's `FileResponse` class has a `block_size` attribute
 which can be customized by subclassing:
 
https://github.com/django/django/blob/415e899dc46c2f8d667ff11d3e54eff759eaded4/django/http/response.py#L393

 but it's not passed to `wsgi.file_wrapper`. Only the `filelike` object is
 passed:

 {{{
 response = environ['wsgi.file_wrapper'](response.file_to_stream)
 }}}

 (from:
 
https://github.com/django/django/blob/415e899dc46c2f8d667ff11d3e54eff759eaded4/django/core/handlers/wsgi.py#L144
 )

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30567>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.7cbc45a6d2f8c279139f664c09193339%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to