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
fb82351a
Commit
fb82351a
authored
Sep 22, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added an indication of whether an authoization header was present to
unauthorized errors.
parent
f57eaf49
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
lib/python/ZPublisher/Publish.py
lib/python/ZPublisher/Publish.py
+6
-7
No files found.
lib/python/ZPublisher/Publish.py
View file @
fb82351a
...
...
@@ -478,11 +478,11 @@ Publishing a module using CGI
containing the module to be published) to the module name in the
cgi-bin directory.
$Id: Publish.py,v 1.10
0 1998/09/21 23:37:09
jim Exp $"""
$Id: Publish.py,v 1.10
1 1998/09/22 16:44:37
jim Exp $"""
#'
#
##########################################################################
__version__
=
'$Revision: 1.10
0
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.10
1
$'
[
11
:
-
2
]
import
sys
,
os
,
string
,
cgi
,
regex
from
string
import
*
...
...
@@ -667,11 +667,10 @@ class ModulePublisher:
if
not
(
self
.
request
.
has_key
(
'REMOTE_USER'
)
and
self
.
request
[
'REMOTE_USER'
]):
self
.
response
[
'WWW-authenticate'
]
=
'basic realm="%s"'
%
realm
raise
'Unauthorized'
,
(
"""<strong>You are not authorized to access this resource.
</strong>
"""
)
m
=
"<strong>You are not authorized to access this resource.</strong>"
if
not
self
.
HTTP_AUTHORIZATION
:
m
=
m
+
'
\
n
<!-- No Authorization header-->'
raise
'Unauthorized'
,
m
def
forbiddenError
(
self
,
object
=
None
):
raise
'NotFound'
,
self
.
html
(
...
...
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