[sheepdog] [PATCH v6 1/2] sheep/http: add range support for swift insterface

Liu Yuan namei.unix at gmail.com
Tue Jan 21 09:50:07 CET 2014


On Tue, Jan 21, 2014 at 04:29:59PM +0800, Robin Dong wrote:
> From: Robin Dong <sanbai at taobao.com>
> 
> In swift spec, "Range: bytes=13-15" in http header means "read the three bytes
> of data after a 13-byte offset". We add this support by parsing http header and
> read specific bytes in range.
> 
> We don't support multi-ranges at present.
> 
> Signed-off-by: Robin Dong <sanbai at taobao.com>
> ---
> v5-->v6:
>     1. don't change interface of onode_read_data() because 'req' already
>        contains offset and length.

With this version, Range: bytes=8-9 (suppose I have a file with 6 length) will
return OK instead of error status.

Thanks
Yuan



More information about the sheepdog mailing list