Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forbidden, when request event detail with GET #459

Open
pessimo opened this issue Dec 6, 2024 · 26 comments
Open

Forbidden, when request event detail with GET #459

pessimo opened this issue Dec 6, 2024 · 26 comments

Comments

@pessimo
Copy link

pessimo commented Dec 6, 2024

I got a caldav server, and connect to it via apple calendar, it works fine with basic username and password auth.
when i try to connect it via python-caldav, I can go through the auth part and get all the calendars.

url: https://caldav.feishu.cn/
method: PROPFIND
headers: {'User-Agent': 'python-caldav/1.4.0', 'Content-Type': 'text/xml', 'Accept': 'text/xml, text/calendar', 'Depth': '0'}
body:

<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<D:propfind xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"><D:prop><D:current-user-principal/></D:prop></D:propfind>'
response:  <?xml version="1.0" encoding="UTF-8"?><D:multistatus xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/" xmlns:ICAL="http://apple.com/ns/ical/" xmlns:ME="http://me.com/_namespace/"><D:response><D:href>/</D:href><D:propstat><D:prop><D:current-user-principal><D:href>/u_ortn0136/</D:href></D:current-user-principal></D:prop><D:status>HTTP/1.1 200 OK</D:status></D:propstat></D:response></D:multistatus>

I can also get possibly the event_id via REPORT.

url: https://caldav.feishu.cn/u_ortn0136/66A3A496-9B15-8003-66A3-A4969B158003/
method: REPORT
headers: {'User-Agent': 'python-caldav/1.4.0', 'Content-Type': 'application/xml; charset="utf-8"', 'Accept': 'text/xml, text/calendar', 'Depth': '1'}
body:

<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:"
	xmlns:C="urn:ietf:params:xml:ns:caldav"
	xmlns:CS="http://calendarserver.org/ns/&#34; xmlns:ICAL="http://apple.com/ns/ical/&#34; xmlns:ME="<url id="" type="url" status="" title="" wc="">http://me.com/_namespace/"><D:response>
	<D:href>/u_ortn0136/66A3A496-9B15-8003-66A3-A4969B158003/d787dfe9-4a60-41af-a610-fae0886ba7c0.ics</D:href>
	<D:propstat>
		<D:prop>
			<C:calendar-data/>
		</D:prop>
		<D:status>HTTP/1.1</url>  404 Not Found</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/u_ortn0136/66A3A496-9B15-8003-66A3-A4969B158003/533ef454-53f8-4cbb-9f30-cf6814d68e8e.ics</D:href>
<D:propstat>
	<D:prop>
		<C:calendar-data/>
	</D:prop>
	<D:status>HTTP/1.1 404 Not Found</D:status>
</D:propstat>
</D:response>
<D:response>

but when it comes to detailed info via GET, it fails with reason Forbidden
I don't know how to continue the debug, and want to get some ideas, thanks in advance

@tobixen
Copy link
Member

tobixen commented Dec 6, 2024

I do know that i.e. Zimbra does give error messages when trying to fetch event information through a simple GET.

What is missing from the issue description here is python code using the python caldav library.

I have a branch server_checker now with a tool check_server_compatibility.py, it's not at all production-ready, and it's a risk that it will break with weird error messages or throw you into the debugger, but I'll like you to check it out on your server anyway.

$ python ./check_server_compatibility.py --url http://caldav.feishu.cn --username pessimo --password hunter2 --json

(you may need to replace the username and password above)

@pessimo
Copy link
Author

pessimo commented Dec 6, 2024

after checkout to server_checker, install niquests, and execute check_server_compatibility.py, i entered pdb, with a c (continue), i got an error.

D:\work\zhangjiang\meeting_manage\caldav\caldav\__init__.py:10: UserWarning: You need to install the `build` package and do a `python -m build` to get caldav.__version__ set correctly
  warnings.warn(
WARNING: this script is not production-ready
--Return--
> d:\work\zhangjiang\meeting_manage\caldav\check_server_compatibility.py(84)_debugger()->None
-> pdb.set_trace()
(Pdb) c
Traceback (most recent call last):
  File "D:\work\zhangjiang\meeting_manage\caldav\check_server_compatibility.py", line 134, in _try_make_calendar
    cal = self.principal.make_calendar(cal_id=cal_id, **kwargs)
          ^^^^^^^^^^^^^^
AttributeError: 'ServerQuirkChecker' object has no attribute 'principal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\work\zhangjiang\meeting_manage\caldav\check_server_compatibility.py", line 959, in <module>
    check_server_compatibility()
  File "c:\python312\Lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\python312\Lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "c:\python312\Lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\python312\Lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\work\zhangjiang\meeting_manage\caldav\check_server_compatibility.py", line 953, in check_server_compatibility
    obj.check_all()
  File "D:\work\zhangjiang\meeting_manage\caldav\check_server_compatibility.py", line 856, in check_all
    self.check_mkcalendar()
  File "D:\work\zhangjiang\meeting_manage\caldav\check_server_compatibility.py", line 255, in check_mkcalendar
    makeret = self._try_make_calendar(name="Yep", cal_id="pythoncaldav-test")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\work\zhangjiang\meeting_manage\caldav\check_server_compatibility.py", line 158, in _try_make_calendar
    cal = self.principal.calendar(cal_id=cal_id)
          ^^^^^^^^^^^^^^
AttributeError: 'ServerQuirkChecker' object has no attribute 'principal'

seems there's someting missing?

@tobixen
Copy link
Member

tobixen commented Dec 6, 2024

after checkout to server_checker, install niquests, and execute check_server_compatibility.py, i entered pdb, with a c (continue), i got an error.]

Did you set the url, username and password correctly? (Hm, bad practice to pass the password as a command line option, I should work a bit on that). I believe you got thrown into the debugger because it failed to connect properly to the server. I've now pushed a version that won't open the debugger (unless an environmental variable is set), so if you rerun it there will be a more informative traceback.

@pessimo
Copy link
Author

pessimo commented Dec 6, 2024

thanks, i just tried the new tool. and i noticed if i enter http://caldav.feishu.cn it will give me the same error

AttributeError: 'ServerQuirkChecker' object has no attribute 'principal'

then i changed to https://caldav.feishu.cn, it gave me the same error i encounter.

:\work\zhangjiang\meeting_manage\caldav\caldav\__init__.py:10: UserWarning: You need to install the `build` package and do a `python -m build` to get caldav.__version__ set correctly
  warnings.warn(
WARNING: this script is not production-ready
Traceback (most recent call last):
  File "D:\work\zhangjiang\meeting_manage\caldav\check_server_compatibility.py", line 958, in <module>
    check_server_compatibility()
  File "c:\python312\Lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\python312\Lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "c:\python312\Lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\python312\Lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\work\zhangjiang\meeting_manage\caldav\check_server_compatibility.py", line 952, in check_server_compatibility
    obj.check_all()
  File "D:\work\zhangjiang\meeting_manage\caldav\check_server_compatibility.py", line 856, in check_all
    self._fix_cal()
  File "D:\work\zhangjiang\meeting_manage\caldav\check_server_compatibility.py", line 290, in _fix_cal
    if cal.events() or cal.todos():
       ^^^^^^^^^^^^
  File "D:\work\zhangjiang\meeting_manage\caldav\caldav\objects.py", line 1700, in events
    return self.search(comp_class=Event)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\work\zhangjiang\meeting_manage\caldav\caldav\objects.py", line 1256, in search
    o.load(only_if_unloaded=True)
  File "D:\work\zhangjiang\meeting_manage\caldav\caldav\objects.py", line 2354, in load
    r = self.client.request(str(self.url))
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\work\zhangjiang\meeting_manage\caldav\caldav\davclient.py", line 775, in request
    raise error.AuthorizationError(url=str(url_obj), reason=reason)
caldav.lib.error.AuthorizationError: AuthorizationError at 'https://caldav.feishu.cn:443/u_ortn0136/66A3A496-9B15-8003-66A3-A4969B158003/3159df07-4569-4047-8579-be4d4e543be9.ics', reason Forbidden

i'm pretty sure the url and username, password is correct

@tobixen
Copy link
Member

tobixen commented Dec 6, 2024

This is interesting. The server does tell that the event exists, but it does not reveal the details about the event, and when the caldav library goes back asking for the details the server says "no, you're not permitted to view this". Hm. And you're able to access it through apple calendar client? And the apple calendar client is talking caldav? I do wonder how Apple gets any information out from this calendar.

Could you try to do a git pull and rerun the script?

@tobixen
Copy link
Member

tobixen commented Dec 6, 2024

The event on the calendar does not exist and does not contain any data. Perhaps it was deleted.

		<D:prop>
			<C:calendar-data/>
		</D:prop>
		<D:status>HTTP/1.1</url>  404 Not Found</D:status>

So the caldav library should not try to get any information about it. This is indeed a bug in the caldav library, thanks for pointing it out. I will try to find a solution to this.

@pessimo
Copy link
Author

pessimo commented Dec 6, 2024

This is interesting. The server does tell that the event exists, but it does not reveal the details about the event, and when the caldav library goes back asking for the details the server says "no, you're not permitted to view this". Hm. And you're able to access it through apple calendar client? And the apple calendar client is talking caldav? I do wonder how Apple gets any information out from this calendar.

Could you try to do a git pull and rerun the script?

sorry, I may have expressed it wrongly. I mean, with the same url/username/password, I can subscribe this caldav server to apple calendar, and it syncd all the event to my apple calendar with no error. by the way, the server company suggest using davx5(an android webdav app)on android system. so i guess, this calendar can be add to davx5 as well.

these are my process to add caldav server to apple calendar
微信图片_20241207011708
微信图片_20241207011712

@pessimo
Copy link
Author

pessimo commented Dec 6, 2024

The event on the calendar does not exist and does not contain any data. Perhaps it was deleted.

		<D:prop>
			<C:calendar-data/>
		</D:prop>
		<D:status>HTTP/1.1</url>  404 Not Found</D:status>

So the caldav library should not try to get any information about it. This is indeed a bug in the caldav library, thanks for pointing it out. I will try to find a solution to this.

I did some research on the code. if i search event between 1206-1207(which i guess should return event in 1206)

    for calendar in calendars:
        if calendar.id == '66A3A496-9B15-8003-66A3-A4969B158003':
            events_fetched = calendar.search(
                start=datetime(date.today().year, 12, 6),
                end=datetime(date.today().year, 12, 7),
                expand=True,
            )

the xml response is as follow。 there's 5 event, and on my calendar, there's 5 event(not deleted). so i guess the events are correct, but maybe the server return status in another way?

<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:"
	xmlns:C="urn:ietf:params:xml:ns:caldav"
	xmlns:CS="http://calendarserver.org/ns/"
	xmlns:ICAL="http://apple.com/ns/ical/"
	xmlns:ME="http://me.com/_namespace/">
	<D:response>
		<D:href>/u_ortn0136/66A3A496-9B15-8003-66A3-A4969B158003/ff404e03-fd3d-4094-903f-882013e3dc1e.ics</D:href>
		<D:propstat>
			<D:prop>
				<C:calendar-data/>
			</D:prop>
			<D:status>HTTP/1.1 404 Not Found</D:status>
		</D:propstat>
	</D:response>
	<D:response>
		<D:href>/u_ortn0136/66A3A496-9B15-8003-66A3-A4969B158003/b1fe7af0-1956-400a-8828-0d014a088f99.ics</D:href>
		<D:propstat>
			<D:prop>
				<C:calendar-data/>
			</D:prop>
			<D:status>HTTP/1.1 404 Not Found</D:status>
		</D:propstat>
	</D:response>
	<D:response>
		<D:href>/u_ortn0136/66A3A496-9B15-8003-66A3-A4969B158003/804d50aa-cafc-4603-b553-95d806836d90.ics</D:href>
		<D:propstat>
			<D:prop>
				<C:calendar-data/>
			</D:prop>
			<D:status>HTTP/1.1 404 Not Found</D:status>
		</D:propstat>
	</D:response>
	<D:response>
		<D:href>/u_ortn0136/66A3A496-9B15-8003-66A3-A4969B158003/391293c8-8e72-4173-aede-4d7fa78e622d.ics</D:href>
		<D:propstat>
			<D:prop>
				<C:calendar-data/>
			</D:prop>
			<D:status>HTTP/1.1 404 Not Found</D:status>
		</D:propstat>
	</D:response>
</D:multistatus>

@pessimo
Copy link
Author

pessimo commented Dec 6, 2024

This is interesting. The server does tell that the event exists, but it does not reveal the details about the event, and when the caldav library goes back asking for the details the server says "no, you're not permitted to view this". Hm. And you're able to access it through apple calendar client? And the apple calendar client is talking caldav? I do wonder how Apple gets any information out from this calendar.

Could you try to do a git pull and rerun the script?

this time, i got a lot of Forbidden error, it seems i requested a lot of ics. but the last error was different.
it seemed to be a puterror 409 conflict.

CRITICAL:root:Server does not want to reveal details about the calendar object
Traceback (most recent call last):
  File "D:\work\zhangjiang\meeting_manage\caldav\caldav\objects.py", line 1257, in search
    o.load(only_if_unloaded=True)
  File "D:\work\zhangjiang\meeting_manage\caldav\caldav\objects.py", line 2358, in load
    r = self.client.request(str(self.url))
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\work\zhangjiang\meeting_manage\caldav\caldav\davclient.py", line 775, in request
    raise error.AuthorizationError(url=str(url_obj), reason=reason)
caldav.lib.error.AuthorizationError: AuthorizationError at 'https://caldav.feishu.cn:443/u_ortn0136/66A3A496-9B15-8003-66A3-A4969B158003/3f40a5eb-d339-491b-adf3-46c54ca4e0a6.ics', reason Forbidden
CRITICAL:root:Server does not want to reveal details about the calendar object
Traceback (most recent call last):
  File "D:\work\zhangjiang\meeting_manage\caldav\caldav\objects.py", line 1257, in search
    o.load(only_if_unloaded=True)
  File "D:\work\zhangjiang\meeting_manage\caldav\caldav\objects.py", line 2358, in load
    r = self.client.request(str(self.url))
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\work\zhangjiang\meeting_manage\caldav\caldav\davclient.py", line 775, in request
    raise error.AuthorizationError(url=str(url_obj), reason=reason)
caldav.lib.error.AuthorizationError: AuthorizationError at 'https://caldav.feishu.cn:443/u_ortn0136/66A3A496-9B15-8003-66A3-A4969B158003/6f7f2ea2-d1fc-4bd5-b58a-841ea194268a.ics', reason Forbidden
Traceback (most recent call last):
  File "D:\work\zhangjiang\meeting_manage\caldav\check_server_compatibility.py", line 958, in <module>
    check_server_compatibility()
  File "c:\python312\Lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\python312\Lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "c:\python312\Lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\python312\Lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\work\zhangjiang\meeting_manage\caldav\check_server_compatibility.py", line 952, in check_server_compatibility
    obj.check_all()
  File "D:\work\zhangjiang\meeting_manage\caldav\check_server_compatibility.py", line 858, in check_all
    self.check_event()
  File "D:\work\zhangjiang\meeting_manage\caldav\check_server_compatibility.py", line 376, in check_event
    obj1 = cal.add_event(
           ^^^^^^^^^^^^^^
  File "D:\work\zhangjiang\meeting_manage\caldav\caldav\objects.py", line 871, in save_event
    e.save(no_overwrite=no_overwrite, no_create=no_create, obj_type="event")
  File "D:\work\zhangjiang\meeting_manage\caldav\caldav\objects.py", line 2567, in save
    self._create(id=self.id, path=path)
  File "D:\work\zhangjiang\meeting_manage\caldav\caldav\objects.py", line 2435, in _create
    self._put()
  File "D:\work\zhangjiang\meeting_manage\caldav\caldav\objects.py", line 2426, in _put
    return self._put(False)
           ^^^^^^^^^^^^^^^^
  File "D:\work\zhangjiang\meeting_manage\caldav\caldav\objects.py", line 2428, in _put
    raise error.PutError(errmsg(r))
caldav.lib.error.PutError: PutError at '409 Conflict

', reason no reason

@tobixen
Copy link
Member

tobixen commented Dec 6, 2024

I did some research on the code. if i search event between 1206-1207(which i guess should return event in 1206)

(...)

the xml response is as follow。 there's 5 event, and on my calendar, there's 5 event(not deleted). so i guess the events are correct, but maybe the server return status in another way?

This is very strange. So there exists five events, and they are not deleted. When asking the server for all the events, it gives empty calendar data and says "404 not found". When asking the server for the data for a particular event, it gives "403 forbidden" (instead of "404 not found"). I would assume that "404 not found" means the event was deleted from the server. If one has a copy of the calendar and wants to sync it towards the server, then it's important to get a notice on the deleted events. Returning the calendar URL and a 404 is (as far as I know) the standard way of doing so.

In davx5, it's possible to turn on debug logging, then it will provide a zip-file with detailed logs, including the full communication. Could you try to figure out how davx5 goes around to finding the event data?

@pessimo
Copy link
Author

pessimo commented Dec 6, 2024

ok, i guess i need to try run android app on windows

@tobixen
Copy link
Member

tobixen commented Dec 6, 2024

I do see that I do have some logic for filtering out 404s (caldav/davclient.py, def find_objects_and_props(...), the check for " 404 " in status.text, where status.text should be "HTTP/1.1 404 Not Found" from the data above). It's strange that it does not work out.

The 409 Conflict tells that we're not allowed to add an event. Perhaps some duplicate-check kicks in. If we're not allowed to add events, we should get another error than 409.

I think it would be very useful if it's possible to create a test account for me at that server, so I can run tests and debug myself.

@tobixen
Copy link
Member

tobixen commented Dec 6, 2024

I went to https://feishu.cn and got redirected to larksuite.com - I'll try to register up for a free test account there.

@pessimo
Copy link
Author

pessimo commented Dec 6, 2024

feishu is an app in China, and lark is the global version, I thisk they are basically the same. in this case I only use the calendar function. if you need any help, feel free to ask.

@tobixen
Copy link
Member

tobixen commented Dec 6, 2024

I get to Lark and it requires me to install an app. Is this the correct?

I will probably continue looking into this tomorrow.

@pessimo
Copy link
Author

pessimo commented Dec 6, 2024

i guess you can just use lark-web
1733510058629

but you might need to registry a company version(not a personal version) to use the manager backend and generate a caldav configuration。I'll registry one tomorrow and maybe invite you.

@tobixen
Copy link
Member

tobixen commented Dec 6, 2024

Ah, I found the button for "Lark web". And I even found "CalDAV settings".

@tobixen
Copy link
Member

tobixen commented Dec 6, 2024

I can reproduce the problems with the larksuite. 409 if I try to insert an event or a task to the calendar, no data except the URL and a 404 status when trying to fetch a list with one event.

I do have davx5 on my phone, so I will see if it works there.

@tobixen
Copy link
Member

tobixen commented Dec 6, 2024

On davx5, the calendar comes up as "Read-only (by server)"

@tobixen
Copy link
Member

tobixen commented Dec 6, 2024

davx5 is able to read the events from the calendar. There are some few differences in their report request. I'm looking into it.

@tobixen
Copy link
Member

tobixen commented Dec 6, 2024

So davx5 sends this (added some whitespace for clarity):

REPORT https://caldav-jp.larksuite.com/u_yayi7906/67534141-0901-C022-6753-41410901C022/ http/1.1
(...)
<?xml version='1.0' encoding='UTF-8' ?>
<CAL:calendar-query xmlns="DAV:" xmlns:CAL="urn:ietf:params:xml:ns:caldav">
  <prop><getetag /></prop>
  <CAL:filter><CAL:comp-filter name="VCALENDAR"><CAL:comp-filter name="VEVENT"><CAL:time-range start="20240907T185808Z" /></CAL:comp-filter></CAL:comp-filter></CAL:filter>
</CAL:calendar-query>

In human language: "give me all events after 20240907T1858, and give me the etags".

Server responds:

<D:multistatus xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/" xmlns:ICAL="http://apple.com/ns/ical/" xmlns:ME="http://me.com/_namespace/">
<D:response>
  <D:href>/u_yayi7906/67534141-0901-C022-6753-41410901C022/7f6d5b52-6c84-4f6a-b109-c6c1cc9f2581.ics</D:href>
  <D:propstat><D:prop><D:getetag>1733514470060109</D:getetag></D:prop>
  <D:status>HTTP/1.1 200 OK</D:status></D:propstat>
</D:response>
</D:multistatus>

In human language: "We have found an item for you"

Logs states:

Found remote resource: 7f6d5b52-6c84-4f6a-b109-c6c1cc9f2581.ics
7f6d5b52-6c84-4f6a-b109-c6c1cc9f2581.ics has been added remotely, queueing download

Client goes back:

REPORT https://caldav-jp.larksuite.com/u_yayi7906/67534141-0901-C022-6753-41410901C022/ http/1.1
(...)
<?xml version='1.0' encoding='UTF-8' ?>
<CAL:calendar-multiget xmlns="DAV:" xmlns:CAL="urn:ietf:params:xml:ns:caldav">
<prop><getcontenttype /><getetag /><CAL:schedule-tag /><CAL:calendar-data /></prop>
<href>/u_yayi7906/67534141-0901-C022-6753-41410901C022/7f6d5b52-6c84-4f6a-b109-c6c1cc9f2581.ics</href>
</CAL:calendar-multiget>

So rather than doing a GET towards the server, it's doing a search for an event with the given URL. Clever. "Give me contenttype, etag, schedule-tag and calendar data".

And the server responds:

<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/" xmlns:ICAL="http://apple.com/ns/ical/" xmlns:ME="http://me.com/_namespace/">
<D:response>
<D:href>/u_yayi7906/67534141-0901-C022-6753-41410901C022/7f6d5b52-6c84-4f6a-b109-c6c1cc9f2581.ics</D:href>
<D:propstat>
  <D:prop>
    <D:getcontenttype>text/calendar; component=VEVENT</D:getcontenttype>
    <D:getetag>1733514470060109</D:getetag>
    <C:calendar-data>(my event)</C:calendar-data>
 </D:prop>
 <D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
<D:propstat>
  <D:prop><C:schedule-tag/></D:prop>
  <D:status>HTTP/1.1 404 Not Found</D:status>
</D:propstat>
</D:response>
</D:multistatus>

@tobixen
Copy link
Member

tobixen commented Dec 6, 2024

I've made a workaround in a new branch issue459

The compatibility checker script won't work out when the caldav server is read-only.

@tobixen
Copy link
Member

tobixen commented Dec 10, 2024

Could you confirm that you can read out your events when using branch issue459 ?

@pessimo
Copy link
Author

pessimo commented Dec 12, 2024

sorry for the delay.
I can confirm that branch issue459 can read out events.
thanks for the work

@pessimo
Copy link
Author

pessimo commented Dec 12, 2024

is there a good way to fetch the detail info of a event? like the attendees and so on.
I do see these info in the icalendar_instance.data, but they are in xml pure string

@tobixen
Copy link
Member

tobixen commented Dec 12, 2024

You can use things like event.icalendar_component['SUMMARY'] and event.icalendar_component['ATTENDEE'] (if I understand your question correct?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants