buffet: reworked http transport to prepare for unit testing

Changed the way HTTP transport classes are implemented. Now
the Transport class is a very simple factory class that just
creates an appropriate instance of http::Connection object.
http::Connection is a thin layer wrapper around underlying
transport library, such as libcurl.

Also, the Transport class is now stateless and can be used
to initiate multiple HTTP connections.

Majority of HTTP processing is done in http::Request and
http::Response classes which are not dependent on the underlying
transport.

The HTTP utility functions now take the Transport class as
a parameter to facilitate unit tesing.

Also added a stub http_utils_unittest.cc to be populated
with actual tests when the fake HTTP transport is implemented.

BUG=chromium:364733
TEST=Unit tests pass.

Change-Id: If506854d274f725bbc2d6f765f19344d8697a239
Reviewed-on: https://chromium-review.googlesource.com/196153
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
16 files changed
tree: 1369f43dd8258c4053f51bdc44d918c008b791bb
  1. attestation/
  2. buffet/
  3. common-mk/
  4. .gitignore
  5. LICENSE