OpenSSL error added by gahr 3 days ago
This is a small awful web app. It responds to the `/` route with a blank page, and to the `/foo` route by fetching https://google.com and dumping the number of bytes in the body. Start it up like this: awful --port=9090 --development-mode site.scm. Visit both the `/` and the `/foo` page a few times. Everything should work fine. Leave it running, go back to it some 12 hours later. The `/foo` page will error with `((exn message "error:00000000:lib(0)::reason(0)" location ssl-shutdown arguments ()) (i/o) (net) (openssl status syscall))` site.scm: ``` (import (scheme) (openssl) (only (chicken base) cut) (only (chicken condition) condition->list handle-exceptions) (only (chicken io) read-string) (only (chicken pretty-print) pp) (only (http-client) call-with-input-request) (only (awful) define-page) (only (spiffy) access-log error-log)) (define (root) "root") (define (foo) (handle-exceptions exn `(p (literal ,(cut pp (condition->list exn)))) (call-with-input-request "https://google.com" #f (lambda (in) `(p "got " ,(string-length (read-string #f in)) " bytes"))))) (error-log "error.log") (access-log "access.log") (define-page "/" (lambda () "")) (define-page "/foo" foo) ```