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
6464f239
Commit
6464f239
authored
Mar 18, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added __bobo_realm__ and __bobo_hide_tracebacks__.
parent
32c35ddd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
lib/python/ZPublisher/Publish.py
lib/python/ZPublisher/Publish.py
+23
-5
No files found.
lib/python/ZPublisher/Publish.py
View file @
6464f239
...
@@ -149,6 +149,12 @@ Access Control
...
@@ -149,6 +149,12 @@ Access Control
error response to the web browser that causes a password dialog
error response to the web browser that causes a password dialog
to be displayed.
to be displayed.
Specifying a realm name for basic authentication
You can control the realm name used for Bobo's Basic
authentication by providing a module variable named
'__bobo_realm__'.
Using the web server to perform authentication
Using the web server to perform authentication
Some web servers cannot be coaxed into passing authentication
Some web servers cannot be coaxed into passing authentication
...
@@ -338,7 +344,11 @@ Exception handling
...
@@ -338,7 +344,11 @@ Exception handling
returned.
returned.
When a body is returned, traceback information will be included in a
When a body is returned, traceback information will be included in a
comment in the output.
comment in the output. The module variable
'__bobo_hide_tracebacks__' can be used to control how tracebacks are
included. If this variable and false, then tracebacks are included
in PRE tags, rather than in comments. This is very handy during
debugging.
Redirection
Redirection
...
@@ -377,7 +387,7 @@ Publishing a module using CGI
...
@@ -377,7 +387,7 @@ Publishing a module using CGI
containing the module to be published) to the module name in the
containing the module to be published) to the module name in the
cgi-bin directory.
cgi-bin directory.
$Id: Publish.py,v 1.7
8 1998/03/18 19:19:47
jim Exp $"""
$Id: Publish.py,v 1.7
9 1998/03/18 20:20:34
jim Exp $"""
#'
#'
# Copyright
# Copyright
#
#
...
@@ -432,7 +442,7 @@ $Id: Publish.py,v 1.78 1998/03/18 19:19:47 jim Exp $"""
...
@@ -432,7 +442,7 @@ $Id: Publish.py,v 1.78 1998/03/18 19:19:47 jim Exp $"""
# See end of file for change log.
# See end of file for change log.
#
#
##########################################################################
##########################################################################
__version__
=
'$Revision: 1.7
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.7
9
$'
[
11
:
-
2
]
def
main
():
def
main
():
...
@@ -442,7 +452,7 @@ def main():
...
@@ -442,7 +452,7 @@ def main():
if
__name__
==
"__main__"
:
main
()
if
__name__
==
"__main__"
:
main
()
import
sys
,
os
,
string
,
cgi
,
regex
,
regsub
import
sys
,
os
,
string
,
cgi
,
regex
,
regsub
,
CGIResponse
from
string
import
*
from
string
import
*
from
CGIResponse
import
Response
from
CGIResponse
import
Response
from
urllib
import
quote
,
unquote
from
urllib
import
quote
,
unquote
...
@@ -627,7 +637,15 @@ class ModulePublisher:
...
@@ -627,7 +637,15 @@ class ModulePublisher:
def
get_module_info
(
self
,
server_name
,
module_name
,
module
):
def
get_module_info
(
self
,
server_name
,
module_name
,
module
):
realm
=
"%s.%s"
%
(
module_name
,
server_name
)
# Let the app specify a realm
if
hasattr
(
module
,
'__bobo_realm__'
):
realm
=
module
.
__bobo_realm__
else
:
realm
=
module_name
# Check whether tracebacks should be hidden:
if
(
hasattr
(
module
,
'__bobo_hide_tracebacks__'
)
and
not
module
.
__bobo_hide_tracebacks__
):
CGIResponse
.
_tbopen
,
CGIResponse
.
_tbclose
=
'<PRE>'
,
'</PRE>'
if
hasattr
(
module
,
'__bobo_before__'
):
bobo_before
=
module
.
__bobo_before__
if
hasattr
(
module
,
'__bobo_before__'
):
bobo_before
=
module
.
__bobo_before__
else
:
bobo_before
=
None
else
:
bobo_before
=
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