X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=8sync%2Fsystems%2Fweb.scm;h=cde673787c05d47ab43b3ac4545aeaac1b6054c1;hb=5df9f19127858a1b32df6ef543b4b10e49f1aa57;hp=a6ee696e571a4826d4af20b52fdd0b1129b8187c;hpb=c7a6683e7ba2377909f37bc6dc11d49f43369191;p=8sync.git diff --git a/8sync/systems/web.scm b/8sync/systems/web.scm index a6ee696..cde6737 100644 --- a/8sync/systems/web.scm +++ b/8sync/systems/web.scm @@ -1,5 +1,6 @@ ;;; 8sync --- Asynchronous programming for Guile ;;; Copyright © 2017 Christopher Allan Webber +;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen ;;; ;;; Code (also under the LGPL) borrowed from fibers: ;;; Copyright © 2016 Andy Wingo @@ -32,6 +33,7 @@ #:use-module (web server) #:use-module (rnrs io ports) #:use-module (8sync) + #:use-module ((srfi srfi-1) #:select (assoc)) #:export ( ;; @@: If we don't want to import these because of ;; "conflicts" with other objects, we could just @@ -91,7 +93,8 @@ ;; Andy Wingo added the line with this commit: ;; * module/web/server/http.scm (http-open): Ignore SIGPIPE. Keeps the ;; server from dying in some circumstances. - (sigaction SIGPIPE SIG_IGN)) + (when (defined? 'SIGPIPE) + (sigaction SIGPIPE SIG_IGN))) ;; @@: Borrowed from Guile itself / Fibers @@ -149,7 +152,7 @@ as we're alive." (let loop ((upgrades (request-upgrade request))) (if (eq? upgrades '()) #f ; Shouldn't upgrade - (match (assoc (car upgrades) upgrade-paths) + (match (assoc (car upgrades) upgrade-paths string-ci=?) ;; Yes, upgrade with this method ((_ . upgrade-proc) upgrade-proc)