From: Nala Ginrut <nalaginrut@gmail.com>
To: 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 13:54:56 +0800 [thread overview]
Message-ID: <CAPjoZofHRK=OAnPp=R1FgJwCCEmw5105CpXBqFUiV5RxW95kYw@mail.gmail.com> (raw)
In-Reply-To: <CAPjoZofm0trkzaYxVzK6y5vjmQOqeUddqHQeJ0mRoRzoVowfJw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 839 bytes --]
This patch will return any data get-bytevector-n received and throw error
when get <eof>.
Actually, it's not the same feature in the old version thread
http://lists.gnu.org/archive/html/guile-devel/2012-03/msg00116.html
The old version is complicated because it catches *any* exception and
return the received data within exception.
But this new version is an easy one.
My point is, read-response-body is a low level procedure, so we shouldn't
make it complex. But our current doesn't return received data when the
received data is less than the content-length. I think it should return it,
and let the user determine whether it's an error or continue reading.
And if any one need a more complicated handler, it's better to write
his/her own body reader. My vote is to write a high level HTTP library to
deal with the complex situation.
[-- Attachment #2: Type: text/html, Size: 973 bytes --]
next prev parent reply other threads:[~2012-03-16 5:54 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 [this message]
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
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='CAPjoZofHRK=OAnPp=R1FgJwCCEmw5105CpXBqFUiV5RxW95kYw@mail.gmail.com' \
--to=nalaginrut@gmail.com \
--cc=guile-devel@gnu.org \
/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).