[Rt-commit] [svn] r854 - in RTx-Atom: . html/Atom/0.3 html/Atom/0.3/Elements html/Atom/0.3/Search lib/RTx

autrijus at pallas.eruditorum.org autrijus at pallas.eruditorum.org
Fri May 7 01:39:14 EDT 2004


Author: autrijus
Date: Fri May  7 01:39:13 2004
New Revision: 854

Modified:
   RTx-Atom/   (props changed)
   RTx-Atom/html/Atom/0.3/Elements/Entry
   RTx-Atom/html/Atom/0.3/Search/index
   RTx-Atom/html/Atom/0.3/dhandler
   RTx-Atom/lib/RTx/Atom.pm
Log:
 ----------------------------------------------------------------------
 r4525 at not:  autrijus | 2004-05-07T05:38:23.626550Z
 
 * Make the feeds validate again.
 ----------------------------------------------------------------------
 r4526 at not:  autrijus | 2004-05-07T05:38:59.656011Z
 
 * Revise the spec to flesh out the remaining ambiguities.
 ----------------------------------------------------------------------


Modified: RTx-Atom/html/Atom/0.3/Elements/Entry
==============================================================================
--- RTx-Atom/html/Atom/0.3/Elements/Entry	(original)
+++ RTx-Atom/html/Atom/0.3/Elements/Entry	Fri May  7 01:39:13 2004
@@ -13,13 +13,13 @@
     <modified><% $entry{LastUpdated} %></modified>
     <id><% $entry{URI} %></id>
 <%INIT>
-my %URI = (
-    Tickets	=> 'Ticket/Display.html?id=',
-    Templates	=> 'Admin/Global/Template.html?Template=',
-    Scrips	=> 'Admin/Global/Scrip.html?id=',
-    Queues	=> 'Admin/Queues/Modify.html?id=',
-    Users	=> 'Admin/Users/Modify.html?id=',
-    Groups	=> 'Admin/Groups/Modify.html?id=',
+my %URI = qw(
+    RT-Tickets      Ticket/Display.html?id=
+    RT-Templates    Admin/Global/Template.html?Template=
+    RT-Scrips       Admin/Global/Scrip.html?id=
+    RT-Queues       Admin/Queues/Modify.html?id=
+    RT-Users        Admin/Users/Modify.html?id=
+    RT-Groups       Admin/Groups/Modify.html?id=
 );
 
 my %entry = map { $_ => eval { $Object->$_ } || '' } qw(Id Name Description Subject URI);

Modified: RTx-Atom/html/Atom/0.3/Search/index
==============================================================================
--- RTx-Atom/html/Atom/0.3/Search/index	(original)
+++ RTx-Atom/html/Atom/0.3/Search/index	Fri May  7 01:39:13 2004
@@ -24,11 +24,11 @@
   <& $ShowLink, Type => 'text/html', URI => $RT::WebURL, Title => $Type &>
   <modified><% $Now->W3CDTF %></modified>
   <generator url="http://www.bestpractical.com/rt/" version="<% $RT::VERSION %>">RT</generator>
-  <entry>
 % foreach my $obj (@$List) {
+  <entry>
     <& $ShowEntry, %ARGS, Object => $obj, IsChild => 1 &>
-% }
   </entry>
+% }
   <info></info>
 % if ($page > 1) {
   <& $ShowLink, URI => "$FeedURI?$prev", Title => "Previous Page", Relation => 'prev', &>

Modified: RTx-Atom/html/Atom/0.3/dhandler
==============================================================================
--- RTx-Atom/html/Atom/0.3/dhandler	(original)
+++ RTx-Atom/html/Atom/0.3/dhandler	Fri May  7 01:39:13 2004
@@ -156,7 +156,7 @@
     $CurrentUser->UserObj->HasRight(
 	Right => 'SuperUser',
         Object => $RT::System,
-    ) or return $m->comp('Elements/Error', Status => 401);
+    ) or return $m->comp('Elements/Error', Status => 406);
 
     $CurrentUser->Load($su);
 }

Modified: RTx-Atom/lib/RTx/Atom.pm
==============================================================================
--- RTx-Atom/lib/RTx/Atom.pm	(original)
+++ RTx-Atom/lib/RTx/Atom.pm	Fri May  7 01:39:13 2004
@@ -29,8 +29,8 @@
     /Atom/0.3/RT-Tickets/15.Subject             # EditURI (Property)
     /Atom/0.3/RT-Tickets/15/Transactions        # FeedURI (Container)
 
-A RT-Atom server may also supplies alias URIs.  Whenever an user request the
-URI, it is redirected to the canonical URL with a I<301 Moved Permanently>.
+A RT-Atom server may also supply alias URIs.  Whenever an user request such
+a URI, it is redirected to the canonical URL with a I<301 Moved Permanently>.
 
 Here are some example aliases:
 
@@ -180,14 +180,18 @@
     Content-Type: application/x-www-form-urlencoded
 
     Members-add=30
-        
+
 The server may respond with this:
 
         207 Multiple Status
-        ...<status><code>200</code><text>Member added</text>...
-
-Note that the final 207 response is not yet codified in stone and
-will be replaced as soon as something better is found.
+        <entry>
+          <content type="multipart/parallel" mode="xml">
+            <body>
+              <response status="200">Member added.</head>
+              <response status="200">Member added.</head>
+            </body>
+          </content>
+        </entry>
 
 =head2 Authentication
 
@@ -203,12 +207,53 @@
 The RT server may choose to support other authentication methods, such
 as C<Basic> or C<Digest>.
 
+=head2 Identity Switching
+
+Once authenticated, the server should check for the C<X-RT-CurrentUser>
+header.  If this header is present, it takes one of the following actions:
+
+=over 4
+
+=item If the authenticated user does not have the C<SuperUser> right
+
+The server returns I<401 Authorization Required> without processing the
+request body.
+
+=item If the server cannot find the new user
+
+The server returns I<406 Forbidden> without processing the request body.
+
+=item If the user has the C<SuperUser> right, and a new user is found
+
+The client assumes the identity of the new user specified in the header.
+The request proceeds as usual.
+
+=back
+
 =head2 Content Negotiation
 
-The server understands C<Accept>, C<Accept-Charset>, C<Accept-Language>
-and C<X-RT-CurrentUser> headers.
+The server understands a number of HTTP headers for content negotiation:
+
+=item Accept
+
+Specifies the content type the client is willing to process.  A RT-Atom
+client must include C<application/x.atom+xml> in its C<Accept> list.
 
-# XXX
+=item Accept-Charset
+
+The character encoding expected by the client.  If unspecified, defaults
+to C<utf-8>.  If the requested encoding cannot represent certain codepoints
+in the response, the server must use XML character references (C<&#xABCD;>)
+instead.
+
+If none of the requested encodings are supported by the server, a I<406
+Not Acceptable> error is returned.
+
+=item Accept-Language
+
+The languages to use in human-readable C<CDATA> parts, notably response texts.
+
+=back
 
 =head1 RESOURCE TYPES
 
@@ -354,13 +399,13 @@
 
 =over 4
 
-=item $obj has a member named I<Groups>.
+=item 1. $obj has a member named I<Groups>.
 
-=item $obj->Groups is a I<Container>.
+=item 2. $obj->Groups is a I<Container>.
 
-=item $obj->Groups may be called to C<add> an object inside it.
+=item 3. $obj->Groups may be called to I<add> an object inside it.
 
-=item $obj->Groups->add( key => 'value' ) should be translated to this:
+=item 4. $obj->Groups->add( key => 'value' ) should be translated to this:
 
     POST /Atom/0.3/RT-Groups
     Content-Type: application/x-www-form-urlencoded


More information about the Rt-commit mailing list