sheep: move http.c into the http subdirectory

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
util: add helper functions to process a requested URI

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
http: avoid reading a total data in the main thread

It's not good to sleep a long time in the main thread.

Object storage handles a big data and we shouldn't keep whole of it in
the memory.  I think we should directly use http_request_read and
http_request_write.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
http: add uri and status to http_request

These fields are necessary to implement REST APIs in the later patch.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
http: usr CRLF for endline of http header

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
http: move some structures and definitions to http.h

This prepares for introducing http driver implementation.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep: add framework for http drivers

This introduces a framework of http driver for object storage feature.
We can specify several http drivers to control http requests.  The
drivers are stackable and work like a WSGI pipeline of Python.

Usage
  $ sheep -r [host=<hostname>,][port=<port>,]<http driver>[,<http driver>][,...]

Example:
  - Enable object storage service with Swift API
    $ sheep -r swift /store

  - Enable object storage service with S3 API and S3 authorization
    $ sheep -r s3_auth,s3 /store

  - Enable Swift API and use localhost:7001 to communicate with http
    server.
    $ sheep -r host=localhost,port=7001,s3 /store

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep: add kvs feature for object storage

This implements backend kvs functions for object storage.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep/http: add s3 driver

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep/http: add swift driver

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>