Parse and use extra HTTP headers when downloading the payload.
Android OTA backend requires to pass an Authorization HTTP header in
order to download some payload. This patch allows to specify such
header when initiating a payload download from Android.
Bug: 27047110
TEST=Added unittests to check the headers sent.
(cherry picked from commit fdd6dec9c4be2fbd667cf874c4cc6f4ffecaeef9)
Change-Id: I59d38d79a7b7a8975d105c611c692522b6c33707
diff --git a/common/constants.cc b/common/constants.cc
index b15c3f4..3b7aa6e 100644
--- a/common/constants.cc
+++ b/common/constants.cc
@@ -91,5 +91,7 @@
const char kPayloadPropertyFileHash[] = "FILE_HASH";
const char kPayloadPropertyMetadataSize[] = "METADATA_SIZE";
const char kPayloadPropertyMetadataHash[] = "METADATA_HASH";
+const char kPayloadPropertyAuthorization[] = "AUTHORIZATION";
+const char kPayloadPropertyUserAgent[] = "USER_AGENT";
} // namespace chromeos_update_engine