Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
ab9ac2fd
Commit
ab9ac2fd
authored
Mar 22, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WebDAVSupport: py3
parent
3fd5efd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
product/ERP5/bootstrap/erp5_core/ModuleComponentTemplateItem/portal_components/module.erp5.WebDAVSupport.py
...mplateItem/portal_components/module.erp5.WebDAVSupport.py
+6
-3
No files found.
product/ERP5/bootstrap/erp5_core/ModuleComponentTemplateItem/portal_components/module.erp5.WebDAVSupport.py
View file @
ab9ac2fd
...
...
@@ -23,7 +23,7 @@ from Products.ERP5Type.Globals import InitializeClass
from
Products.ERP5Type
import
Permissions
from
Products.CMFCore.PortalContent
import
ResourceLockedError
from
zExceptions
import
Forbidden
from
six.moves
import
cStringIO
as
String
IO
from
io
import
Bytes
IO
import
six
security
=
ModuleSecurityInfo
(
__name__
)
...
...
@@ -50,7 +50,10 @@ class TextContent:
raise
Exception
except
Exception
:
# this is probably not html code, try rfc822 parsing
message
=
email
.
message_from_string
(
text
)
if
six
.
PY3
:
message
=
email
.
message_from_bytes
(
text
)
else
:
message
=
email
.
message_from_string
(
text
)
return
{
k
.
capitalize
():
'
\
n
'
.
join
(
message
.
get_all
(
k
))
for
k
in
message
.
keys
()}
...
...
@@ -78,7 +81,7 @@ class TextContent:
headers
=
self
.
parseHeadersFromText
(
body
)
content_type
=
REQUEST
.
get_header
(
'Content-Type'
,
''
)
headers
.
setdefault
(
'content_type'
,
content_type
)
headers
[
'file'
]
=
String
IO
(
body
)
headers
[
'file'
]
=
Bytes
IO
(
body
)
self
.
_edit
(
**
headers
)
except
ResourceLockedError
:
transaction
.
abort
()
...
...
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