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)