Bug 339437

Summary: Wrong url request of events on large calendars
Product: [Frameworks and Libraries] libkgapi Reporter: Lipido <lipido>
Component: calendarAssignee: Daniel Vrátil <dvratil>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 2.1.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Lipido 2014-09-26 18:41:53 UTC
When retrieving large calendars, multiple requests to /events are made, in a page-by-page basis. However, the request url becomes very large due to strange '&' character additions in each page step. These urls work, however when they become too large, the server returns a bad request response.

An example URL (retrived from logs) is:
https://www.googleapis.com/calendar/v3/calendars/example@gmail.com/events?maxResults=20&showDeleted=true&timeMin=2013-12-31T23:00:00Z&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pageToken=CigKGnE5ZGptZzc1MW41a284NnRyODdhdmN2cDBrGAEggICA1fTqk8IUGg0IABIAGOjh2eqs78AC

The behaviour in akonadi is that the calendar seems to sync, but when it reaches the 100% it takes a very long time to end. Altough it ends without error,  there aren't any events on the calendar (however I can see events in JSON in the logs at each page request, until the bad request, of course).

Reproducible: Always

Steps to Reproduce:
1. Add a google calendar with some events, the sufficient to make libkgapi to make more than one request.
2. Watch ligkgapi in the logs and see on additional '&' in the url at each page request
Comment 1 Andrew Crouthamel 2018-11-12 02:55:43 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 2 Andrew Crouthamel 2018-11-21 04:33:30 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Daniel Vrátil 2019-02-21 23:41:22 UTC
This should be fixed for quite some time now with the usage QUrl and QUrlQuery instead of KUrl.