Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#9659 closed (fixed)

No output from `wsgi.file_wrapper`

Reported by: Jonas Borgström Owned by: Armin Ronacher
Component: HTTP handling Version: 1.0
Severity: Keywords:
Cc: Jonas Borgström Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The development server exposes the wsgi.file_wrapper extension but a typo in ServerHandler.finish_responsestops any file contents from making it to the browser.

  • django/core/servers/basehttp.py

     
    313313        in the event loop to iterate over the data, and to call
    314314        'self.close()' once the response is finished.
    315315        """
    316         if not self.result_is_file() and not self.sendfile():
     316        if not self.result_is_file() or not self.sendfile():
    317317            for data in self.result:
    318318                self.write(data)
    319319            self.finish_content()

Attachments (2)

9659-fixed-filewrapper.patch (2.6 KB ) - added by Armin Ronacher 16 years ago.
9659-fixed-filewrapper.2.patch (1.9 KB ) - added by Armin Ronacher 16 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 by Thomas Güttler, 16 years ago

Ticket #7894 does this change, too.

comment:2 by Jacob, 16 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:3 by Russell Keith-Magee, 16 years ago

Component: UncategorizedHTTP handling

comment:4 by Armin Ronacher, 16 years ago

Owner: changed from nobody to Armin Ronacher

comment:5 by Armin Ronacher, 16 years ago

Applied the fix and created a testcase.

by Armin Ronacher, 16 years ago

by Armin Ronacher, 16 years ago

comment:6 by Armin Ronacher, 16 years ago

Triage Stage: AcceptedReady for checkin

The latter has a better name for the tests. (basehttp_server)

comment:7 by Jacob, 16 years ago

Resolution: fixed
Status: newclosed

(In [10690]) Fixed #9659: fixed wsgi.file_wrapper in the builtin server. Thanks, mitsuhiko.

comment:8 by Jacob, 16 years ago

(In [10691]) [1.0.X] Fixed #9659: fixed wsgi.file_wrapper in the builtin server. Thanks, mitsuhiko. Backport of [10690] from trunk.

comment:9 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top