GNOME Bugzilla – Bug 789158
Adding new Calendar entries to a radicale server fails due to bogus Content-Length header
Last modified: 2017-10-18 17:39:38 UTC
It seems that in some circumstances PUTting a calendar entry towards a Radicale Calendar server fails. Radicale does not consider the Content valid, since the "Content-Type:"-Header seems to be empty. This is some debug-output I added to radicale dumping the request for a (working) refresh (trimmed for some information containing sensitive or useless information): {'HTTP_AUTHORIZATION': '********', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.14', 'SCRIPT_NAME': '', 'REQUEST_METHOD': 'PROPFIND', 'QUERY_STRING': '', 'HTTP_CONNECTION': 'close', 'SERVER_NAME': '******', 'REMOTE_ADDR': '**.**.**.**', 'HTTP_DEPTH': '0', 'wsgi.url_scheme': 'http', 'SERVER_PORT': '****', 'CONTENT_LENGTH': '113', 'HTTP_PRAGMA': 'no-cache', 'wsgi.input': <socket._fileobject object at 0x7f704afb8cd0>, 'HTTP_USER_AGENT': 'Evolution/3.26.0', 'HTTP_HOST': '*******:****', 'wsgi.multithread': True, 'HTTP_CACHE_CONTROL': 'no-cache', 'wsgi.version': (1, 0), 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.run_once': False, 'wsgi.multiprocess': False, 'HTTP_ACCEPT_LANGUAGE': 'en-gb, en;q=0.9, en;q=0.8', 'CONTENT_TYPE': 'application/xml; charset="utf-8"', 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7f704b03db48>, 'REMOTE_HOST': '******', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f704d0bf1e0>, 'PATH_INFO': '/sync/<user>/calendar.ics/'} Note that Radicale has no troubles with this request. However, the PUT is missing the 'CONTENT_LENGTH'-information: {'HTTP_AUTHORIZATION': '********', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.14', 'SCRIPT_NAME': '', 'HTTP_TRANSFER_ENCODING': 'chunked', 'REQUEST_METHOD': 'PUT', 'QUERY_STRING': '', 'HTTP_CONNECTION': 'close', 'SERVER_NAME': '****', 'REMOTE_ADDR': '**.**.**.**', 'HTTP_IF_NONE_MATCH': '*', 'wsgi.url_scheme': 'http', 'SERVER_PORT': '****', 'CONTENT_LENGTH': '', 'HTTP_PRAGMA': 'no-cache', 'wsgi.input': <socket._fileobject object at 0x7f704afb8cd0>, 'HTTP_USER_AGENT': 'Evolution/3.26.0', 'HTTP_HOST': '****:****', 'wsgi.multithread': True, 'HTTP_CACHE_CONTROL': 'no-cache', 'wsgi.version': (1, 0), 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.run_once': False, 'wsgi.multiprocess': False, 'HTTP_ACCEPT_LANGUAGE': 'en-gb, en;q=0.9, en;q=0.8', 'CONTENT_TYPE': 'text/calendar; charset="utf-8"', 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7f704b03db48>, 'REMOTE_HOST': '*****', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f704d0bf1e0>, 'PATH_INFO': '/sync/<user>/calendar.ics/67296f272f2b2d665321324ee45d8b51b4750abc.ics' } Since Content-Length is considered zero by radicale it does not try to read the actual content and the new calendar entry is not getting inserted. I am not sure that evolution actually sent an empty content-length header, it also might be possible that it sent something that wsgi (or whatever) could not parse properly. I suspect that the bug is in evolution, since the content-length for the PROPFIND request is properly interpreted by radicale.
Some oddidy I just stumbled upon: The HTTP_USER_AGENT is 'Evolution/3.26.0', the version number in the About-Dialog however is 3.26.1-1 (I am using current debian unstable). I wonder if a library mismatch might be happening here? Or is it valid that the user agent and actual version differ?
(In reply to Simon Budig from comment #1) > The HTTP_USER_AGENT is 'Evolution/3.26.0', the version number in the > About-Dialog however is 3.26.1-1 Thanks for a bug report. As I also mentioned on IRC, it means that you use evolution 3.26.1, but evolution-data-server (eds) 3.26.0. It would be good to update eds too, because eds 3.26.1 contains a fix for this. *** This bug has been marked as a duplicate of bug 787656 ***
Thank you. While I had EDS 3.26.1 installed the instance running in my session still was a newer one. Having forced a restart of EDS I can confirm that this behaviour is fixed. Thank you.
(In reply to Simon Budig from comment #3) > ... still was a newer one. ... s/a newer/the older/ :)