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
a1b917f6
Commit
a1b917f6
authored
Dec 26, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused imports and local variables.
parent
687a32db
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
16 deletions
+9
-16
lib/python/ZPublisher/BaseResponse.py
lib/python/ZPublisher/BaseResponse.py
+3
-6
lib/python/ZPublisher/HTTPRequest.py
lib/python/ZPublisher/HTTPRequest.py
+3
-7
lib/python/ZPublisher/HTTPResponse.py
lib/python/ZPublisher/HTTPResponse.py
+3
-3
No files found.
lib/python/ZPublisher/BaseResponse.py
View file @
a1b917f6
...
...
@@ -12,13 +12,10 @@
##############################################################################
'''CGI Response Output formatter
$Id: BaseResponse.py,v 1.1
8 2003/11/18 13:17:17 tseaver
Exp $'''
__version__
=
'$Revision: 1.1
8
$'
[
11
:
-
2
]
$Id: BaseResponse.py,v 1.1
9 2003/12/26 23:48:18 jeremy
Exp $'''
__version__
=
'$Revision: 1.1
9
$'
[
11
:
-
2
]
import
types
,
sys
from
types
import
StringType
,
InstanceType
from
zExceptions
import
Unauthorized
,
Forbidden
from
zExceptions
import
NotFound
,
BadRequest
from
zExceptions
import
Unauthorized
,
Forbidden
,
NotFound
,
BadRequest
class
BaseResponse
:
"""Base Response Class
...
...
lib/python/ZPublisher/HTTPRequest.py
View file @
a1b917f6
...
...
@@ -11,9 +11,9 @@
#
##############################################################################
__version__
=
'$Revision: 1.9
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.9
6
$'
[
11
:
-
2
]
import
re
,
sys
,
os
,
urllib
,
time
,
random
,
cgi
,
codecs
import
re
,
sys
,
os
,
time
,
random
,
codecs
from
types
import
StringType
,
UnicodeType
from
BaseRequest
import
BaseRequest
from
HTTPResponse
import
HTTPResponse
...
...
@@ -205,7 +205,6 @@ class HTTPRequest(BaseRequest):
If the URL makes no sense in light of the current virtual
hosting context, a ValueError is raised."""
other
=
self
.
other
bad_server_url
=
0
path
=
filter
(
None
,
URL
.
split
(
'/'
))
if
URL
.
find
(
'://'
)
>=
0
:
...
...
@@ -214,7 +213,6 @@ class HTTPRequest(BaseRequest):
# Check the path against BASEPATH1
vhbase
=
self
.
_script
vhbl
=
len
(
vhbase
)
bad_basepath
=
0
if
path
[:
vhbl
]
==
vhbase
:
path
=
path
[
vhbl
:]
else
:
...
...
@@ -404,7 +402,7 @@ class HTTPRequest(BaseRequest):
CGI_name
=
isCGI_NAME
defaults
=
{}
tainteddefaults
=
{}
converter
=
seqf
=
None
converter
=
None
for
item
in
fslist
:
...
...
@@ -453,10 +451,8 @@ class HTTPRequest(BaseRequest):
converter_type
=
type_name
flags
=
flags
|
CONVERTED
elif
type_name
==
'list'
:
seqf
=
list
flags
=
flags
|
SEQUENCE
elif
type_name
==
'tuple'
:
seqf
=
tuple
tuple_items
[
key
]
=
1
flags
=
flags
|
SEQUENCE
elif
(
type_name
==
'method'
or
type_name
==
'action'
):
...
...
lib/python/ZPublisher/HTTPResponse.py
View file @
a1b917f6
...
...
@@ -12,8 +12,8 @@
##############################################################################
'''CGI Response Output formatter
$Id: HTTPResponse.py,v 1.7
7 2003/11/18 13:17:17 tseaver
Exp $'''
__version__
=
'$Revision: 1.7
7
$'
[
11
:
-
2
]
$Id: HTTPResponse.py,v 1.7
8 2003/12/26 23:48:18 jeremy
Exp $'''
__version__
=
'$Revision: 1.7
8
$'
[
11
:
-
2
]
import
types
,
os
,
sys
,
re
import
zlib
,
struct
...
...
@@ -288,7 +288,7 @@ class HTTPResponse(BaseResponse):
return
self
if
isinstance
(
body
,
tuple
)
and
len
(
body
)
==
2
:
title
,
body
=
body
title
,
body
=
body
if
not
isinstance
(
body
,
str
):
if
hasattr
(
body
,
'asHTML'
):
...
...
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