X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=scratchy.git;a=blobdiff_plain;f=scratchy.scm;h=0b81523080ea1d9f46373f31f9dc68be81a407d6;hp=435fe1551aa7d22432743e9ad1b864ca0d31bfc2;hb=843f30f3749a5a47d12446d93c2e364b2956e5a7;hpb=ddf946e28add699f4c5b5ffcd2df19f92136f7ff diff --git a/scratchy.scm b/scratchy.scm index 435fe15..0b81523 100644 --- a/scratchy.scm +++ b/scratchy.scm @@ -63,15 +63,15 @@ " on " (seconds->string))) (condition-case (let* ((line (read-line in-port)) - (selector (string-trim-both line))) + (selector-raw (string-trim-both line)) + (selector (if (= (string-length selector-raw) 0) + "/" + selector-raw))) (condition-case (begin (with-output-to-port out-port (lambda () - (serve-selector (if (= (string-length selector) 0) - "/" - selector) - config))) + (serve-selector selector config))) (print "... served selector '" selector "'. Closing connection.")) (o (exn) (print-error-message o out-port)