]> lifelog.hopto.org Git - LifeLog.git/commitdiff
Started work on COMPRESS_ENC option.
authorWill Budicm <redacted>
Fri, 22 May 2020 21:10:30 +0000 (07:10 +1000)
committerWill Budicm <redacted>
Fri, 22 May 2020 21:10:30 +0000 (07:10 +1000)
Current Development Check List.md
Installation.txt
dbLifeLog/main.cnf
htdocs/cgi-bin/config.cgi
htdocs/cgi-bin/main.cgi
htdocs/cgi-bin/system/modules/Settings.pm

index ff3ea4f98cb8494746d42329fa980026751691ed..aec8302c194dd02bd39414cc703c53206185c7c0 100644 (file)
@@ -8,6 +8,7 @@ This version is not compatible in data structure to prior versions. Data migrati
 
 ### v.2.0 SUN STABLE Encountered
 
+* Implement gzip http page encoding compression of traffic.
 * Multiple search views and their settings, should be preserved as last preset. Maybe even have name multiple ones in a dropdown.
 * &#10004; Autocompletion picks up long false words, in html and code type messages.
 
index 4244fe14de224656ae1fd209efc7ef0d37edac98..7092829eae9dd448a33d9cac75f11c2ce133759e 100644 (file)
@@ -126,7 +126,8 @@ sudo cpan Number/Bytes/Human.pm;
 sudo cpan Regexp::Common;
 sudo cpan JSON;
 sudo cpan Switch;
-sudo cpan install IPC::Run
+sudo cpan IPC::Run
+sudo cpan Gzip::Faster;
 
 #Install DBI module
 sudo cpan DBI;
index 1cbc59bc7848eed0eca9db4dcab0ce6bbb813e97..36d0f23d7127f7b72fd9fa499b1da1df90bff328 100644 (file)
@@ -26,6 +26,7 @@ Credential format:<<AUTO_LOGIN <{alias}/{password}> , dont enable here using AUT
 32|$KEEP_EXCS   = 0`Cache excludes between sessions, off (default) or on.
 34|$VIEW_ALL_LMT=1000`Limit of all records displayed for large logs. Set to 0, for unlimited.
 36|$TRACK_LOGINS=1`Create system logs on login/logout of Life Log.
+38|$COMPRESS_ENC=0`Compress Encode pages, default -> 0=false, 1=true.
 <<CAT<3>
 01|Unspecified `For quick uncategorised entries.
 03|File System `Operating file system/Application short log.
index 50db9e7dcb5f5a437a392bc5d533095dc465a4a8..8aea9e7aa1adb0267cc13621b26edafc06b83109 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 #
 # Programed by: Will Budic
 # Open Source License -> https://choosealicense.com/licenses/isc/
@@ -280,6 +280,19 @@ while(my @row = $dbs->fetchrow_array()) {
                       <td>$d</td>);
             next;
         }
+        elsif($n eq "COMPRESS_ENC"){
+            my($l,$u)=("","");
+            if($v == 0){
+                    $l = "SELECTED"
+            }
+            else{
+                $u = "SELECTED"
+            }
+            $v = qq(<select id="cmp_enc" name="var$i">
+                    <option value="0" $l>False</option>
+                    <option value="1" $u>True</option>
+                    </select>);
+        }
         elsif(!defined(Settings::anon($n))){ #change into settable field to us found here unknown and not anon.
             $v = '<input name="var'.$i.'" type="text" value="'.$v.'" size="12">';
         }
index ba61121ce6471f27c03f1cdfd0cb51c93a8e401d..7d3ccb1961741a6caf52d5a8803cf8860f90b87c 100755 (executable)
@@ -23,6 +23,7 @@ use Time::localtime;
 
 use Regexp::Common qw /URI/;
 use List::MoreUtils qw(uniq);
+use Gzip::Faster;
 
 #DEFAULT SETTINGS HERE!
 use lib "system/modules";
index 4531f9f1e95d38663987671642619ada98acdc36..3db425f16c183dca25cdfde9fd3b14a8887d1545 100644 (file)
@@ -35,6 +35,7 @@ our $RTF_SIZE     = 0;
 our $THEME        = 'Standard';
 our $TRACK_LOGINS = 1;
 our $KEEP_EXCS    = 0;
+our $COMPRESS_ENC = 0; #HTTP Compressed encoding.
 
 
 #Annons here, variables that could be overiden in  code or database, per need.
@@ -74,6 +75,7 @@ sub windowRTFSize  {return $RTF_SIZE}
 sub keepExcludes   {return $KEEP_EXCS}
 sub bgcol          {return $BGCOL}
 sub css            {return $TH_CSS}
+sub compressPage   {return $COMPRESS_ENC}
 sub debug          {my $ret=shift; if($ret){$DEBUG = $ret;}; return $DEBUG;}
 
 sub createCONFIGStmt {
@@ -160,6 +162,7 @@ sub getConfiguration {
                 case "DEBUG"        { $DEBUG        = $r[2];}
                 case "KEEP_EXCS"    { $KEEP_EXCS    = $r[2];}
                 case "TRACK_LOGINS" { $TRACK_LOGINS = $r[2];}
+                case "COMPRESS_ENC" { $COMPRESS_ENC = $r[2];}
                 else                { $anons{$r[1]} = $r[2];}
                 }
         }