diff -urN smeserver-manager-0.1.2.old/root/etc/e-smith/events/actions/locales2-conf smeserver-manager-0.1.2/root/etc/e-smith/events/actions/locales2-conf --- smeserver-manager-0.1.2.old/root/etc/e-smith/events/actions/locales2-conf 2020-11-19 11:53:26.000000000 +0400 +++ smeserver-manager-0.1.2/root/etc/e-smith/events/actions/locales2-conf 2020-11-29 00:10:27.998000000 +0400 @@ -80,7 +80,7 @@ close FIL2; print FIL ");\n\nour %Lexicon = (\n"; - print FIL " %\{ SrvMngr::I18N::Modules::General::${lang}::Lexicon \},\n"; + print FIL " %\{ SrvMngr::I18N::Modules::General::${lang}::Lexicon \},\n" unless $module eq 'General'; print FIL " %lexicon\n);\n\n\n1;\n"; close FIL; diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr/Controller/Viewlogfiles.pm smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr/Controller/Viewlogfiles.pm --- smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr/Controller/Viewlogfiles.pm 2020-11-19 11:53:26.000000000 +0400 +++ smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr/Controller/Viewlogfiles.pm 2020-11-29 00:22:50.381000000 +0400 @@ -23,6 +23,7 @@ use File::Basename; use HTML::Entities; use esmith::FormMagick qw(gen_locale_date_string); +use File::Temp qw(tempfile); use constant TRUE => 1; use constant FALSE => 0; @@ -111,6 +112,7 @@ my $modul = 'Log file download'; $notif = download_logFile( $c, %log_datas ); + return undef unless defined $notif; } $c->stash( title => $title, notif => $notif, log_datas => \%log_datas); @@ -179,6 +181,7 @@ } } + @logfiles = (); # Now go and find all the files under /var/log find({wanted => \&findlogfiles, no_chdir => 1}, '/var/log'); @@ -308,29 +311,22 @@ # the Content-disposition (an officially unsupported header) for some # reason. Yay Microsoft. - # compute file size first for the header !! - - my @fileholder = (); - my $filesize = 0; + my $file2 = new File::Temp( UNLINK => 0 ); while (my $line = ) { chomp $line; my $linew = timestamp2local($line) . $nl; - $filesize += length($linew); - push @fileholder, $linew; + print $file2 $linew; } close(FILE); - # print header - print <<"EOF"; -Expires: 0 -Content-Type:application/octet-stream -Content-Disposition:attachment;filename=$filename -Content-Length:$filesize - - -EOF - print @fileholder ; + $c->render_file( + 'filepath' => "$file2", + 'filename' => "$filename", + 'format' => 'x-download', + 'content_disposition' => 'attachment', + 'cleanup' => 1, + ); return undef; } diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr.pm smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr.pm --- smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr.pm 2020-11-29 00:07:51.000000000 +0400 +++ smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr.pm 2020-12-01 20:21:47.135000000 +0400 @@ -23,7 +23,7 @@ use SrvMngr::Model::Main; -our $VERSION = '1.202'; +our $VERSION = '1.203'; $VERSION = eval $VERSION; use Exporter 'import';