Skip to content

Commit 7f35fc2

Browse files
committed
Merge pull request pallets#751 from ThomasWaldmann/sprint-branch
fixing issues found while debugging, fix error in 1 test
2 parents abc1505 + bbfef4c commit 7f35fc2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

flask/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ def make_response(self, rv):
15511551
# set the headers and status. We do this because there can be
15521552
# some extra logic involved when creating these objects with
15531553
# specific values (like default content type selection).
1554-
if isinstance(rv, string_types):
1554+
if isinstance(rv, string_types + (bytes, )):
15551555
rv = self.response_class(rv, headers=headers, status=status)
15561556
headers = status = None
15571557
else:

flask/testsuite/appctx.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ def index():
8787
with flask._app_ctx_stack.top:
8888
with flask._request_ctx_stack.top:
8989
pass
90-
self.assert_true(flask._request_ctx_stack.request.environ
90+
self.assert_true(flask._request_ctx_stack.top.request.environ
9191
['werkzeug.request'] is not None)
92+
return u''
9293
c = app.test_client()
9394
c.get('/')
9495
self.assertEqual(called, ['request', 'app'])

0 commit comments

Comments
 (0)