openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #22118
[Bug 1103812] Re: webdav_server filecopy fails for 0-byte file
=== modified file 'document_webdav/webdav_server.py'
--- document_webdav/webdav_server.py 2012-12-19 16:18:40 +0000
+++ document_webdav/webdav_server.py 2013-01-24 04:05:58 +0000
@@ -289,10 +289,11 @@
self.send_body(None, '201', 'Created', '', headers=headers)
def _get_body(self):
- body = None
+ body = ''
if self.headers.has_key("Content-Length"):
l=self.headers['Content-Length']
- body=self.rfile.read(atoi(l))
+ if l:
+ body=self.rfile.read(atoi(l))
return body
def do_DELETE(self):
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1103812
Title:
webdav_server filecopy fails for 0-byte file
Status in OpenERP Addons (modules):
New
Bug description:
The corner case of copying a 0-byte length file fails. The bug was
found in webdav_server.py:DAVHandler._get_body(). A fix is being
pushed to the openerp-community branch.
1. Steps To Reproduce: Copy a local zero byte length file, and then
paste this file into a WebDAV mounted OpenERP folder.
2. Observation: The OpenERP console logs an HTTP 500 error code -
Internal Error.
3. Expectation: A successful copy and paste, like pasting a zero byte
length file into a local filesystem folder.
4. Platform: Used the Nautilus file browser on a Debian Testing
platform hosting both the client and the server.
5. Version: OpenERP 7.0 branch
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1103812/+subscriptions
References