Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
dcd81ee7
Commit
dcd81ee7
authored
Jun 22, 2015
by
Gerhard Weis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check most specific interface first (IStreamIterator before IUnboundStreamIterator)
parent
92474cca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
src/ZPublisher/WSGIPublisher.py
src/ZPublisher/WSGIPublisher.py
+3
-3
src/ZPublisher/tests/test_WSGIPublisher.py
src/ZPublisher/tests/test_WSGIPublisher.py
+2
-0
No files found.
src/ZPublisher/WSGIPublisher.py
View file @
dcd81ee7
...
...
@@ -137,12 +137,12 @@ class WSGIResponse(HTTPResponse):
body
.
seek
(
0
)
self
.
setHeader
(
'Content-Length'
,
'%d'
%
length
)
self
.
body
=
body
elif
I
Unbound
StreamIterator
.
providedBy
(
body
):
elif
IStreamIterator
.
providedBy
(
body
):
self
.
body
=
body
self
.
_streaming
=
1
HTTPResponse
.
setBody
(
self
,
''
,
title
,
is_error
)
elif
IStreamIterator
.
providedBy
(
body
):
elif
I
Unbound
StreamIterator
.
providedBy
(
body
):
self
.
body
=
body
self
.
_streaming
=
1
HTTPResponse
.
setBody
(
self
,
''
,
title
,
is_error
)
else
:
HTTPResponse
.
setBody
(
self
,
body
,
title
,
is_error
)
...
...
src/ZPublisher/tests/test_WSGIPublisher.py
View file @
dcd81ee7
...
...
@@ -157,6 +157,7 @@ class WSGIResponseTests(unittest.TestCase):
response
.
setBody
(
body
)
response
.
finalize
()
self
.
assertTrue
(
body
is
response
.
body
)
self
.
assertEqual
(
response
.
_streaming
,
1
)
def
test_setBody_IStreamIterator
(
self
):
from
ZPublisher.Iterators
import
IStreamIterator
...
...
@@ -182,6 +183,7 @@ class WSGIResponseTests(unittest.TestCase):
response
.
setBody
(
body
)
response
.
finalize
()
self
.
assertTrue
(
body
is
response
.
body
)
self
.
assertEqual
(
response
.
_streaming
,
0
)
#def test___str__already_wrote_not_chunking(self):
# response = self._makeOne()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment