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
4f264a9a
Commit
4f264a9a
authored
Jan 07, 1999
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added get_header method so that http headers can be found by
their normal names.
parent
3e471022
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
lib/python/ZPublisher/Request.py
lib/python/ZPublisher/Request.py
+7
-2
No files found.
lib/python/ZPublisher/Request.py
View file @
4f264a9a
...
...
@@ -82,10 +82,10 @@
# file.
#
##############################################################################
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
3
$'
[
11
:
-
2
]
import
regex
from
string
import
atoi
,
atol
,
join
,
split
,
strip
,
rfind
from
string
import
atoi
,
atol
,
join
,
upper
,
split
,
strip
,
rfind
isCGI_NAME
=
{
'SERVER_SOFTWARE'
:
1
,
...
...
@@ -279,3 +279,8 @@ class Request:
def
has_key
(
self
,
key
):
return
self
.
get
(
key
,
Request
)
is
not
Request
def
get_header
(
self
,
name
,
default
=
None
):
# Return the named HTTP header, or an optional default
# argument or None if the header is not found.
name
=
upper
(
join
(
split
(
name
,
"-"
),
"_"
))
return
self
.
environ
.
get
(
name
,
default
)
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