Commits

Anonymous committed 95db089

1. Added the TODO.

2. Now displaying files.

Comments (0)

Files changed (3)

 t/SVN-RaWeb-Light.t
 lib/SVN/RaWeb/Light.pm
 META.yml                                 Module meta-data (added by MakeMaker)
+TODO
+* Make sure paths ending with slash are directories and those that don't
+are files.

lib/SVN/RaWeb/Light.pm

     }
     elsif ($node_kind eq $SVN::Node::file)
     {
-        print $cgi->header();
-        print "<h1>A File!</h1>";
+        my $buffer = "";
+        open my $fh, ">", \$buffer;
+        my ($fetched_rev, $props)
+            = $svn_ra->get_file($path, $rev_num, $fh);
+        print $cgi->header( 
+            -type => ($props->{'svn:mime-type'} || 'text/plain')
+            );
+        print $buffer;
+        close($fh);
     }
     else
     {
 
 =head1 AUTHOR
 
-Shlomi Fish, E<lt>shlomi@mandrakesoft.comE<gt>
+Shlomi Fish, E<lt>shlomif@iglu.org.ilE<gt>
 
 =head1 COPYRIGHT AND LICENSE