[Rt-commit] [svn] r813 - in RTx-Atom: . html/Atom html/Atom/0.3 html/Atom/0.3/NoAuth

autrijus at pallas.eruditorum.org autrijus at pallas.eruditorum.org
Mon May 3 01:51:30 EDT 2004


Author: autrijus
Date: Mon May  3 01:51:30 2004
New Revision: 813

Added:
   RTx-Atom/html/Atom/0.3/NoAuth/autohandler
   RTx-Atom/html/Atom/dhandler
Modified:
   RTx-Atom/   (props changed)
   RTx-Atom/html/Atom/0.3/dhandler
   RTx-Atom/html/Atom/0.3/index
Log:
 ----------------------------------------------------------------------
 r4411 at not:  autrijus | 2004-05-03T05:51:32.491758Z
 
 * Unbreak things broken from the transition from REST to Atom.
 ----------------------------------------------------------------------


Added: RTx-Atom/html/Atom/0.3/NoAuth/autohandler
==============================================================================
--- (empty file)
+++ RTx-Atom/html/Atom/0.3/NoAuth/autohandler	Mon May  3 01:51:30 2004
@@ -0,0 +1,4 @@
+% $m->call_next;
+<%FLAGS>
+inherit	=> undef
+</%FLAGS>

Modified: RTx-Atom/html/Atom/0.3/dhandler
==============================================================================
--- RTx-Atom/html/Atom/0.3/dhandler	(original)
+++ RTx-Atom/html/Atom/0.3/dhandler	Mon May  3 01:51:30 2004
@@ -1,16 +1,16 @@
-%# The main dispatcher for RT/REST 2.0
+%# The main dispatcher for RT/Atom 0.3
 <%INIT>
 require Digest::MD5;
 require MIME::Base64;
 
 # needs discussion on using MD5(pass) as Digest token
- at RT::RESTAuthenticationMethods = qw( WSSE Basic )
-    unless @RT::RESTAuthenticationMethods;
+ at RT::AtomAuthenticationMethods = qw( WSSE Basic )
+    unless @RT::AtomAuthenticationMethods;
 
 my $realm = $RT::rtname;
 $realm =~ s/[^\w.]//g;
 my $nonce = Digest::MD5::md5_hex($realm . rand());
-my %methods = map {($_ => 1)} @RT::RESTAuthenticationMethods;
+my %methods = map {($_ => 1)} @RT::AtomAuthenticationMethods;
 
 my %accept = map { $_ => 1 } $r->header_in('Accept') =~ m{([^\s,]+/[^;,]+)}g;
 my $atom_client = $accept{'application/x.atom+xml'};
@@ -185,7 +185,7 @@
     }
 }
 
-my $BaseURI = "$RT::WebPath/REST/2.0";
+my $BaseURI = "$RT::WebPath/Atom/0.3";
 $ARGS{Path} = $path;
 $ARGS{BaseURI} = $BaseURI;
 $ARGS{Link} = "$BaseURI/Elements/Link";
@@ -216,7 +216,7 @@
     Type => $type,
     Adverb => $adverb,
     CollectionClass => $class,
-    FeedURI => "$BaseURI/\L$type",
+    FeedURI => "$BaseURI/$type",
 );
 </%INIT>
 <%FLAGS>

Modified: RTx-Atom/html/Atom/0.3/index
==============================================================================
--- RTx-Atom/html/Atom/0.3/index	(original)
+++ RTx-Atom/html/Atom/0.3/index	Mon May  3 01:51:30 2004
@@ -9,8 +9,8 @@
   </author>
   <& $Link, Type => 'text/html', URI => $RT::WebURL, Title => loc("Homepage") &>
 % foreach my $type (@{$m->comp('Elements/Introspect', Want => 'TopLevelCollections')}) {
-  <& $Link, Relation => 'service.feed', URI => "$BaseURI/\L$type", Title => loc($type), IsEntry => 1 &>
-  <& $Link, Relation => 'service.post', URI => "$BaseURI/\L$type!add", Title => loc("Create") . ": " . loc($type) &>
+  <& $Link, Relation => 'service.feed', URI => "$BaseURI/$type", Title => loc($type), IsEntry => 1 &>
+  <& $Link, Relation => 'service.post', URI => "$BaseURI/$type!add", Title => loc("Create") . ": " . loc($type) &>
 % }
   <modified><% $Now->W3CDTF %></modified>
   <generator url="http://www.bestpractical.com/rt/" version="<% $RT::VERSION %>">RT</generator>

Added: RTx-Atom/html/Atom/dhandler
==============================================================================
--- (empty file)
+++ RTx-Atom/html/Atom/dhandler	Mon May  3 01:51:30 2004
@@ -0,0 +1,9 @@
+%# The main dispatcher for RT/REST 2.0
+<%INIT>
+$r->content_type('text/html');
+$r->header_out(Location => '0.3/');
+$r->status(302);
+</%INIT>
+<%FLAGS>
+inherit	=> undef
+</%FLAGS>


More information about the Rt-commit mailing list