Welcome to the CHICKEN Scheme pasting service
generator that spots eof added by arew on Sat Aug 8 14:00:00 2020
(define (http-response-line-read generator)
(define version '())
(define status-code '())
(define reason '())
...
(let loop ((k method-read)
(char (generator)))
(when (eof-object? char)
(raise (make-http-error "http-request-line truncated!" #f)))
(call-with-values (lambda () (k (integer->char char)))
(lambda (continue? continuation)
(if continue?
(loop continuation (generator))
(values (list->string (reverse method))
(list->string (reverse uri))
(apply cons (reverse version))))))))