<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -85,6 +85,12 @@ sub {
 				$res-&gt;body( $fh );
 			}
 			when ( 'tree' ) {
+				if ( $path !~ m!/\z! ) {
+					my $uri = $req-&gt;uri-&gt;clone;
+					$uri-&gt;path( $uri-&gt;path . '/' );
+					$res-&gt;redirect( $uri, 301 );
+					return; # from `try` block
+				}
 				$res-&gt;body( get_dir $path );
 				$res-&gt;content_type( 'application/xhtml+xml' );
 			}</diff>
      <filename>app.psgi</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6d169cd14a5cc3cdf363f5b6228e4e698cb63ca4</id>
    </parent>
  </parents>
  <author>
    <name>Aristotle Pagaltzis</name>
    <email>pagaltzis@gmx.de</email>
  </author>
  <url>http://github.com/ap/witigiki/commit/2d171eb77a5387aa8566bc30cbb29289112707c5</url>
  <id>2d171eb77a5387aa8566bc30cbb29289112707c5</id>
  <committed-date>2009-11-09T00:21:28-08:00</committed-date>
  <authored-date>2009-11-09T00:21:28-08:00</authored-date>
  <message>redirect directory requests to always include trailing slash</message>
  <tree>4f3e15d06970666dc5e93a8ad2bca2b122f4bf9c</tree>
  <committer>
    <name>Aristotle Pagaltzis</name>
    <email>pagaltzis@gmx.de</email>
  </committer>
</commit>
