From 4a86e133a9f73f55f1e4b1708c3be2ebecadd21b Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Mon, 15 Oct 2012 20:12:57 +0900 Subject: [PATCH] Fixing open-net-io to include socket in list of results. --- lib/chibi/net.scm | 3 ++- lib/chibi/net/http.scm | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/chibi/net.scm b/lib/chibi/net.scm index 4eed01a4..706d7ba0 100644 --- a/lib/chibi/net.scm +++ b/lib/chibi/net.scm @@ -42,7 +42,8 @@ (cond-expand (threads (set-file-descriptor-flags! sock open/non-block)) (else #f)) - (list (open-input-file-descriptor sock #t) + (list sock + (open-input-file-descriptor sock #t) (open-output-file-descriptor sock #t))))))))) ;;> Convenience wrapper around @scheme{open-net-io}, opens diff --git a/lib/chibi/net/http.scm b/lib/chibi/net/http.scm index 49ec4326..fa2bc0c7 100644 --- a/lib/chibi/net/http.scm +++ b/lib/chibi/net/http.scm @@ -75,8 +75,8 @@ host (or (uri-port uri) (if (eq? 'https (uri-scheme uri)) 443 80)))) - (in (car io)) - (out (car (cdr io)))) + (in (cadr io)) + (out (car (cddr io)))) (display "GET " out) (display (or (uri-path uri) "/") out) (display " HTTP/1.0\r\n" out)