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
1f04f25c
Commit
1f04f25c
authored
Jul 03, 2001
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
several fixes to support Office 2K
parent
074bc170
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
12 deletions
+20
-12
lib/python/webdav/Collection.py
lib/python/webdav/Collection.py
+1
-1
lib/python/webdav/NullResource.py
lib/python/webdav/NullResource.py
+2
-2
lib/python/webdav/Resource.py
lib/python/webdav/Resource.py
+10
-6
lib/python/webdav/davcmds.py
lib/python/webdav/davcmds.py
+7
-3
No files found.
lib/python/webdav/Collection.py
View file @
1f04f25c
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
"""WebDAV support - collection objects."""
"""WebDAV support - collection objects."""
__version__
=
'$Revision: 1.2
0
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
1
$'
[
11
:
-
2
]
import
sys
,
os
,
string
,
Globals
,
davcmds
,
Lockable
,
re
import
sys
,
os
,
string
,
Globals
,
davcmds
,
Lockable
,
re
from
common
import
urlfix
,
rfc1123_date
from
common
import
urlfix
,
rfc1123_date
...
...
lib/python/webdav/NullResource.py
View file @
1f04f25c
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
"""WebDAV support - null resource objects."""
"""WebDAV support - null resource objects."""
__version__
=
'$Revision: 1.
29
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
30
$'
[
11
:
-
2
]
import
sys
,
os
,
string
,
mimetypes
,
Globals
,
davcmds
import
sys
,
os
,
string
,
mimetypes
,
Globals
,
davcmds
import
Acquisition
,
OFS
.
content_types
import
Acquisition
,
OFS
.
content_types
...
@@ -232,7 +232,7 @@ class NullResource(Persistent, Acquisition.Implicit, Resource):
...
@@ -232,7 +232,7 @@ class NullResource(Persistent, Acquisition.Implicit, Resource):
creator
=
security
.
getUser
()
creator
=
security
.
getUser
()
body
=
REQUEST
.
get
(
'BODY'
,
''
)
body
=
REQUEST
.
get
(
'BODY'
,
''
)
ifhdr
=
REQUEST
.
get_header
(
'If'
,
''
)
ifhdr
=
REQUEST
.
get_header
(
'If'
,
''
)
depth
=
REQUEST
.
get_header
(
'Depth'
,
'infinit
e
'
)
depth
=
REQUEST
.
get_header
(
'Depth'
,
'infinit
y
'
)
name
=
self
.
__name__
name
=
self
.
__name__
parent
=
self
.
__parent__
parent
=
self
.
__parent__
...
...
lib/python/webdav/Resource.py
View file @
1f04f25c
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
"""WebDAV support - resource objects."""
"""WebDAV support - resource objects."""
__version__
=
'$Revision: 1.4
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.4
6
$'
[
11
:
-
2
]
import
sys
,
os
,
string
,
mimetypes
,
davcmds
,
ExtensionClass
,
Lockable
import
sys
,
os
,
string
,
mimetypes
,
davcmds
,
ExtensionClass
,
Lockable
from
common
import
absattr
,
aq_base
,
urlfix
,
rfc1123_date
,
tokenFinder
,
urlbase
from
common
import
absattr
,
aq_base
,
urlfix
,
rfc1123_date
,
tokenFinder
,
urlbase
...
@@ -181,10 +181,12 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
...
@@ -181,10 +181,12 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
found
=
0
;
resourcetagged
=
0
found
=
0
;
resourcetagged
=
0
taglist
=
IfParser
(
ifhdr
)
taglist
=
IfParser
(
ifhdr
)
for
tag
in
taglist
:
for
tag
in
taglist
:
if
not
tag
.
resource
:
if
not
tag
.
resource
:
# There's no resource (url) with this tag
# There's no resource (url) with this tag
taglist
=
map
(
tokenFinder
,
tag
.
list
)
tag_list
=
map
(
tokenFinder
,
tag
.
list
)
wehave
=
filter
(
havetag
,
list
)
wehave
=
filter
(
havetag
,
tag_list
)
if
not
wehave
:
continue
if
not
wehave
:
continue
if
tag
.
NOTTED
:
continue
if
tag
.
NOTTED
:
continue
if
refresh
:
if
refresh
:
...
@@ -193,8 +195,9 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
...
@@ -193,8 +195,9 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
found
=
1
;
break
found
=
1
;
break
elif
urlbase
(
tag
.
resource
)
==
url
:
elif
urlbase
(
tag
.
resource
)
==
url
:
resourcetagged
=
1
resourcetagged
=
1
taglist
=
map
(
tokenFinder
,
tag
.
list
)
tag_list
=
map
(
tokenFinder
,
tag
.
list
)
wehave
=
filter
(
havetag
,
taglist
)
wehave
=
filter
(
havetag
,
tag_list
)
if
not
wehave
:
continue
if
not
wehave
:
continue
if
tag
.
NOTTED
:
continue
if
tag
.
NOTTED
:
continue
if
refresh
:
if
refresh
:
...
@@ -300,6 +303,7 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
...
@@ -300,6 +303,7 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
if
parent
.
manage_delObjects
([
name
],
REQUEST
=
None
)
is
None
:
if
parent
.
manage_delObjects
([
name
],
REQUEST
=
None
)
is
None
:
RESPONSE
.
setStatus
(
204
)
RESPONSE
.
setStatus
(
204
)
else
:
else
:
RESPONSE
.
setStatus
(
403
)
RESPONSE
.
setStatus
(
403
)
return
RESPONSE
return
RESPONSE
...
@@ -538,7 +542,7 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
...
@@ -538,7 +542,7 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
creator
=
security
.
getUser
()
creator
=
security
.
getUser
()
body
=
REQUEST
.
get
(
'BODY'
,
''
)
body
=
REQUEST
.
get
(
'BODY'
,
''
)
ifhdr
=
REQUEST
.
get_header
(
'If'
,
None
)
ifhdr
=
REQUEST
.
get_header
(
'If'
,
None
)
depth
=
REQUEST
.
get_header
(
'Depth'
,
'infinit
e
'
)
depth
=
REQUEST
.
get_header
(
'Depth'
,
'infinit
y
'
)
alreadylocked
=
Lockable
.
wl_isLocked
(
self
)
alreadylocked
=
Lockable
.
wl_isLocked
(
self
)
if
body
and
alreadylocked
:
if
body
and
alreadylocked
:
...
...
lib/python/webdav/davcmds.py
View file @
1f04f25c
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
"""WebDAV xml request objects."""
"""WebDAV xml request objects."""
__version__
=
'$Revision: 1.1
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
4
$'
[
11
:
-
2
]
import
sys
,
os
,
string
import
sys
,
os
,
string
from
common
import
absattr
,
aq_base
,
urlfix
,
urlbase
from
common
import
absattr
,
aq_base
,
urlfix
,
urlbase
...
@@ -226,6 +226,7 @@ class PropFind:
...
@@ -226,6 +226,7 @@ class PropFind:
if
dflag
:
ob
.
_p_deactivate
()
if
dflag
:
ob
.
_p_deactivate
()
if
not
top
:
return
result
if
not
top
:
return
result
result
.
write
(
'</d:multistatus>'
)
result
.
write
(
'</d:multistatus>'
)
return
result
.
getvalue
()
return
result
.
getvalue
()
...
@@ -352,7 +353,7 @@ class Lock:
...
@@ -352,7 +353,7 @@ class Lock:
self
.
scope
=
'exclusive'
self
.
scope
=
'exclusive'
self
.
type
=
'write'
self
.
type
=
'write'
self
.
owner
=
''
self
.
owner
=
''
timeout
=
request
.
get_header
(
'Timeout'
,
'
I
nfinite'
)
timeout
=
request
.
get_header
(
'Timeout'
,
'
i
nfinite'
)
self
.
timeout
=
string
.
strip
(
string
.
split
(
timeout
,
','
)[
-
1
])
self
.
timeout
=
string
.
strip
(
string
.
split
(
timeout
,
','
)[
-
1
])
self
.
parse
(
data
)
self
.
parse
(
data
)
...
@@ -388,6 +389,7 @@ class Lock:
...
@@ -388,6 +389,7 @@ class Lock:
result
=
None
,
url
=
None
,
top
=
1
):
result
=
None
,
url
=
None
,
top
=
1
):
""" Apply, built for recursion (so that we may lock subitems
""" Apply, built for recursion (so that we may lock subitems
of a collection if requested """
of a collection if requested """
if
result
is
None
:
if
result
is
None
:
result
=
StringIO
()
result
=
StringIO
()
url
=
urlfix
(
self
.
request
[
'URL'
],
'LOCK'
)
url
=
urlfix
(
self
.
request
[
'URL'
],
'LOCK'
)
...
@@ -401,6 +403,7 @@ class Lock:
...
@@ -401,6 +403,7 @@ class Lock:
lock
=
LockItem
(
creator
,
self
.
owner
,
depth
,
self
.
timeout
,
lock
=
LockItem
(
creator
,
self
.
owner
,
depth
,
self
.
timeout
,
self
.
type
,
self
.
scope
,
token
)
self
.
type
,
self
.
scope
,
token
)
if
token
is
None
:
token
=
lock
.
getLockToken
()
if
token
is
None
:
token
=
lock
.
getLockToken
()
except
ValueError
,
valerrors
:
except
ValueError
,
valerrors
:
errmsg
=
"412 Precondition Failed"
errmsg
=
"412 Precondition Failed"
except
:
except
:
...
@@ -475,7 +478,8 @@ class Unlock:
...
@@ -475,7 +478,8 @@ class Unlock:
method
=
getattr
(
obj
,
'wl_delLock'
)
method
=
getattr
(
obj
,
'wl_delLock'
)
vld
=
getSecurityManager
().
validate
(
None
,
obj
,
'wl_delLock'
,
method
)
vld
=
getSecurityManager
().
validate
(
None
,
obj
,
'wl_delLock'
,
method
)
if
vld
:
obj
.
wl_delLock
(
token
)
if
vld
:
obj
.
wl_delLock
(
token
)
else
:
errmsg
=
"403 Forbidden"
else
:
errmsg
=
"403 Forbidden"
elif
not
islockable
:
elif
not
islockable
:
# Only set an error message if the command is being applied
# Only set an error message if the command is being applied
# to a top level object. Otherwise, we're descending a tree
# to a top level object. Otherwise, we're descending a tree
...
...
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