Update engine properly sets Content-Type to text/xml.
Since the payload sent to Omaha is XML encoded, update engine should
properly set the HTTP Content-Type header to text/xml, instead of using
the libcurl default (application/x-www-form-urlencoded).
BUG=chromium-os:7613
TEST=Tested against devserver, ensuring that Content-Type is set
correctly
Change-Id: I9766e8dd67ffd387634a0ab4ef83c2990b16b537
Reviewed-on: https://gerrit.chromium.org/gerrit/16051
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
diff --git a/http_common.h b/http_common.h
index 807ee7d..b2ffbc7 100644
--- a/http_common.h
+++ b/http_common.h
@@ -45,4 +45,14 @@
// Converts a string beginning with an HTTP error code into numerical value.
HttpResponseCode StringToHttpResponseCode(const char *s);
+
+// Enumeration type for HTTP Content-Type.
+enum HttpContentType {
+ kHttpContentTypeUnspecified = 0,
+ kHttpContentTypeTextXml,
+};
+
+// Returns a standard HTTP Content-Type string.
+const char *GetHttpContentTypeString(HttpContentType type);
+
#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_HTTP_COMMON_H__