guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] read-response-body should return received data when error oc


From: Nala Ginrut
Subject: Re: [PATCH] read-response-body should return received data when error occcurs (V2)
Date: Sat, 17 Mar 2012 09:46:48 +0800

Well, to clarify, I confess I did a wrong prejudging. I thought read-response-body is the only API to retrieve the body/data, so we should use it anyway to get the data rather than writing other procedure to handle it. Because the manual has only one API relate to this topic.
But I was *wrong*. This read-response-body is just a simple procedure to get few body/data under easy circumstance. It is defined so. Anyone who needs a more complicated operation must write his own procedure with bytevector handlers or write a new http lib. So it's no need to change it's behavior with any patch.

On Sat, Mar 17, 2012 at 1:25 AM, Daniel Hartwig <address@hidden> wrote:
On 17 March 2012 00:57, Ian Price <address@hidden> wrote:
>
> This still doesn't answer my concerns. I don't think the user should
> have to be checking the length of the result themselves.
>
> (let ((bv (get-bytevector-n (response-port r) nbytes)))
>  (cond ((eof-object? bv)
>         (incomplete-response ...))
>        ((= (bytevector-length bv) nbytes) bv)
>        (else
>         (incomplete-response ...))))
>

This.

> Am I the only one who feels strongly about this?
>

No.  I guess you are still reading the rest of the thread ;-)



reply via email to

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