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
995ffadc
Commit
995ffadc
authored
Aug 01, 2011
by
Nikolay Kim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert changes
parent
0a28612a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
src/ZPublisher/HTTPRequest.py
src/ZPublisher/HTTPRequest.py
+20
-10
No files found.
src/ZPublisher/HTTPRequest.py
View file @
995ffadc
...
@@ -332,13 +332,13 @@ class HTTPRequest(BaseRequest):
...
@@ -332,13 +332,13 @@ class HTTPRequest(BaseRequest):
self
.
environ
=
environ
self
.
environ
=
environ
get_env
=
environ
.
get
get_env
=
environ
.
get
self
.
response
=
response
self
.
response
=
response
other
=
self
.
other
=
{
'RE
QUEST'
:
self
,
'RE
SPONSE'
:
response
}
other
=
self
.
other
=
{
'RESPONSE'
:
response
}
self
.
form
=
{}
self
.
form
=
{}
self
.
taintedform
=
{}
self
.
taintedform
=
{}
self
.
steps
=
[]
self
.
steps
=
[]
self
.
_steps
=
[]
self
.
_steps
=
[]
self
.
_lazies
=
{}
self
.
_lazies
=
{}
self
.
debug
=
DebugFlags
()
self
.
_
debug
=
DebugFlags
()
# We don't set up the locale initially but just on first access
# We don't set up the locale initially but just on first access
self
.
_locale
=
_marker
self
.
_locale
=
_marker
...
@@ -379,8 +379,9 @@ class HTTPRequest(BaseRequest):
...
@@ -379,8 +379,9 @@ class HTTPRequest(BaseRequest):
while
b
and
b
[
0
]
==
'/'
:
while
b
and
b
[
0
]
==
'/'
:
b
=
b
[
1
:]
b
=
b
[
1
:]
if
'SERVER_URL'
in
environ
:
server_url
=
get_env
(
'SERVER_URL'
,
None
)
other
[
'SERVER_URL'
]
=
server_url
=
environ
[
'SERVER_URL'
].
strip
()
if
server_url
is
not
None
:
other
[
'SERVER_URL'
]
=
server_url
=
server_url
.
strip
()
else
:
else
:
if
'HTTPS'
in
environ
and
(
if
'HTTPS'
in
environ
and
(
environ
[
'HTTPS'
]
==
"on"
or
environ
[
'HTTPS'
]
==
"ON"
):
environ
[
'HTTPS'
]
==
"on"
or
environ
[
'HTTPS'
]
==
"ON"
):
...
@@ -1251,9 +1252,11 @@ class HTTPRequest(BaseRequest):
...
@@ -1251,9 +1252,11 @@ class HTTPRequest(BaseRequest):
categories. The search order is environment variables,
categories. The search order is environment variables,
other variables, form data, and then cookies.
other variables, form data, and then cookies.
"""
"""
#"
other
=
self
.
other
other
=
self
.
other
if
key
in
other
:
if
key
in
other
:
if
key
==
'REQUEST'
:
return
self
return
other
[
key
]
return
other
[
key
]
if
key
[:
1
]
==
'U'
:
if
key
[:
1
]
==
'U'
:
...
@@ -1263,7 +1266,7 @@ class HTTPRequest(BaseRequest):
...
@@ -1263,7 +1266,7 @@ class HTTPRequest(BaseRequest):
path
=
self
.
_script
+
self
.
_steps
path
=
self
.
_script
+
self
.
_steps
n
=
len
(
path
)
-
int
(
n
)
n
=
len
(
path
)
-
int
(
n
)
if
n
<
0
:
if
n
<
0
:
r
eturn
default
r
aise
KeyError
,
key
if
pathonly
:
if
pathonly
:
path
=
[
''
]
+
path
[:
n
]
path
=
[
''
]
+
path
[:
n
]
else
:
else
:
...
@@ -1281,6 +1284,9 @@ class HTTPRequest(BaseRequest):
...
@@ -1281,6 +1284,9 @@ class HTTPRequest(BaseRequest):
return
environ
[
key
]
return
environ
[
key
]
return
''
return
''
if
key
==
'REQUEST'
:
return
self
if
key
[:
1
]
==
'B'
:
if
key
[:
1
]
==
'B'
:
match
=
BASEmatch
(
key
)
match
=
BASEmatch
(
key
)
if
match
is
not
None
:
if
match
is
not
None
:
...
@@ -1379,6 +1385,8 @@ class HTTPRequest(BaseRequest):
...
@@ -1379,6 +1385,8 @@ class HTTPRequest(BaseRequest):
if
self
.
_locale
is
_marker
:
if
self
.
_locale
is
_marker
:
self
.
setupLocale
()
self
.
setupLocale
()
return
self
.
_locale
return
self
.
_locale
if
key
==
'debug'
:
return
self
.
_debug
raise
AttributeError
,
key
raise
AttributeError
,
key
return
v
return
v
...
@@ -1386,10 +1394,12 @@ class HTTPRequest(BaseRequest):
...
@@ -1386,10 +1394,12 @@ class HTTPRequest(BaseRequest):
self
.
_lazies
[
key
]
=
callable
self
.
_lazies
[
key
]
=
callable
def
has_key
(
self
,
key
,
returnTaints
=
0
):
def
has_key
(
self
,
key
,
returnTaints
=
0
):
v
=
self
.
get
(
key
,
_marker
,
returnTaints
=
returnTaints
)
try
:
if
v
is
_marker
:
self
.
__getitem__
(
key
,
returnTaints
=
returnTaints
)
return
False
except
:
return
True
return
0
else
:
return
1
def
keys
(
self
,
returnTaints
=
0
):
def
keys
(
self
,
returnTaints
=
0
):
keys
=
{}
keys
=
{}
...
...
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