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
b15d4794
Commit
b15d4794
authored
Sep 06, 2016
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable more webdav logic when ZServer is not installed.
parent
4c67c77b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/ZPublisher/BaseRequest.py
src/ZPublisher/BaseRequest.py
+6
-5
No files found.
src/ZPublisher/BaseRequest.py
View file @
b15d4794
...
...
@@ -39,9 +39,12 @@ from zope.traversing.namespace import nsParse
from
ZPublisher.Converters
import
type_converters
from
ZPublisher.interfaces
import
UseTraversalDefault
HAS_ZSERVER
=
True
try
:
dist
=
pkg_resources
.
get_distribution
(
'ZServer'
)
except
pkg_resources
.
DistributionNotFound
:
HAS_ZSERVER
=
False
def
is_xmlrpc_response
(
response
):
return
False
else
:
...
...
@@ -189,7 +192,7 @@ class BaseRequest:
collection of variable to value mappings.
"""
maybe_webdav_client
=
1
maybe_webdav_client
=
HAS_ZSERVER
# While the following assignment is not strictly necessary, it
# prevents alot of unnecessary searches because, without it,
...
...
@@ -394,18 +397,16 @@ class BaseRequest:
# How did this request come in? (HTTP GET, PUT, POST, etc.)
method
=
request_get
(
'REQUEST_METHOD'
,
'GET'
).
upper
()
# Probably a browser
no_acquire_flag
=
0
if
(
method
in
(
'GET'
,
'POST'
,
'PURGE'
)
and
not
is_xmlrpc_response
(
response
)):
# Probably a browser
no_acquire_flag
=
0
# index_html is still the default method, only any object can
# override it by implementing its own __browser_default__ method
method
=
'index_html'
elif
self
.
maybe_webdav_client
:
# Probably a WebDAV client.
no_acquire_flag
=
1
else
:
no_acquire_flag
=
0
URL
=
request
[
'URL'
]
parents
=
request
[
'PARENTS'
]
...
...
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