curl gives me all the data, Rev only the last part. Why?
Posted: Wed Jul 28, 2010 5:17 pm
Using Rev Studio 4.0.0 to send a POST to our CalDav calendaring server. When I use curl I get the expected results. But when I use Rev I only get the last part of the data.
Here's an example. I want to see if Martin, Jenny, & Jim are busy. So I query our server with curl & get this correct reply:
A tcpdump shows the response from the CalDAV server is continuous, so I'm confused why Rev is only giving me the last part of the request. It's almost like some Rev XML library is grabbing the data & putting it into an array or something. Anyone have any clue what's going on here?
As always, TIA!!!
Here's an example. I want to see if Martin, Jenny, & Jim are busy. So I query our server with curl & get this correct reply:
So I do the same thing with Rev but only get the last person, Jim:<?xml version="1.0" encoding="UTF-8"?><C:schedule-response xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:D="DAV:"><C:response><C:recipient><D:href>mailto:martin@our-company.com</D:href></C:recipient><C:request-status>2.0;Success</C:request-status><C:calendar-data>BEGIN:VCALENDAR
PRODID:-//Kerio Technologies//Kerio Connect//EN
METHOD:PUBLISH
VERSION:2.0
X-VERSION-KMS:6.2.0
BEGIN:VFREEBUSY
DTSTAMP:20100728T154528Z
ORGANIZER:mailto:joe@our-company.com
DTSTART:20100727T070000Z
DTEND:20100727T160000Z
FREEBUSY;FBTYPE=BUSY:20100727T130000Z/20100727T160000Z
FREEBUSY;FBTYPE=BUSY:20100727T130000Z/20100727T160000Z
FREEBUSY;FBTYPE=BUSY:20100727T140000Z/20100727T150000Z
FREEBUSY;FBTYPE=BUSY:20100727T140000Z/20100727T150000Z
ATTENDEE;PARTSTAT=ACCEPTED;CN=martin@our-company.com;CUTYPE=INDIVIDUAL:mailto:martin@our-company.com
END:VFREEBUSY
END:VCALENDAR
</C:calendar-data></C:response><C:response><C:recipient><D:href>mailto:jenny@our-company.com</D:href></C:recipient><C:request-status>2.0;Success</C:request-status><C:calendar-data>BEGIN:VCALENDAR
PRODID:-//Kerio Technologies//Kerio Connect//EN
METHOD:PUBLISH
VERSION:2.0
X-VERSION-KMS:6.2.0
BEGIN:VFREEBUSY
DTSTAMP:20100728T154528Z
ORGANIZER:mailto:joe@our-company.com
DTSTART:20100727T070000Z
DTEND:20100727T160000Z
FREEBUSY;FBTYPE=BUSY:20100727T130000Z/20100727T160000Z
FREEBUSY;FBTYPE=BUSY:20100727T140000Z/20100727T150000Z
ATTENDEE;PARTSTAT=ACCEPTED;CN=jenny@our-company.com;CUTYPE=INDIVIDUAL:mailto:jenny@our-company.com
END:VFREEBUSY
END:VCALENDAR
</C:calendar-data></C:response><C:response><C:recipient><D:href>mailto:jim@our-company.com</D:href></C:recipient><C:request-status>2.0;Success</C:request-status><C:calendar-data>BEGIN:VCALENDAR
PRODID:-//Kerio Technologies//Kerio Connect//EN
METHOD:PUBLISH
VERSION:2.0
X-VERSION-KMS:6.2.0
BEGIN:VFREEBUSY
DTSTAMP:20100728T154528Z
ORGANIZER:mailto:joe@our-company.com
DTSTART:20100727T070000Z
DTEND:20100727T160000Z
FREEBUSY;FBTYPE=BUSY:20100727T130000Z/20100727T160000Z
FREEBUSY;FBTYPE=BUSY:20100727T150000Z/20100727T160000Z
FREEBUSY;FBTYPE=BUSY:20100727T150000Z/20100727T160000Z
ATTENDEE;PARTSTAT=ACCEPTED;CN=jim@our-company.com;CUTYPE=INDIVIDUAL:mailto:jim@our-company.com
END:VFREEBUSY
END:VCALENDAR
</C:calendar-data></C:response></C:schedule-response>
The code is pretty simple.<?xml version="1.0" encoding="UTF-8"?><C:schedule-response xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:D="DAV:"><C:response><C:recipient><D:href>mailto:jim@our-company.com</D:href></C:recipient><C:request-status>2.0;Success</C:request-status><C:calendar-data>BEGIN:VCALENDAR
PRODID:-//Kerio Technologies//Kerio Connect//EN
METHOD:PUBLISH
VERSION:2.0
X-VERSION-KMS:6.2.0
BEGIN:VFREEBUSY
DTSTAMP:20100728T160158Z
ORGANIZER:mailto:ed@our-company.com
DTSTART:20100727T070000Z
DTEND:20100727T160000Z
FREEBUSY;FBTYPE=BUSY:20100727T130000Z/20100727T160000Z
FREEBUSY;FBTYPE=BUSY:20100727T150000Z/20100727T160000Z
FREEBUSY;FBTYPE=BUSY:20100727T150000Z/20100727T160000Z
ATTENDEE;PARTSTAT=ACCEPTED;CN=jim@our-company.com;CUTYPE=INDIVIDUAL:mailto:jim@our-company.com
END:VFREEBUSY
END:VCALENDAR
</C:calendar-data></C:response></C:schedule-response>
Code: Select all
on mouseUp
set the httpHeaders to "User-Agent: DAVKit/3.0.6 (661);" & return & "Recipient: mailto:martin@our-company.com" & return & "Recipient: mailto:jenny@our-company.com" & return & "Recipient: mailto:jim@our-company.com" & return & "Content-Type: text/calendar" & return & "Originator: mailto:ed@our-company.com"
put "http://mail.our-company.com/calendars/" into tUrl
put "BEGIN:VCALENDAR" & return & "PRODID:-//Apple Inc.//iCal 3.0//EN" & return & "CALSCALE:GREGORIAN" & return & "VERSION:2.0" & return & "METHOD:REQUEST" & return & "BEGIN:VFREEBUSY" & return & "DTSTART:20100727T070000Z" & return & "DTEND:20100727T160000Z" & return & "END:VFREEBUSY" & return & "END:VCALENDAR" into tData
post tData to tUrl
put it into fld 1
set the httpHeaders to empty
end mouseUp
As always, TIA!!!