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
eff0db37
Commit
eff0db37
authored
Aug 15, 2000
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
This makes XML-RPC and acquisition work together as well as clarifies a little
WebDAV oddity.
parent
5753dd9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
lib/python/ZPublisher/BaseRequest.py
lib/python/ZPublisher/BaseRequest.py
+9
-5
lib/python/ZPublisher/HTTPRequest.py
lib/python/ZPublisher/HTTPRequest.py
+2
-1
No files found.
lib/python/ZPublisher/BaseRequest.py
View file @
eff0db37
...
...
@@ -82,7 +82,7 @@
# attributions are listed in the accompanying credits file.
#
##############################################################################
__version__
=
'$Revision: 1.
29
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
30
$'
[
11
:
-
2
]
from
string
import
join
,
split
,
find
,
rfind
,
lower
,
upper
from
urllib
import
quote
...
...
@@ -119,6 +119,7 @@ class BaseRequest:
collection of variable to value mappings.
"""
maybe_webdav_client
=
1
# While the following assignment is not strictly necessary, it
# prevents alot of unnecessary searches because, without it,
...
...
@@ -257,12 +258,15 @@ class BaseRequest:
# How did this request come in? (HTTP GET, PUT, POST, etc.)
method
=
req_method
=
upper
(
request_get
(
'REQUEST_METHOD'
,
'GET'
))
base
flag
=
0
no_acquire_
flag
=
0
# Set the default method
if
method
==
'GET'
or
method
==
'POST'
:
method
=
'index_html'
else
:
baseflag
=
1
else
:
if
self
.
maybe_webdav_client
:
# Probably a WebDAV client.
no_acquire_flag
=
1
URL
=
request
[
'URL'
]
parents
=
request
[
'PARENTS'
]
...
...
@@ -339,7 +343,7 @@ class BaseRequest:
else
:
try
:
# Note -
this
is necessary to support
# Note -
no_acquire_flag
is necessary to support
# things like DAV. We have to make sure
# that the target object is not acquired
# if the request_method is other than GET
...
...
@@ -349,7 +353,7 @@ class BaseRequest:
# heirarchy -- you'd always get the
# existing object :(
if
base
flag
and
hasattr
(
object
,
'aq_base'
):
if
no_acquire_
flag
and
hasattr
(
object
,
'aq_base'
):
if
hasattr
(
object
.
aq_base
,
entry_name
):
subobject
=
getattr
(
object
,
entry_name
)
else
:
raise
AttributeError
,
entry_name
...
...
lib/python/ZPublisher/HTTPRequest.py
View file @
eff0db37
...
...
@@ -83,7 +83,7 @@
#
##############################################################################
__version__
=
'$Revision: 1.3
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
7
$'
[
11
:
-
2
]
import
regex
,
sys
,
os
,
string
,
urllib
from
string
import
lower
,
atoi
,
rfind
,
split
,
strip
,
join
,
upper
,
find
...
...
@@ -354,6 +354,7 @@ class HTTPRequest(BaseRequest):
response
=
xmlrpc
.
response
(
response
)
other
[
'RESPONSE'
]
=
self
.
response
=
response
other
[
'REQUEST_METHOD'
]
=
''
# We don't want index_html!
self
.
maybe_webdav_client
=
0
else
:
self
.
_file
=
fs
.
file
else
:
...
...
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