From 679248a343eab28bbaa0ad61c5e521a73d1d10f7 Mon Sep 17 00:00:00 2001 From: Joseph Vazhappilly Date: Tue, 4 Jun 2024 06:12:47 -0400 Subject: [PATCH] Software cli fails on upload --local command Software client is updated to use correct 'Content-Type' when using sudo software upload command with --local option. Test Plan: PASS: Verify software upload command with & without --local option Closes-Bug: 2068555 Story: 2010676 Task: 50282 Change-Id: Iaca6db5e3f502c08c4009e6833599780dc698216 Signed-off-by: Joseph Vazhappilly --- software-client/software_client/common/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software-client/software_client/common/http.py b/software-client/software_client/common/http.py index f6670678..563c6300 100644 --- a/software-client/software_client/common/http.py +++ b/software-client/software_client/common/http.py @@ -363,7 +363,7 @@ class HTTPClient(httplib2.Http): if 'content_type' in kwargs: kargs['headers']['Content-Type'] = kwargs['content_type'] kargs['headers']['Accept'] = kwargs['content_type'] - else: + elif 'Content-Type' not in kargs['headers']: kargs['headers']['Content-Type'] = self.content_type kargs['headers']['Accept'] = self.content_type