I'm currently writing a script to automatically synchronize multiple CalDAV 
calendars.  I encountered a problem where synchronized events weren't 
showing up on Google's calendar (in the web interface or via CalDAV).

In debugging this, I narrowed it down to a simple test case where I create 
the event via HTTP PUT, and then immediately try to fetch it back via HTTP 
GET.  Here is a sample CalDAV session:

(authentication omitted)

>> 'PUT 
/calendar/dav/xxxxxxxxxx%40group.calendar.google.com/events/yyyyyyyyyyyyyy.ics 
HTTP/1.1\r\nHost: www.google.com:443\r\nAuthorization: Basic 
zzzzzzzzzz\r\nContent-Length: 440\r\nContent-Type: text/plain\r\n\r\n'
>> 
'BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:Zimbra-Calendar-Provider\nBEGIN:VEVENT\nUID:yyyyyyyyyyyyyy\nRRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=MO\nSUMMARY:NC:
 
Review Linux patch queue\nCATEGORIES:Meeting\nORGANIZER;CN=Nate 
Case:mailto:[email protected]\nDTSTART:20100503T170000Z\nDTEND:20100503T173000Z\nSTATUS:CONFIRMED\nCLASS:PUBLIC\nX-MICROSOFT-CDO-INTENDEDSTATUS:BUSY\nTRANSP:OPAQUE\nDTSTAMP:20110104T204841Z\nSEQUENCE:0\nEND:VEVENT\nEND:VCALENDAR\n'
<< 'HTTP/1.1 201 Created\r\nDAV: 1, calendar-access, calendar-schedule, 
calendar-proxy\r\nContent-Type: text/calendar; component=vevent; 
charset=UTF-8\r\nDate: Fri, 18 Feb 2011 23:17:09 GMT\r\nExpires: Fri, 18 Feb 
2011 23:17:09 GMT\r\nCache-Control: private, 
max-age=0\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: 
SAMEORIGIN\r\nX-XSS-Protection: 1; mode=block\r\nContent-Length: 
0\r\nServer: GSE\r\n\r\n'

OK, everything looks good, right?  Now let's try to fetch this same event:

>> 'GET 
>> /calendar/dav/xxxxxxxxxx%40group.calendar.google.com/events/yyyyyyyyyyyyyy.ics
>>  
HTTP/1.1\r\nHost: www.google.com:443\r\nAuthorization: Basic 
zzzzzzzzzz\r\n\r\n'
<< 'HTTP/1.1 404 Not Found\r\nDAV: 1, calendar-access, calendar-schedule, 
calendar-proxy\r\nContent-Type: text/html; charset=UTF-8\r\nDate: Fri, 18 
Feb 2011 23:17:48 GMT\r\nExpires: Fri, 18 Feb 2011 23:17:48 
GMT\r\nCache-Control: private, max-age=0\r\nX-Content-Type-Options: 
nosniff\r\nX-Frame-Options: SAMEORIGIN\r\nX-XSS-Protection: 1; 
mode=block\r\nServer: GSE\r\nTransfer-Encoding: chunked\r\n\r\n'
<< '8d\r\n'
<< '<HTML>\n<HEAD>\n<TITLE>Not Found</TITLE>\n</HEAD>\n<BODY 
BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Not Found</H1>\n<H2>Error 
404</H2>\n</BODY>\n</HTML>\n'
<< '\r\n0\r\n\r\n'

The strange thing is that the first time I create the event on a new 
calendar, it appears to work fine, and I can fetch the event fine.  This is 
an event I have PUT multiple times in the past (and possibly deleted at some 
point).  I don't know if Google's server is discarding events with UIDs that 
match events from the past?

-- 
You received this message because you are subscribed to the Google
Groups "Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://code.google.com/apis/calendar/community/forum.html

Reply via email to