Closed Bug 516086 Opened 15 years ago Closed 15 years ago

Updating events with Sunbird changes the url

Categories

(Calendar :: Provider: CalDAV, defect)

Sunbird 0.9
x86
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: evert, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.18pre) Gecko/20080917 Sunbird/0.9

When I'm trying to update a recently created event, Sunbird messes with the url.

The event is created as:
/~evert2/code/sabredav/caldav/server.php/users/admin/calendars/32C9D1C2-5899-4209-8F9F-14B62BCFBAED/a4d94df1-4d3a-6c47-a151-341441120a5e.ics 

And the event is subsequently updated as:
PUT /~evert2/code/sabredav/caldav/server.php/users/admin/calendars/32C9D1C2-5899-4209-8F9F-14B62BCFBAED/rs/32C9D1C2-5899-4209-8F9F-14B62BCFBAED/a4d94df1-4d3a-6c47-a151-341441120a5e.ics HTTP/1.1


Request #1: Creating the new event

PUT /~evert2/code/sabredav/caldav/server.php/users/admin/calendars/32C9D1C2-5899-4209-8F9F-14B62BCFBAED/a4d94df1-4d3a-6c47-a151-341441120a5e.ics HTTP/1.1
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.18pre) Gecko/20080917 Sunbird/0.9
Accept: text/xml
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: utf-8,*;q=0.1
Keep-Alive: 300
Connection: keep-alive
Content-Length: 779
Content-Type: text/calendar; charset=utf-8
If-None-Match: *
Authorization: Digest username="admin", realm="SabreDAV", nonce="4aaad3736f51b", uri="/~evert2/code/sabredav/caldav/server.php/users/admin/calendars/32C9D1C2-5899-4209-8F9F-14B62BCFBAED/a4d94df1-4d3a-6c47-a151-341441120a5e.ics", response="57cd9dee5c31ead68a7ed6d8742392dc", opaque="df58bdff8cf60599c939187d0b5c54de", qop=auth, nc=00000022, cnonce="4ed9c02a814da9d2"
Pragma: no-cache
Cache-Control: no-cache
Host: localhost:80

BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20090911T232538Z
LAST-MODIFIED:20090911T232541Z
DTSTAMP:20090911T232541Z
UID:a4d94df1-4d3a-6c47-a151-341441120a5e
SUMMARY:test
DTSTART;TZID=America/New_York:20090909T131500
DTEND;TZID=America/New_York:20090909T141500
X-MOZ-GENERATION:1
END:VEVENT
END:VCALENDAR

HTTP/1.1 201 Created
Date: Fri, 11 Sep 2009 23:25:41 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l DAV/2 PHP/5.3.0
X-Powered-By: PHP/5.3.0
Content-Length: 0
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html

Request 2: Getting its information
REPORT /~evert2/code/sabredav/caldav/server.php/users/admin/calendars/32C9D1C2-5899-4209-8F9F-14B62BCFBAED/ HTTP/1.1
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.18pre) Gecko/20080917 Sunbird/0.9
Accept: text/xml
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: utf-8,*;q=0.1
Keep-Alive: 300
Connection: keep-alive
Content-Length: 353
Content-Type: text/xml; charset=utf-8
Depth: 1
Authorization: Digest username="admin", realm="SabreDAV", nonce="4aaad3736f51b", uri="/~evert2/code/sabredav/caldav/server.php/users/admin/calendars/32C9D1C2-5899-4209-8F9F-14B62BCFBAED/", response="04f7053437031e9991019f62852f1ae7", opaque="df58bdff8cf60599c939187d0b5c54de", qop=auth, nc=00000023, cnonce="5d299c1b6b1add4e"
Pragma: no-cache
Cache-Control: no-cache
Host: localhost:80

<?xml version="1.0" encoding="UTF-8"?>
<calendar-multiget xmlns:D="DAV:" xmlns="urn:ietf:params:xml:ns:caldav">
  <D:prop>
    <D:getetag/>
    <calendar-data/>
  </D:prop>
  <D:href>/~evert2/code/sabredav/caldav/server.php/users/admin/calendars/32C9D1C2-5899-4209-8F9F-14B62BCFBAED/a4d94df1-4d3a-6c47-a151-341441120a5e.ics</D:href>
</calendar-multiget>

HTTP/1.1 207 Multi-Status
Date: Fri, 11 Sep 2009 23:25:41 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l DAV/2 PHP/5.3.0
X-Powered-By: PHP/5.3.0
Content-Length: 1322
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: application/xml; charset=utf-8

<?xml version="1.0" encoding="utf-8"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://www.rooftopsolutions.nl/NS/sabredav" xmlns:cal="urn:ietf:params:xml:ns:caldav"><d:response><d:href>/~evert2/code/sabredav/caldav/server.php/~evert2/code/sabredav/caldav/server.php/users/admin/calendars/32C9D1C2-5899-4209-8F9F-14B62BCFBAED/a4d94df1-4d3a-6c47-a151-341441120a5e.ics</d:href><d:propstat><d:prop><d:getetag>d4def58f6162fa4957c8134ea58dc043</d:getetag><cal:calendar-data>BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20090911T232538Z
LAST-MODIFIED:20090911T232541Z
DTSTAMP:20090911T232541Z
UID:a4d94df1-4d3a-6c47-a151-341441120a5e
SUMMARY:test
DTSTART;TZID=America/New_York:20090909T131500
DTEND;TZID=America/New_York:20090909T141500
X-MOZ-GENERATION:1
END:VEVENT
END:VCALENDAR
</cal:calendar-data></d:prop><d:status>HTTP/1.1 200 Ok</d:status></d:propstat></d:response></d:multistatus>

Request 3: Updating the event
PUT /~evert2/code/sabredav/caldav/server.php/users/admin/calendars/32C9D1C2-5899-4209-8F9F-14B62BCFBAED/rs/32C9D1C2-5899-4209-8F9F-14B62BCFBAED/a4d94df1-4d3a-6c47-a151-341441120a5e.ics HTTP/1.1
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.18pre) Gecko/20080917 Sunbird/0.9
Accept: text/xml
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: utf-8,*;q=0.1
Keep-Alive: 300
Connection: keep-alive
Content-Length: 780
Content-Type: text/calendar; charset=utf-8
If-Match: d4def58f6162fa4957c8134ea58dc043
Authorization: Digest username="admin", realm="SabreDAV", nonce="4aaad3736f51b", uri="/~evert2/code/sabredav/caldav/server.php/users/admin/calendars/32C9D1C2-5899-4209-8F9F-14B62BCFBAED/rs/32C9D1C2-5899-4209-8F9F-14B62BCFBAED/a4d94df1-4d3a-6c47-a151-341441120a5e.ics", response="aba85afc3546f53e47ac6bd5a6cd52c6", opaque="df58bdff8cf60599c939187d0b5c54de", qop=auth, nc=00000024, cnonce="e9a076165ce7e059"
Pragma: no-cache
Cache-Control: no-cache
Host: localhost:80

BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20090911T232538Z
LAST-MODIFIED:20090911T232558Z
DTSTAMP:20090911T232558Z
UID:a4d94df1-4d3a-6c47-a151-341441120a5e
SUMMARY:hello
DTSTART;TZID=America/New_York:20090909T131500
DTEND;TZID=America/New_York:20090909T141500
X-MOZ-GENERATION:2
END:VEVENT
END:VCALENDAR

HTTP/1.1 404 Not Found
Date: Fri, 11 Sep 2009 23:25:58 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l DAV/2 PHP/5.3.0
X-Powered-By: PHP/5.3.0
Content-Length: 369
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/xml; charset=utf-8

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://www.rooftopsolutions.nl/NS/sabredav">
  <s:exception>Sabre_DAV_Exception_FileNotFound</s:exception>
  <s:message>Calendar object not found</s:message>
  <s:file>/Users/evert2/code/sabredav/caldav/lib/Sabre/CalDAV/Calendar.php</s:file>
  <s:line>131</s:line>
  <s:code>0</s:code>
</d:error>


Reproducible: Always

Actual Results:  
404 error

Expected Results:  
No problem updating
Version: unspecified → Sunbird 0.9
What CalDAV server do you use?

Does the issue still exists using a recent Sunbird 1.0pre nightly test build? 
Many bugs have been fixed in the last year since Sunbird 0.9 was released.
I will give 1.0pre a shot first. I'm working on my own CalDAV implementation, which isn't quite ready. I just got to testing with Sunbird when I got those bugs.
I just tried 1.0pre, this will actually change the urls to:

PUT /~evert2/code/sabredav/caldav/server.php/users/admin/calendars/32C9D1C2-5899-4209-8F9F-14B62BCFBAED/server.php/users/admin/calendars/32C9D1C2-5899-4209-8F9F-14B62BCFBAED/C97029A1-0AA5-40D8-A819-A3AFB5F7377D.ics HTTP/1.1

The breakoff point is very odd to me.
Possibly this has to do with the way you return the <href> in some PROPFINDs ? Do you return an absolute or relative uri? I think a relative one will work better. There was a bug on this somewhere but I can't find it now.
Hi Philipp and Stefan,

I'm an idiot. I hope I didn't waste your time. As Phillipp noted the href was completely wrong, and I've completely overlooked it.

Sorry for wasting your time
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.