Nikita Karetnikov <nikita.karetni...@gmail.com> writes: > Hi, > > I'm using Guile 2.0.7. 'http-get' fails to download the file. > > scheme@(guile-user)> (http-get (string->uri > "http://citylan.dl.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2")) > ERROR: In procedure get-bytevector-all: > ERROR: Throw to key `bad-response' with args `("EOF while reading > response body: ~a bytes of ~a" (12731 421971))'.
This will run correctly if you call http-get with the #:keep-alive? keyword set to #t. If you don't run it with that, the connection gets closed automatically, and so you'll get an EOF down the line when it tries to read from the port. I think this is a bug. The intended semantics of keep-alive? (I believe) is to keep it alive _after_ the request (including the body) is finished, not just the request headers. Strange though, I never noticed this come up when adding the chunked support in the first place. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"