After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 789158 - Adding new Calendar entries to a radicale server fails due to bogus Content-Length header
Adding new Calendar entries to a radicale server fails due to bogus Content-L...
Status: RESOLVED DUPLICATE of bug 787656
Product: evolution
Classification: Applications
Component: Calendar
3.26.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2017-10-18 16:28 UTC by Simon Budig
Modified: 2017-10-18 17:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Simon Budig 2017-10-18 16:28:51 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.
Comment 1 Simon Budig 2017-10-18 16:39:37 UTC
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?
Comment 2 Milan Crha 2017-10-18 17:18:43 UTC
(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 ***
Comment 3 Simon Budig 2017-10-18 17:27:52 UTC
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.
Comment 4 Milan Crha 2017-10-18 17:39:38 UTC
(In reply to Simon Budig from comment #3)
> ... still was a newer one. ...

s/a newer/the older/

:)