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
c09326c5
Commit
c09326c5
authored
Apr 15, 2002
by
Brian Lloyd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed hotfix issues
parent
e6c61f04
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
5 deletions
+26
-5
lib/python/ZPublisher/HTTPResponse.py
lib/python/ZPublisher/HTTPResponse.py
+14
-3
lib/python/ZPublisher/Publish.py
lib/python/ZPublisher/Publish.py
+12
-2
No files found.
lib/python/ZPublisher/HTTPResponse.py
View file @
c09326c5
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
##############################################################################
##############################################################################
'''CGI Response Output formatter
'''CGI Response Output formatter
$Id: HTTPResponse.py,v 1.
59 2002/04/12 17:27:44 andreasjung
Exp $'''
$Id: HTTPResponse.py,v 1.
60 2002/04/15 20:58:28 Brian
Exp $'''
__version__
=
'$Revision: 1.
59
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
60
$'
[
11
:
-
2
]
import
types
,
os
,
sys
,
re
import
types
,
os
,
sys
,
re
from
string
import
translate
,
maketrans
from
string
import
translate
,
maketrans
...
@@ -157,7 +157,18 @@ class HTTPResponse(BaseResponse):
...
@@ -157,7 +157,18 @@ class HTTPResponse(BaseResponse):
# think that that's all that is ever passed.
# think that that's all that is ever passed.
return
self
.
__class__
(
stdout
=
self
.
stdout
,
stderr
=
self
.
stderr
)
return
self
.
__class__
(
stdout
=
self
.
stdout
,
stderr
=
self
.
stderr
)
_shutdown_flag
=
None
def
_requestShutdown
(
self
,
exitCode
=
0
):
"""Request that the server shut down with exitCode after fulfilling
the current request."""
sys
.
ZServerExitCode
=
exitCode
self
.
_shutdown_flag
=
1
def
_shutdownRequested
(
self
):
"""Returns true if this request requested a server shutdown."""
return
self
.
_shutdown_flag
is
not
None
def
setStatus
(
self
,
status
,
reason
=
None
):
def
setStatus
(
self
,
status
,
reason
=
None
):
'''
\
'''
\
Sets the HTTP status code of the response; the argument may
Sets the HTTP status code of the response; the argument may
...
...
lib/python/ZPublisher/Publish.py
View file @
c09326c5
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
##############################################################################
##############################################################################
__doc__
=
"""Python Object Publisher -- Publish Python objects on web servers
__doc__
=
"""Python Object Publisher -- Publish Python objects on web servers
$Id: Publish.py,v 1.15
5 2002/01/02 15:56:04 andreasjung
Exp $"""
$Id: Publish.py,v 1.15
6 2002/04/15 20:58:28 Brian
Exp $"""
__version__
=
'$Revision: 1.15
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.15
6
$'
[
11
:
-
2
]
import
sys
,
os
import
sys
,
os
from
Response
import
Response
from
Response
import
Response
...
@@ -175,6 +175,16 @@ def publish_module(module_name,
...
@@ -175,6 +175,16 @@ def publish_module(module_name,
if
request
is
not
None
:
request
.
close
()
if
request
is
not
None
:
request
.
close
()
if
must_die
:
if
must_die
:
# Try to turn exception value into an exit code.
try
:
if
hasattr
(
must_die
[
1
],
'code'
):
code
=
must_die
[
1
].
code
else
:
code
=
int
(
must_die
[
1
])
except
:
code
=
must_die
[
1
]
and
1
or
0
if
hasattr
(
request
.
response
,
'_requestShutdown'
):
request
.
response
.
_requestShutdown
(
code
)
try
:
raise
must_die
[
0
],
must_die
[
1
],
must_die
[
2
]
try
:
raise
must_die
[
0
],
must_die
[
1
],
must_die
[
2
]
finally
:
must_die
=
None
finally
:
must_die
=
None
...
...
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