[CalendarServer-changes] [5532] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Tue Apr 27 10:47:36 PDT 2010


Revision: 5532
          http://trac.macosforge.org/projects/calendarserver/changeset/5532
Author:   cdaboo at apple.com
Date:     2010-04-27 10:47:34 -0700 (Tue, 27 Apr 2010)
Log Message:
-----------
Tests for double-encoded uri.

Modified Paths:
--------------
    CalDAVTester/trunk/scripts/tests/CalDAV/encodedURIs.xml

Added Paths:
-----------
    CalDAVTester/trunk/Resource/CalDAV/reports/multiget/doubleencoded1.xml
    CalDAVTester/trunk/Resource/CalDAV/reports/multiget/doubleencoded2.xml

Added: CalDAVTester/trunk/Resource/CalDAV/reports/multiget/doubleencoded1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/reports/multiget/doubleencoded1.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/reports/multiget/doubleencoded1.xml	2010-04-27 17:47:34 UTC (rev 5532)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<C:calendar-multiget xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:prop>
+<D:getetag/>
+<C:calendar-data>
+<C:comp name="VCALENDAR">
+<C:allprop/>
+<C:allcomp/>
+</C:comp>
+</C:calendar-data>
+</D:prop>
+<D:href>$calendarpath1:/3%2520a.ics</D:href>
+</C:calendar-multiget>

Added: CalDAVTester/trunk/Resource/CalDAV/reports/multiget/doubleencoded2.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/reports/multiget/doubleencoded2.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/reports/multiget/doubleencoded2.xml	2010-04-27 17:47:34 UTC (rev 5532)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<C:calendar-multiget xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:prop>
+<D:getetag/>
+<C:calendar-data>
+<C:comp name="VCALENDAR">
+<C:allprop/>
+<C:allcomp/>
+</C:comp>
+</C:calendar-data>
+</D:prop>
+<D:href>$pathprefix1:/calendar%203/3_3%2520a.ics</D:href>
+</C:calendar-multiget>

Modified: CalDAVTester/trunk/scripts/tests/CalDAV/encodedURIs.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/encodedURIs.xml	2010-04-27 14:20:12 UTC (rev 5531)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/encodedURIs.xml	2010-04-27 17:47:34 UTC (rev 5532)
@@ -447,6 +447,291 @@
 		</test>
 	</test-suite>
 	
+	<test-suite name='calendar resource double-encoded'>
+		<test name='1'>
+			<description>PUT</description>
+			<request print-response='no' end-delete='yes'>
+				<method>PUT</method>
+				<ruri>$calendarpath1:/3%2520a.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/recurrenceput/3.txt</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>header</callback>
+					<arg>
+						<name>header</name>
+						<value>!Location</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>PROPFIND</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$calendarpath1:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>1</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/propfinds/1.txt</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>okhrefs</name>
+						<value></value>
+						<value>3%2520a.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>multiget REPORT</description>
+			<request print-response='no'>
+				<method>REPORT</method>
+				<ruri>$calendarpath1:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/reports/multiget/doubleencoded1.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>okhrefs</name>
+						<value>3%2520a.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4'>
+			<require-feature>
+				<feature>COPY Method</feature>
+			</require-feature>
+			<description>COPY</description>
+			<request print-response='no' end-delete='yes'>
+				<method>COPY</method>
+				<ruri>$calendarpath1:/3%2520a.ics</ruri>
+				<header>
+					<name>Destination</name>
+					<value>$host:$pathprefix1:/calendar%202/3_2%2520a.ics</value>
+				</header>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>header</callback>
+					<arg>
+						<name>header</name>
+						<value>Location$$host:$pathprefix1:/calendar%202/3_2%2520a.ics</value>
+					</arg>
+				</verify>
+			</request>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$pathprefix1:/calendar%202/3_2%2520a.ics</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/propfinds/1.txt</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>prefix</name>
+						<value/>
+					</arg>
+					<arg>
+						<name>okhrefs</name>
+						<value>$pathprefix1:/calendar%202/3_2%2520a.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='5'>
+			<require-feature>
+				<feature>MOVE Method</feature>
+			</require-feature>
+			<description>MOVE</description>
+			<request print-response='no' end-delete='yes'>
+				<method>MOVE</method>
+				<ruri>$calendarpath1:/3%2520a.ics</ruri>
+				<header>
+					<name>Destination</name>
+					<value>$host:$pathprefix1:/calendar%203/3_3%2520a.ics</value>
+				</header>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>header</callback>
+					<arg>
+						<name>header</name>
+						<value>Location$$host:$pathprefix1:/calendar%203/3_3%2520a.ics</value>
+					</arg>
+				</verify>
+			</request>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$pathprefix1:/calendar%203/3_3%2520a.ics</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/propfinds/1.txt</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>prefix</name>
+						<value/>
+					</arg>
+					<arg>
+						<name>okhrefs</name>
+						<value>$pathprefix1:/calendar%203/3_3%2520a.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='6'>
+			<require-feature>
+				<feature>MOVE Method</feature>
+			</require-feature>
+			<description>multiget REPORT on encoded calendar collection path</description>
+			<request print-response='no'>
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/calendar%203/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/reports/multiget/doubleencoded2.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>okhrefs</name>
+						<value>3_3%2520a.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='7'>
+			<require-feature>
+				<feature>MOVE Method</feature>
+			</require-feature>
+			<description>multiget REPORT on encoded calendar resource path</description>
+			<request print-response='no'>
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/calendar%203/3_3%2520a.ics</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/reports/multiget/doubleencoded2.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>okhrefs</name>
+						<value></value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='8'>
+			<require-feature>
+				<feature>MOVE Method</feature>
+			</require-feature>
+			<description>multiget REPORT on encoded collection path</description>
+			<request print-response='no'>
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/reports/multiget/doubleencoded2.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>okhrefs</name>
+						<value>calendar%203/3_3%2520a.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='9'>
+			<require-feature>
+				<feature>MOVE Method</feature>
+			</require-feature>
+			<description>query REPORT on encoded calendar path</description>
+			<request print-response='no'>
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/calendar%203/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/reports/basicquery/1.txt</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>okhrefs</name>
+						<value>2_3%20a.ics</value>
+						<value>3_3%2520a.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='10'>
+			<require-feature>
+				<feature>MOVE Method</feature>
+			</require-feature>
+			<description>free-busy REPORT on encoded calendar path</description>
+			<request print-response='no'>
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/calendar%203/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/reports/freebusy/1.txt</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
 	<end/>
 	
 </caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100427/70dd530f/attachment-0001.html>


More information about the calendarserver-changes mailing list