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
5edd9bec
Commit
5edd9bec
authored
Mar 04, 1999
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
duh
parent
281675d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
68 deletions
+1
-68
lib/python/webdav/__init__.py
lib/python/webdav/__init__.py
+1
-68
No files found.
lib/python/webdav/__init__.py
View file @
5edd9bec
...
@@ -86,72 +86,5 @@
...
@@ -86,72 +86,5 @@
"""The webdav package provides WebDAV class 1 functionality within
"""The webdav package provides WebDAV class 1 functionality within
the Zope environment. Based on RFC 2518."""
the Zope environment. Based on RFC 2518."""
__version__
=
'$Revision: 1.
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
# Hacks to inject WebDAV support into standard Zope classes.
from
NullResource
import
NullResource
def
folder__getitem__
(
self
,
key
):
if
hasattr
(
self
,
'REQUEST'
):
method
=
self
.
REQUEST
.
get
(
'REQUEST_METHOD'
,
'GET'
)
if
not
method
in
(
'GET'
,
'POST'
):
return
NullResource
(
self
,
key
).
__of__
(
self
)
raise
KeyError
,
key
def
document_put
(
self
,
REQUEST
,
RESPONSE
):
"""Handle HTTP PUT requests."""
self
.
init_headers
(
RESPONSE
)
type
=
REQUEST
.
get_header
(
'content-type'
,
None
)
body
=
REQUEST
.
get
(
'BODY'
,
''
)
self
.
_validateProxy
(
REQUEST
)
self
.
munge
(
body
)
self
.
on_update
()
RESPONSE
.
setStatus
(
204
)
return
RESPONSE
def
image_put
(
self
,
REQUEST
,
RESPONSE
):
"""Handle HTTP PUT requests"""
self
.
init_headers
(
RESPONSE
)
type
=
REQUEST
.
get_header
(
'content-type'
,
None
)
body
=
REQUEST
.
get
(
'BODY'
,
''
)
if
type
is
None
:
type
,
enc
=
mimetypes
.
guess_type
(
self
.
id
())
if
type
is
None
:
if
content_types
.
find_binary
(
body
)
>=
0
:
type
=
'application/octet-stream'
else
:
type
=
content_types
.
text_type
(
body
)
type
=
lower
(
type
)
self
.
update_data
(
body
,
type
)
RESPONSE
.
setStatus
(
204
)
return
RESPONSE
import
OFS.SimpleItem
,
Resource
class
Item
(
OFS
.
SimpleItem
.
Item
,
Resource
.
Resource
):
pass
Item
.
__module__
=
'OFS.SimpleItem'
OFS
.
SimpleItem
.
Item
=
Item
class
Item_w__name__
(
OFS
.
SimpleItem
.
Item_w__name__
,
Resource
.
Resource
):
pass
Item_w__name__
.
__module__
=
'OFS.SimpleItem'
OFS
.
SimpleItem
.
Item_w__name__
=
Item_w__name__
import
OFS.Folder
,
Collection
class
Folder
(
OFS
.
Folder
.
Folder
,
Collection
.
Collection
):
pass
Folder
.
__module__
=
'OFS.Folder'
OFS
.
Folder
.
Folder
=
Folder
OFS
.
Folder
.
Folder
.
__getitem__
=
folder__getitem__
import
OFS.DTMLDocument
,
OFS
.
DTMLMethod
,
OFS
.
Image
OFS
.
DTMLMethod
.
DTMLMethod
.
PUT
=
document_put
OFS
.
DTMLDocument
.
DTMLDocument
.
PUT
=
document_put
OFS
.
Image
.
Image
.
PUT
=
image_put
OFS
.
Image
.
File
.
PUT
=
image_put
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