]> bicyclesonthemoon.info Git - ott/bsta/blobdiff - bsta_lib.1.pm
viewer redirects to static page; info includes static page;
[ott/bsta] / bsta_lib.1.pm
index 5629795940285ae6dbbd9d6241e7d1a935a04b96..262d852947ef44e85ce0190d762a056e309abcdd 100644 (file)
@@ -354,6 +354,7 @@ sub redirect
        if ($code eq '') {
                $code = HTTP_STATUS->{'found'};
        }
+       # https://insanecoding.blogspot.com/2014/02/http-308-incompetence-expected.html
        # 301 Moved Permanently
        # 302 Found
        # 303 See Other
@@ -1215,9 +1216,23 @@ sub print_viewer_page {
                if ($show_command) {
                        $frame_data->{'command'} = $command;
                }
-               if ($context->{'access'}) {
+               if ($access) {
                        $frame_data->{'frame'} = $frame_file;
                }
+               if ($frame_data->{'page'} eq '') {
+                       unless (($access) && ($frame < $last_frame)) {
+                               $frame_data->{'page'} = '';
+                       }
+                       elsif ($frame == 0) {
+                               $frame_data->{'page'} = 'index.htm';
+                       }
+                       else {
+                               $frame_data->{'page'} = sprintf(
+                                       $settings->{'frame'},
+                                       $frame, 'htm'
+                               );
+                       }
+               }
        }
        
        # everything determined, now start generating