The Lambda Lab
/
projects
/
scratchy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3ae59ea
)
Simplified server server-loop
author
Tim Vaughan
<tgvaughan@gmail.com>
Thu, 22 Aug 2019 07:23:58 +0000
(09:23 +0200)
committer
Tim Vaughan
<tgvaughan@gmail.com>
Thu, 22 Aug 2019 07:23:58 +0000
(09:23 +0200)
scratchy.scm
patch
|
blob
|
history
diff --git
a/scratchy.scm
b/scratchy.scm
index
435fe15
..
0b81523
100644
(file)
--- a/
scratchy.scm
+++ b/
scratchy.scm
@@
-63,15
+63,15
@@
" on " (seconds->string)))
(condition-case
(let* ((line (read-line in-port))
" 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 ()
(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)
(print "... served selector '" selector "'. Closing connection."))
(o (exn)
(print-error-message o out-port)