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
137
Merge Requests
137
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
00a3c6e0
Commit
00a3c6e0
authored
11 months ago
by
Jérome Perrin
Committed by
Arnaud Fontaine
7 months ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WebDAVSupport: py3
parent
a492ba2c
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 @
00a3c6e0
...
@@ -23,7 +23,7 @@ from Products.ERP5Type.Globals import InitializeClass
...
@@ -23,7 +23,7 @@ from Products.ERP5Type.Globals import InitializeClass
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
Products.CMFCore.PortalContent
import
ResourceLockedError
from
Products.CMFCore.PortalContent
import
ResourceLockedError
from
zExceptions
import
Forbidden
from
zExceptions
import
Forbidden
from
six.moves
import
cStringIO
as
String
IO
from
io
import
Bytes
IO
import
six
import
six
security
=
ModuleSecurityInfo
(
__name__
)
security
=
ModuleSecurityInfo
(
__name__
)
...
@@ -50,6 +50,9 @@ class TextContent:
...
@@ -50,6 +50,9 @@ class TextContent:
raise
Exception
raise
Exception
except
Exception
:
except
Exception
:
# this is probably not html code, try rfc822 parsing
# 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
)
message
=
email
.
message_from_string
(
text
)
return
{
k
.
capitalize
():
'
\
n
'
.
join
(
message
.
get_all
(
k
))
return
{
k
.
capitalize
():
'
\
n
'
.
join
(
message
.
get_all
(
k
))
for
k
in
message
.
keys
()}
for
k
in
message
.
keys
()}
...
@@ -78,7 +81,7 @@ class TextContent:
...
@@ -78,7 +81,7 @@ class TextContent:
headers
=
self
.
parseHeadersFromText
(
body
)
headers
=
self
.
parseHeadersFromText
(
body
)
content_type
=
REQUEST
.
get_header
(
'Content-Type'
,
''
)
content_type
=
REQUEST
.
get_header
(
'Content-Type'
,
''
)
headers
.
setdefault
(
'content_type'
,
content_type
)
headers
.
setdefault
(
'content_type'
,
content_type
)
headers
[
'file'
]
=
String
IO
(
body
)
headers
[
'file'
]
=
Bytes
IO
(
body
)
self
.
_edit
(
**
headers
)
self
.
_edit
(
**
headers
)
except
ResourceLockedError
:
except
ResourceLockedError
:
transaction
.
abort
()
transaction
.
abort
()
...
...
This diff is collapsed.
Click to expand it.
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