summaryrefslogtreecommitdiff
path: root/src/appMain/sample_policy_manager.py
diff options
context:
space:
mode:
authorShobhit Adlakha <ShobhitAd@users.noreply.github.com>2022-10-26 11:34:13 -0400
committerGitHub <noreply@github.com>2022-10-26 11:34:13 -0400
commit7343fc72c12edc8ac42a62556c9e4b29c9408bc3 (patch)
tree32e910f5440c10b384bb26b5555ac7adb77540ee /src/appMain/sample_policy_manager.py
parent65947fd1eb30a392948d67003df0fe803c070c6b (diff)
parentfb05c085b449b2149f85338fd4d00951205ab969 (diff)
downloadsdl_core-master.tar.gz
Merge pull request #3949 from smartdevicelink/release/8.2.0HEAD8.2.0masterdevelop
Release 8.2.0
Diffstat (limited to 'src/appMain/sample_policy_manager.py')
-rw-r--r--src/appMain/sample_policy_manager.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/appMain/sample_policy_manager.py b/src/appMain/sample_policy_manager.py
index 75a04685ed..2b3f835c57 100644
--- a/src/appMain/sample_policy_manager.py
+++ b/src/appMain/sample_policy_manager.py
@@ -25,12 +25,17 @@ parser.add_argument("--encryption", action="store_true",
def http_header(data):
+# The Content-Length to be sent in the HTTP Request header should be
+# adjusted for additional escape characters added for newline strings
+# The mobile proxy will remove the escape characters after receiving this request.
+ content_length = len(data) - data.count('\\')
+
header = {}
header["HTTPRequest"] = {}
header["HTTPRequest"]["headers"] = {
"ConnectTimeout": 60,
"ContentType": "application/json",
- "Content-Length": len(data),
+ "Content-Length": content_length,
"DoInput": True,
"DoOutput": True,
"InstanceFollowRedirects": False,