[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Health-dev] [bug #62792] health_caldav do not work well with thunderbir
From: |
Feng Shu |
Subject: |
[Health-dev] [bug #62792] health_caldav do not work well with thunderbird and evolution |
Date: |
Thu, 28 Jul 2022 01:22:13 -0400 (EDT) |
Follow-up Comment #2, bug #62792 (project health):
I let thunderbird work again, please see attache patches. the approach is let
uris in health_caldav, health_webdav3_server and health-pywebdav3-server
always are string instead of byte.
The issues about Thunderbird are two:
1. health-pywebdav3-server/pywebdav/lib/report.py, the below code alway False,
for self._uri is byte while get_childs are strings.
```
if self._uri in self._dataclass.get_childs(get_parenturi(self._uri),
self.filter):
```
2. health-pywebdav3-server/pywebdav/lib/WebDAVServer.py, the below code will
self.wfile.write DATA twice.
```
if DATA:
if (isinstance(DATA, bytes)):
self.wfile.write(DATA)
else:
self.wfile.write(DATA.encode('utf-8'))
if isinstance(DATA, str):
log.debug("Don't use iterator")
self.wfile.write(DATA.encode('utf-8'))
else:
if self._config.DAV.getboolean('http_response_use_iterator'):
# Use iterator to reduce using memory
log.debug("Use iterator")
for buf in DATA:
self.wfile.write(buf)
self.wfile.flush()
else:
# Don't use iterator, it's a compatibility option
log.debug("Don't use iterator")
self.wfile.write(DATA)
```
(file #53478)
_______________________________________________________
Additional Item Attachment:
File name: health-and-health-pywebdav3-server-patches.tar Size:20 KB
<https://file.savannah.gnu.org/file/health-and-health-pywebdav3-server-patches.tar?file_id=53478>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62792>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/