~ salmonella-environment-setup (master) /awful/awful.conf
Trap1;; -*- scheme -*-2(import scheme)3(cond-expand4 (chicken-45 (import chicken)6 (use awful html-tags html-utils intarweb7 spiffy spiffy-sexpr-log spiffy-directory-listing))8 (chicken-59 (import (chicken pathname))10 (import awful html-tags html-utils intarweb11 spiffy spiffy-sexpr-log spiffy-directory-listing))12 (else13 (error "Unsupported CHICKEN version.")))1415(root-path "/home/chicken/salmonella/reports")16(split-log? #t)1718(access-log "/var/log/awful")19(error-log "/var/log/awful/error.log")2021(mime-type-map22 (append23 (mime-type-map)24 '(("logz" . text/plain)25 ("svg" . image/svg+xml)26 ("svgz" . image/svg+xml)27 ("htmlz" . text/html))))2829(define (send-gzipped-file file)30 (if (memq 'gzip (header-values 'accept-encoding31 (request-headers (current-request))))32 (with-headers '((content-encoding gzip))33 (lambda ()34 (send-static-file file)))35 (send-response36 code: 40637 body: "<h1>406 - Only gzip-compressed content is available</h1>")))3839(index-files40 (cons "index.htmlz"41 (index-files)))4243(file-extension-handlers44 `(("logz" . ,send-gzipped-file)45 ("svgz" . ,send-gzipped-file)46 ("htmlz" . ,send-gzipped-file)))4748(directory-listing-css "http://wiki.call-cc.org/chicken.css")49(handle-directory spiffy-directory-listing)50(directory-listing-page51 (lambda (path contents)52 (html-page53 (<div> id: "content"54 (<h2> "Index of " (<code> path) ":")55 (<p> (<a> href: (or (pathname-directory path) path)56 "Go to parent directory"))57 contents)58 css: (directory-listing-css)59 doctype: (directory-listing-doctype)60 title: ((directory-listing-title) path))))6162;; Redirect requests to .html -> .htmlz. The redirection will only be63;; performed if the .html file doesn't exist in the filesystem64(define-page (irregex "/.*\\.html$")65 (lambda (path)66 (redirect-to (string-append path "z"))))