Skip to content
Myr

Disable direct passthrough for accessing the data attribute on newer Werkzeugs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent eb622fb · Browse files · 1 file+2 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−0 removed

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:flask/testsuite/helpers.py+2 added
156 unmodified lines
157 rv = flask.send_file('static/index.html')158 self.assert_true(rv.direct_passthrough)159 self.assert_equal(rv.mimetype, 'text/html')160 with app.open_resource('static/index.html') as f:161 rv.direct_passthrough = False162 self.assert_equal(rv.data, f.read())163 rv.close()164165 def test_send_file_xsendfile(self):
13 unmodified lines
179 with catch_warnings() as captured:180 with app.test_request_context():181 f = open(os.path.join(app.root_path, 'static/index.html'))182 rv = flask.send_file(f)183 rv.direct_passthrough = False184 with app.open_resource('static/index.html') as f:185 self.assert_equal(rv.data, f.read())186 self.assert_equal(rv.mimetype, 'text/html')187 rv.close()
352 unmodified lines