diff options
author | Andy Wingo <wingo@pobox.com> | 2017-02-08 15:14:49 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-02-08 15:16:25 +0100 |
commit | 710ebfddc6845237ada24300940967ebb6ae38c1 (patch) | |
tree | 1b165be6d665f4e026a4f9f9ab446fe6efad0190 /module | |
parent | 09a69dd712536350b4b8feec8cdec3dc49cb71d5 (diff) |
Web server and client use suspendable ports
* module/web/request.scm (write-request):
* module/web/response.scm (write-response): Use put-string instead of
display.
Diffstat (limited to 'module')
-rw-r--r-- | module/web/request.scm | 3 | ||||
-rw-r--r-- | module/web/response.scm | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/module/web/request.scm b/module/web/request.scm index 0a206cf35..c9f1dc1ac 100644 --- a/module/web/request.scm +++ b/module/web/request.scm @@ -22,6 +22,7 @@ (define-module (web request) #:use-module (rnrs bytevectors) #:use-module (ice-9 binary-ports) + #:use-module (ice-9 textual-ports) #:use-module (ice-9 rdelim) #:use-module (srfi srfi-9) #:use-module (web uri) @@ -214,7 +215,7 @@ on PORT, perhaps using some transfer encoding." (write-request-line (request-method r) (request-uri r) (request-version r) port) (write-headers (request-headers r) port) - (display "\r\n" port) + (put-string port "\r\n") (if (eq? port (request-port r)) r (make-request (request-method r) (request-uri r) (request-version r) diff --git a/module/web/response.scm b/module/web/response.scm index 614abcd55..06e1c6dc1 100644 --- a/module/web/response.scm +++ b/module/web/response.scm @@ -22,6 +22,7 @@ (define-module (web response) #:use-module (rnrs bytevectors) #:use-module (ice-9 binary-ports) + #:use-module (ice-9 textual-ports) #:use-module (ice-9 rdelim) #:use-module (ice-9 match) #:use-module (srfi srfi-9) @@ -220,7 +221,7 @@ on PORT, perhaps using some transfer encoding." (write-response-line (response-version r) (response-code r) (response-reason-phrase r) port) (write-headers (response-headers r) port) - (display "\r\n" port) + (put-string port "\r\n") (if (eq? port (response-port r)) r (make-response (response-version r) (response-code r) |