Commit 79743a28 authored by 's avatar

Fixed a PUT bug that caused problems for binary objects with unknown

content types.
parent 76416b7a
......@@ -85,7 +85,7 @@
"""WebDAV support - null resource objects."""
__version__='$Revision: 1.13 $'[11:-2]
__version__='$Revision: 1.14 $'[11:-2]
import sys, os, string, mimetypes
import Acquisition, OFS.content_types
......@@ -143,7 +143,7 @@ class NullResource(Persistent, Acquisition.Implicit, Resource):
type, enc=mimetypes.guess_type(name)
if type is None:
if OFS.content_types.find_binary(body) >= 0:
content_type='application/octet-stream'
type='application/octet-stream'
else: type=OFS.content_types.text_type(body)
type=string.lower(type)
from OFS.Image import Image, File
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment