Browse Source

correctly cache index documents

George Baugh 5 tháng trước cách đây
mục cha
commit
1a837a89fd
1 tập tin đã thay đổi với 5 bổ sung và 0 xóa
  1. 5 0
      lib/TPSGI.pm

+ 5 - 0
lib/TPSGI.pm

@@ -1198,6 +1198,11 @@ sub save_render {
 
     return unless $path && $extension;
 
+    # If this is an index, let's make it so
+    if ($path =~ m|/$|) {
+        $path = $path.'index';
+    }
+
     # Fixup the extension if needed.
     $extension = $fixup{$extension} if exists $fixup{$extension};