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
30624529
Commit
30624529
authored
Feb 29, 2016
by
Tres Seaver
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.13' of
https://github.com/gweis/Zope
into gweis-2.13
parents
114bf40b
f4c5d357
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
src/ZPublisher/WSGIPublisher.py
src/ZPublisher/WSGIPublisher.py
+1
-1
src/ZPublisher/tests/test_WSGIPublisher.py
src/ZPublisher/tests/test_WSGIPublisher.py
+25
-0
No files found.
src/ZPublisher/WSGIPublisher.py
View file @
30624529
...
...
@@ -282,7 +282,7 @@ def publish_module(environ, start_response,
body
=
response
.
body
if
isinstance
(
body
,
file
)
or
IStreamIterator
.
providedBy
(
body
):
if
isinstance
(
body
,
file
)
or
I
Unbound
StreamIterator
.
providedBy
(
body
):
result
=
body
else
:
# If somebody used response.write, that data will be in the
...
...
src/ZPublisher/tests/test_WSGIPublisher.py
View file @
30624529
...
...
@@ -447,6 +447,31 @@ class Test_publish_module(unittest.TestCase):
app_iter
=
self
.
_callFUT
(
environ
,
start_response
,
_publish
)
self
.
assertTrue
(
app_iter
is
body
)
def
test_response_is_unboundstream
(
self
):
from
ZPublisher.Iterators
import
IUnboundStreamIterator
from
zope.interface
import
implements
class
test_unboundstreamiterator
:
implements
(
IUnboundStreamIterator
)
data
=
"hello"
done
=
0
def
next
(
self
):
if
not
self
.
done
:
self
.
done
=
1
return
self
.
data
raise
StopIteration
_response
=
DummyResponse
()
_response
.
_status
=
'200 OK'
body
=
_response
.
body
=
test_unboundstreamiterator
()
environ
=
self
.
_makeEnviron
()
start_response
=
DummyCallable
()
_publish
=
DummyCallable
()
_publish
.
_result
=
_response
app_iter
=
self
.
_callFUT
(
environ
,
start_response
,
_publish
)
self
.
assertTrue
(
app_iter
is
body
)
def
test_request_closed_when_tm_middleware_not_active
(
self
):
environ
=
self
.
_makeEnviron
()
start_response
=
DummyCallable
()
...
...
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