From: Ian Price <ianprice90@googlemail.com>
To: Nala Ginrut <nalaginrut@gmail.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: [PATCH] read-response-body should return received data when error occcurs (V2)
Date: Fri, 16 Mar 2012 16:57:07 +0000 [thread overview]
Message-ID: <87zkbgeb6k.fsf@Kagami.home> (raw)
In-Reply-To: <CAPjoZofm0trkzaYxVzK6y5vjmQOqeUddqHQeJ0mRoRzoVowfJw@mail.gmail.com> (Nala Ginrut's message of "Fri, 16 Mar 2012 13:45:13 +0800")
Nala Ginrut <nalaginrut@gmail.com> writes:
> + (let* ((bv (get-bytevector-n (response-port r) nbytes)))
> + (if (eof-object? bv)
> (bad-response "EOF while reading response body: ~a bytes of ~a"
> - (bytevector-length bv) nbytes))))))
> + 0 nbytes)
> + bv)))))
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 ...))))
Am I the only one who feels strongly about this?
--
Ian Price
"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"
next prev parent reply other threads:[~2012-03-16 16:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 5:45 [PATCH] read-response-body should return received data when error occcurs (V2) Nala Ginrut
2012-03-16 5:54 ` Nala Ginrut
2012-03-16 5:56 ` Nala Ginrut
2012-03-16 7:32 ` Daniel Hartwig
2012-03-16 8:47 ` Nala Ginrut
2012-03-16 16:27 ` Tristan Colgate
2012-03-17 2:26 ` Nala Ginrut
2012-03-16 16:57 ` Ian Price [this message]
2012-03-16 17:25 ` Daniel Hartwig
2012-03-17 1:46 ` Nala Ginrut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zkbgeb6k.fsf@Kagami.home \
--to=ianprice90@googlemail.com \
--cc=guile-devel@gnu.org \
--cc=nalaginrut@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).