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
141
Merge Requests
141
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
529be1ea
Commit
529be1ea
authored
Mar 22, 2024
by
Jérome Perrin
Committed by
Arnaud Fontaine
Jul 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WebDAVSupport: py3
parent
74cc339b
Changes
1
Show 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 @
529be1ea
...
...
@@ -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,6 +50,9 @@ class TextContent:
raise
Exception
except
Exception
:
# this is probably not html code, try rfc822 parsing
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