[Rt-commit] [svn] r1122 - in RTx-Atom: . html/Atom html/Atom/0.3 html/Atom/0.3/Add html/Atom/0.3/Elements html/Atom/0.3/Get html/Atom/0.3/NoAuth html/Atom/0.3/Search

autrijus at pallas.eruditorum.org autrijus at pallas.eruditorum.org
Sun Jun 20 14:12:24 EDT 2004


Author: autrijus
Date: Sun Jun 20 14:12:23 2004
New Revision: 1122

Added:
   RTx-Atom/html/Atom/0.3/NoAuth/wd.png
Modified:
   RTx-Atom/   (props changed)
   RTx-Atom/html/Atom/0.3/Add/index
   RTx-Atom/html/Atom/0.3/Elements/Error
   RTx-Atom/html/Atom/0.3/Get/Property
   RTx-Atom/html/Atom/0.3/Search/index
   RTx-Atom/html/Atom/0.3/dhandler
   RTx-Atom/html/Atom/dhandler
Log:
 ----------------------------------------------------------------------
 r5689 at not:  autrijus | 2004-06-20T18:12:03.092717Z
 
 * Make it Apache2-friendly.
 ----------------------------------------------------------------------


Modified: RTx-Atom/html/Atom/0.3/Add/index
==============================================================================
--- RTx-Atom/html/Atom/0.3/Add/index	(original)
+++ RTx-Atom/html/Atom/0.3/Add/index	Sun Jun 20 14:12:23 2004
@@ -26,7 +26,7 @@
 else {
     @rv = $obj->Create( %args );
     if (my $id = $obj->Id) {
-	$r->header_out(Location => "$BaseURI/$Path/$id");
+	$r->headers_out->{Location} = "$BaseURI/$Path/$id";
 	$status = 303;
     }
 }

Modified: RTx-Atom/html/Atom/0.3/Elements/Error
==============================================================================
--- RTx-Atom/html/Atom/0.3/Elements/Error	(original)
+++ RTx-Atom/html/Atom/0.3/Elements/Error	Sun Jun 20 14:12:23 2004
@@ -1,6 +1,6 @@
 <%INIT>
 $r->content_type('text/html');
-$r->header_out($ARGS{$_}) for sort keys %ARGS;
+$r->headers_out->{$_} = $ARGS{$_} for sort keys %ARGS;
 $r->status($Status);
 $m->abort($Status) unless $ENV{FCGI_ROLE};
 </%INIT>

Modified: RTx-Atom/html/Atom/0.3/Get/Property
==============================================================================
--- RTx-Atom/html/Atom/0.3/Get/Property	(original)
+++ RTx-Atom/html/Atom/0.3/Get/Property	Sun Jun 20 14:12:23 2004
@@ -17,7 +17,7 @@
 	unless ($obj and $obj->Id);
 
     my $path = $obj->Table;
-    $r->header_out(Location => "$BaseURI/$path/".$obj->Id);
+    $r->headers_out->{Location} = "$BaseURI/$path/".$obj->Id;
     return $m->comp($ShowError, Status => 303);
 }
 

Added: RTx-Atom/html/Atom/0.3/NoAuth/wd.png
==============================================================================
Binary files (empty file) and RTx-Atom/html/Atom/0.3/NoAuth/wd.png	Sun Jun 20 14:12:23 2004 differ

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	Sun Jun 20 14:12:23 2004
@@ -56,7 +56,7 @@
 $page = 1 if $page <= 0;
 
 if ($TotalFound) {
-    $r->header_out('Content-Location' => "$BaseURI/$Path/".join(',', map $_->Id, @$List));
+    $r->headers_out->{'Content-Location'} = "$BaseURI/$Path/".join(',', map $_->Id, @$List);
 }
 
 return if $r->method eq 'HEAD';

Modified: RTx-Atom/html/Atom/0.3/dhandler
==============================================================================
--- RTx-Atom/html/Atom/0.3/dhandler	(original)
+++ RTx-Atom/html/Atom/0.3/dhandler	Sun Jun 20 14:12:23 2004
@@ -14,8 +14,8 @@
 my $nonce = Digest::MD5::md5_hex($realm . rand());
 my %methods = map {($_ => 1)} @RT::AtomAuthenticationMethods;
 
-my %accept = map { $_ => 1 } $r->header_in('Accept') =~ m{([^\s,]+/[^;,]+)}g;
-my @encodings = $r->header_in('Accept-Charset') =~ m{([^\s,]+[^;,]*)}g;
+my %accept = map { $_ => 1 } $r->headers_in->{'Accept'} =~ m{([^\s,]+/[^;,]+)}g;
+my @encodings = $r->headers_in->{'Accept-Charset'} =~ m{([^\s,]+[^;,]*)}g;
 my $atom_client = $accept{'application/x.atom+xml'};
 
 my $header_out = sub {
@@ -56,7 +56,7 @@
 $CurrentUser->Load('root');
 
 my $headerParts = sub {
-    my $header = $r->header_in($_[0]) || $ENV{$_[0]};
+    my $header = $r->headers_in->{$_[0]} || $ENV{$_[0]};
     $header =~ s/^(?:$_[1]) /", / or return;
     $header =~ s/"\s*$//; # strip whitespaces after the last "
 
@@ -74,7 +74,7 @@
 AUTH_Basic: {
     last if $CurrentUser or !$methods{Basic};
 
-    ($r->header_in('Authorization') || $ENV{'Authorization'})
+    ($r->headers_in->{'Authorization'} || $ENV{'Authorization'})
          =~ /^Basic (.+)$/ or last;
     my ($username, $password) = split(/:/, MIME::Base64::decode_base64($1), 2);
 
@@ -174,7 +174,7 @@
 }
 
 # Now for the dreaded "su anotheruser" feature...
-my $su = $r->header_in('X-RT-CurrentUser');
+my $su = $r->headers_in->{'X-RT-CurrentUser'};
 if ($CurrentUser and $su and ($su ne $CurrentUser->Id) and ($su ne $CurrentUser->Name)) {
     # You have to be SuperUser to do this.
     $CurrentUser->UserObj->HasRight(

Modified: RTx-Atom/html/Atom/dhandler
==============================================================================
--- RTx-Atom/html/Atom/dhandler	(original)
+++ RTx-Atom/html/Atom/dhandler	Sun Jun 20 14:12:23 2004
@@ -1,7 +1,7 @@
 %# The main dispatcher for RT/Atom 0.3
 <%INIT>
 $r->content_type('text/html');
-$r->header_out(Location => "$RT::WebPath/Atom/0.3/");
+$r->headers_out->{Location} = "$RT::WebPath/Atom/0.3/";
 $r->status(302);
 </%INIT>
 <%FLAGS>


More information about the Rt-commit mailing list