diff options
author | Shobhit Adlakha <ShobhitAd@users.noreply.github.com> | 2022-10-26 11:34:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-26 11:34:13 -0400 |
commit | 7343fc72c12edc8ac42a62556c9e4b29c9408bc3 (patch) | |
tree | 32e910f5440c10b384bb26b5555ac7adb77540ee /src/appMain/sample_policy_manager.py | |
parent | 65947fd1eb30a392948d67003df0fe803c070c6b (diff) | |
parent | fb05c085b449b2149f85338fd4d00951205ab969 (diff) | |
download | sdl_core-master.tar.gz |
Release 8.2.0
Diffstat (limited to 'src/appMain/sample_policy_manager.py')
-rw-r--r-- | src/appMain/sample_policy_manager.py | 7 |
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, |