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
cc8787b0
Commit
cc8787b0
authored
Mar 12, 1999
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed DAV header to only be generated on OPTIONS requests.
parent
90f0ea0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
lib/python/webdav/Collection.py
lib/python/webdav/Collection.py
+1
-2
lib/python/webdav/Resource.py
lib/python/webdav/Resource.py
+2
-2
No files found.
lib/python/webdav/Collection.py
View file @
cc8787b0
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
"""WebDAV support - collection objects."""
"""WebDAV support - collection objects."""
__version__
=
'$Revision: 1.
9
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
10
$'
[
11
:
-
2
]
import
sys
,
os
,
string
import
sys
,
os
,
string
from
Resource
import
Resource
from
Resource
import
Resource
...
@@ -109,7 +109,6 @@ class Collection(Resource):
...
@@ -109,7 +109,6 @@ class Collection(Resource):
raise
'Moved Permanently'
,
request
[
'URL1'
]
+
'/'
raise
'Moved Permanently'
,
request
[
'URL1'
]
+
'/'
response
.
setHeader
(
'Connection'
,
'close'
,
1
)
response
.
setHeader
(
'Connection'
,
'close'
,
1
)
response
.
setHeader
(
'Date'
,
rfc1123_date
(),
1
)
response
.
setHeader
(
'Date'
,
rfc1123_date
(),
1
)
response
.
setHeader
(
'DAV'
,
'1'
,
1
)
def
PUT
(
self
,
REQUEST
,
RESPONSE
):
def
PUT
(
self
,
REQUEST
,
RESPONSE
):
"""The PUT method has no inherent meaning for collection
"""The PUT method has no inherent meaning for collection
...
...
lib/python/webdav/Resource.py
View file @
cc8787b0
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
"""WebDAV support - resource objects."""
"""WebDAV support - resource objects."""
__version__
=
'$Revision: 1.1
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
9
$'
[
11
:
-
2
]
import
sys
,
os
,
string
,
mimetypes
,
davcmds
import
sys
,
os
,
string
,
mimetypes
,
davcmds
from
common
import
absattr
,
aq_base
,
urlfix
,
rfc1123_date
from
common
import
absattr
,
aq_base
,
urlfix
,
rfc1123_date
...
@@ -110,7 +110,6 @@ class Resource:
...
@@ -110,7 +110,6 @@ class Resource:
# currently set by the response object automagically.
# currently set by the response object automagically.
response
.
setHeader
(
'Connection'
,
'close'
,
1
)
response
.
setHeader
(
'Connection'
,
'close'
,
1
)
response
.
setHeader
(
'Date'
,
rfc1123_date
(),
1
)
response
.
setHeader
(
'Date'
,
rfc1123_date
(),
1
)
response
.
setHeader
(
'DAV'
,
'1'
,
1
)
def
dav__validate
(
self
,
object
,
methodname
,
REQUEST
):
def
dav__validate
(
self
,
object
,
methodname
,
REQUEST
):
msg
=
'<strong>You are not authorized to access this resource.</strong>'
msg
=
'<strong>You are not authorized to access this resource.</strong>'
...
@@ -157,6 +156,7 @@ class Resource:
...
@@ -157,6 +156,7 @@ class Resource:
self
.
dav__init
(
REQUEST
,
RESPONSE
)
self
.
dav__init
(
REQUEST
,
RESPONSE
)
RESPONSE
.
setHeader
(
'Allow'
,
string
.
join
(
self
.
__http_methods__
,
', '
))
RESPONSE
.
setHeader
(
'Allow'
,
string
.
join
(
self
.
__http_methods__
,
', '
))
RESPONSE
.
setHeader
(
'Content-Length'
,
0
)
RESPONSE
.
setHeader
(
'Content-Length'
,
0
)
RESPONSE
.
setHeader
(
'DAV'
,
'1'
,
1
)
RESPONSE
.
setStatus
(
200
)
RESPONSE
.
setStatus
(
200
)
return
RESPONSE
return
RESPONSE
...
...
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