aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/resources/http-cache/sdc_proxy.py
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-02-15 11:20:25 +0100
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-02-15 11:20:25 +0100
commit3ba340378a42d0090273f358deaaa1a269008f83 (patch)
treef00a5f2eddecddc11320b6895d7de8f51b7d0805 /src/test/resources/http-cache/sdc_proxy.py
parent7c083746477e46a662ce3eb2664a050a210d971f (diff)
Rework the SDC cache
Rework the SDC cache used during the integration tests as it was not working on windows Issue-ID: CLAMP-85 Change-Id: I56f19e7dc5e817a21714c4a19609c1de8e76e8dc Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'src/test/resources/http-cache/sdc_proxy.py')
-rwxr-xr-x[-rw-r--r--]src/test/resources/http-cache/sdc_proxy.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/resources/http-cache/sdc_proxy.py b/src/test/resources/http-cache/sdc_proxy.py
index 301e7af9d..45dac4133 100644..100755
--- a/src/test/resources/http-cache/sdc_proxy.py
+++ b/src/test/resources/http-cache/sdc_proxy.py
@@ -91,6 +91,9 @@ class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
self.check_credentials()
cached_file = '%s/%s' % (CACHE_ROOT, self.path,)
+ print("Cached file name before escaping : %s" % cached_file)
+ cached_file = cached_file.replace('<','&#60;').replace('>','&#62;').replace('?','&#63;').replace('*','&#42;').replace('\\','&#42;').replace(':','&#58;').replace('|','&#124;')
+ print("Cached file name after escaping (used for cache storage) : %s" % cached_file)
cached_file_content = "%s/.file" % (cached_file,)
cached_file_header = "%s/.header" % (cached_file,)
@@ -100,7 +103,7 @@ class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
return "404 Not found"
if not _file_available:
- print("Request for not cached file : %s" % (cached_file,))
+ print("SDC Request for data currently not present in cache: %s" % (cached_file,))
url = '%s%s' % (SDC_HOST, self.path)
response = requests.get(url, auth=SDC_AUTH, headers=SDC_HEADERS, stream=True)