~ salmonella-environment-setup (master) /awful/awful-salmonella-tar.conf
Trap1;; -*- scheme -*-2(import scheme)3(cond-expand4 (chicken-45 (import chicken)6 (use awful awful-salmonella-tar intarweb spiffy spiffy-sexpr-log))7 (chicken-58 (import (chicken pathname))9 (import awful awful-salmonella-tar intarweb spiffy spiffy-sexpr-log))10 (else11 (error "Unsupported CHICKEN version.")))1213(root-path "/home/chicken/salmonella/reports")14(split-log? #t)1516(access-log "/var/log/awful")17(error-log "/var/log/awful/error.log")1819;;; For run-salmonella.logz20(define (send-gzipped-file file)21 (if (memq 'gzip (header-values 'accept-encoding22 (request-headers (current-request))))23 (with-headers '((content-encoding gzip))24 (lambda ()25 (send-static-file file)))26 (send-response27 code: 40628 body: "<h1>406 - Only gzip-compressed content is available</h1>")))2930(mime-type-map31 (append32 (mime-type-map)33 '(("logz" . text/plain))))3435(file-extension-handlers36 `(("logz" . ,send-gzipped-file)))373839;;; Redirect .htmlz->.html and .svgz->.svg40(define (compressed->uncompressed path)41 (and (member (pathname-extension path) '("htmlz" "svgz"))42 (list path)))4344(define-page compressed->uncompressed45 (lambda (path)46 (redirect-to (string-chomp path "z"))))474849;;; awful-salmonella-tar50(cache-dir "/var/cache/awful-salmonella-tar")5152(awful-salmonella-tar "/")