> -----Original Message-----
> From: Ivan Zhakov [mailto:[email protected]]
> Sent: woensdag 11 november 2015 10:45
> To: [email protected]
> Cc: [email protected]
> Subject: Re: svn commit: r1713788 - in /serf/trunk: buckets/buckets.c
> buckets/dechunk_buckets.c buckets/deflate_buckets.c
> buckets/hpack_buckets.c buckets/http2_frame_buckets.c
> buckets/prefix_buckets.c serf_bucket_util.h
> 
> On 11 November 2015 at 12:39,  <[email protected]> wrote:
> > Author: rhuijben
> > Date: Wed Nov 11 09:39:09 2015
> > New Revision: 1713788
> >
> > URL: http://svn.apache.org/viewvc?rev=1713788&view=rev
> > Log:
> > Implement a best effort serf_default_readline() via read() and peek() to
> > be used on buckets that don't have a specialized implementation and
> currently
> > use a NULL function.
> >
> Nice! Just curious did you fixed this for completeness or we have some
> real case where we need readline for dechunk buckets and others?

Having a segfault implementation with a ### TODO comment is not really a nice 
solution.
And it is not unlikely users want to use this function on http2 frame based 
buckets in the future, as some http response will be backed by those. It is 
nice that all functions just work via some default implementation.

Assuming that the bucket implements peek and read following the conventions 
this now 'just works'. Buckets that can peek in future reads and are then able 
to copy data to a continuous region could do better, but there are not that 
many that can, and don't already have a specialized implementation.
), both functions would +- be as efficient.

        Bert

Reply via email to