mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MIT-Scheme-devel] http-client broken


From: Peter
Subject: [MIT-Scheme-devel] http-client broken
Date: Mon, 16 Oct 2017 15:17:49 +0200

Hello fellow Schemers!

I've built current git, and ran into the following problem:

(http-get (->uri "http://www.gnu.org/";) '())

-> The object "", passed as an argument to make-http-request, is not a 
bytevector.

This is probably due to http-client.scm:
(define (http-get uri headers)
  (http-client-exchange "GET" uri headers ""))

That last "" should (maybe?) be (bytevector). However, calling

(http-client-exchange "GET" uri headers (bytevector))

results in

The object "\x0;\x0;\x0;...\x0;\x0;", passed as the first argument to
bytevector-length, is not the correct type. (ellipsis by me)

It seems that there is a bit of confusion in http-get as to whether the
body is a bytevector or a string :-/

This nonwithstanding, great to see a move towards R7RS!

Greetings,
Peter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]