Commit Graph

1414 Commits

Author SHA1 Message Date
Unrud
9ffafc47e2 Remove README 2017-06-15 23:17:06 +02:00
Unrud
4c379eff02 Simplify logging, point to documentation instead 2017-06-10 21:24:40 +02:00
Unrud
714483bf0e Update Dockerfile 2017-06-10 16:15:45 +02:00
Unrud
6b8de92c57 Small improvements for Collection 2017-06-09 02:59:29 +02:00
Unrud
e09d33f3ee Document properties of BaseCollection 2017-06-09 02:59:29 +02:00
Unrud
79e7232ecb Rename self._meta to self._meta_cache and self._etag to self._etag_cache 2017-06-09 02:59:29 +02:00
Unrud
12871fdcb3 Workaround for bugs in VObject during filtering 2017-06-09 02:59:29 +02:00
Unrud
db572e91f8 Test time range filtering with RDATE 2017-06-09 02:59:29 +02:00
Unrud
c54196bb72 Test time range filtering with overwritten recurrence 2017-06-09 02:59:29 +02:00
Unrud
f9d299fbb9 Match time against all components 2017-06-09 02:59:29 +02:00
Unrud
f5835cfe46 raise VObjectBugException for bugs with recurrence rules 2017-06-09 02:59:29 +02:00
Unrud
02371685bd Respond with bad request when MKCOL, MCALENDAR or MOVE fails 2017-06-09 02:59:29 +02:00
Unrud
48d2a33053 Rename upload_all_atomic to _upload_all_atomic 2017-06-09 02:59:29 +02:00
Unrud
dbd06a1952 Default implementation for BaseCollection.serialize 2017-06-09 02:59:29 +02:00
Unrud
47d311b101 Improve doc strings 2017-06-09 02:59:29 +02:00
Unrud
12f9ac44c2 Remove __init__ from BaseCollection
It's not used anywhere
2017-06-09 02:59:29 +02:00
Unrud
a4fc123286 Use last_modified attribute of item 2017-06-09 02:59:29 +02:00
Unrud
578d0e1376 Merge pull request #631 from Unrud/improveerrors
Detect errors in recurrence rules early
2017-06-07 22:15:13 +02:00
Unrud
30a4105065 Add TODO comments for time ranges 2017-06-07 21:54:49 +02:00
Unrud
bab35e9692 Detect errors in recurrence rules early 2017-06-07 21:54:38 +02:00
Unrud
16c4e93a6e Merge pull request #629 from Unrud/fixinfinity
Fix detection of infinite recurrence
2017-06-07 17:27:11 +02:00
Unrud
0e35ab1baf Fix detection of infinite recurrence
* The RRULE field might not exist.
* vobject also accepts lower case COUNT and UNTIL.
2017-06-07 15:31:05 +02:00
Unrud
82fc6f7eb6 Merge pull request #627 from Unrud/improveerrors
Small improvements for error handling
2017-06-07 14:37:30 +02:00
Unrud
3753364fc8 XML error message for invalid sync-token 2017-06-07 14:17:57 +02:00
Unrud
13381fb829 Change logging level of invalid sync token to warning
Some clients stop to work, when told their sync-token are invalid.
2017-06-07 14:15:30 +02:00
Unrud
1b54b23bb3 Add info about disabling locking to error message 2017-06-07 14:14:09 +02:00
Unrud
217859bf5e Fix empty REPORT requests 2017-06-07 14:13:12 +02:00
Unrud
b30c1d11e5 Merge pull request #624 from Unrud/improveerrors
Small improvements for error handling
2017-06-06 23:32:44 +02:00
Unrud
2860c664d0 Check that vobject_item have a UID 2017-06-06 20:01:09 +02:00
Unrud
fe97741f08 Better reporting of errors in PUT requests 2017-06-06 20:01:07 +02:00
Unrud
e47747d4d4 return None instead of False if UID field is missing 2017-06-06 20:01:06 +02:00
Unrud
bea855cb80 Improve file names used when uploading whole collection
* Use 64 bit random sequence (extremely low chance of collisions)
* Improve error message in case of collisions
* Add file extension to names
2017-06-06 20:01:04 +02:00
Unrud
a6a3756e05 Check error code of PUT request
Detect errors early
2017-06-06 20:01:02 +02:00
Unrud
5660f70753 Rename deleted item in test
The backend may derive the item name from the UID (e.g. "event1.ics" from the UID "event1").
2017-06-06 20:00:59 +02:00
Unrud
f1350717ce Merge pull request #623 from Unrud/improveweb
Improvements for the web interface
2017-06-04 15:56:09 +02:00
Unrud
ee214d6697 Remove user from URL
It's not supported by many clients.
2017-06-04 15:43:55 +02:00
Unrud
37c9a1da18 Store user and password in session storage
Allow reloading of the page.
2017-06-04 15:43:27 +02:00
Unrud
4afbefbc9f Disable update timer 2017-06-04 15:43:20 +02:00
Unrud
fca70f482f Web interface: Wrapping of URLs, titles, ... 2017-06-04 15:42:33 +02:00
Unrud
396b9ffecb Log error message from parser for items in storage 2017-06-02 16:36:02 +02:00
Unrud
a1ebc52b39 Don't delete cache entry that gets overwritten
It's unnecessary.
2017-06-02 14:19:53 +02:00
Unrud
07c792f14e Use %r n error messages for token names 2017-06-02 14:18:39 +02:00
Unrud
9ceae0a751 Make Radicale fast (#569)
* Change get_multi to also return missing items

get_multi is not used anywhere and this makes it easier to use.

* Use get_multi for report requests

* Add get_all to BaseCollection

This can be used for optimization on multifilesystem.

* Use iterator for files

* Remove unnecessary checks

This never happens and would be an error.

* Don't raise exception when calling get with colliding name

This behavior is wrong, it should be handled as if the file doesn't exist.

* Use get_all and get_multi to skip unnecessary checks

Collision checks are slow on big collections.

* Use exception instead of existence checks

It's a bit faster.

* Use os.scandir instead of os.listdir

It's faster and doesn't load all files at once.

* Cache metadata when storage is read-only

Metadata is queried a lot during a request. It's quiet slow to load and parse the file every time.

* Cache the etag when the storage is read-only

The etag is calculated twice for GET requests on collections.

* Add helper method for cleaning caches

* Use item etags to calculate collection etag

It's very slow and unnecessary to parse all files with VObject and serialize them again.

* Cache serialized collections in file system

Serialization is very slow for big collections. This caches the result in a file.

* Add helper function for prefilters

The simplify_prefilters functions converts XML filters to a simple tag and time range, which can be easily matched against the tag and time range that are extracted from vobject_items by the function find_tag_and_time_range.

* Add ability to cache etag and serialization of item

Parsing items with vobject is very slow and not required for many requests.
Caching can be used to speed it up.

* Cache metadata and serialization from items in file system

Store the serialized text and the tag and time range from vobject_items in the cache.
The metadata is used for prefilters.

* Remove the cache for the serialization of collections

* Serialize calendars without vobject

Merge the calendar components manually. This is much faster and requires less memory. Caching of the result is not required anymore.

* Allow pre_filtered_list to indicate that filters match

The storage backend can indicate that it evaluated the filters completely.

* Skip filtering with vobject if prefiltering is sufficient

``simplify_prefilters`` indicates if the simplified condition is identical to ``filters``.
This is used in the multifilesystem backend to detect if prefiltering is sufficient.

* Make constants global

* Use generator expressions

* Only extract elements from inside of VCALENDAR

This is unnecessary at the moment, the text representation should never contain anything but VCALENDAR.

* Improve comments

* restore backward compatiblity

* Small improvements for fastbackend
2017-06-02 14:14:55 +02:00
Unrud
78a62aee86 Merge pull request #565 from Unrud/synctoken
Support for sync-token and sync-collection
2017-06-02 13:01:54 +02:00
Unrud
7687afc4c6 Merge pull request #622 from Unrud/clientcertificate
Add option for CA certificate for validating clients
2017-06-02 12:59:35 +02:00
Unrud
5c50cae9f2 Merge pull request #621 from Unrud/small
Small improvements
2017-06-02 12:55:40 +02:00
Unrud
f633b48a7a Real sync-collection support for the multifilesystem backend 2017-06-02 12:53:37 +02:00
Unrud
0ffa97eca0 Allow opening binary files with _atomic_write 2017-06-02 12:44:36 +02:00
Unrud
1dee561692 Add helper method for cleaning caches 2017-06-02 12:44:34 +02:00
Unrud
3009ce5414 Test sync-token and sync-collection 2017-06-02 12:44:31 +02:00