From be4f5f904688e261dbdb3c313df44fb5bd8b8f9a Mon Sep 17 00:00:00 2001 From: James Graham Date: Fri, 21 Nov 2014 12:25:00 +0000 Subject: [PATCH 1/2] Fix incorrect path in XMLHttpRequest auth handlers. --- XMLHttpRequest/resources/auth1/auth.py | 7 ++++--- XMLHttpRequest/resources/auth2/auth.py | 7 ++++--- XMLHttpRequest/resources/auth3/auth.py | 7 ++++--- XMLHttpRequest/resources/auth4/auth.py | 7 ++++--- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/XMLHttpRequest/resources/auth1/auth.py b/XMLHttpRequest/resources/auth1/auth.py index 621d18ec00f022..8b6682686c8709 100644 --- a/XMLHttpRequest/resources/auth1/auth.py +++ b/XMLHttpRequest/resources/auth1/auth.py @@ -1,9 +1,10 @@ import imp import os +here = os.path.split(os.path.abspath(__file__))[0] + def main(request, response): - auth = imp.load_source("", os.path.join(os.path.abspath(os.curdir), - "XMLHttpRequest", - "resources", + auth = imp.load_source("", os.path.join(here, + "..", "authentication.py")) return auth.main(request, response) diff --git a/XMLHttpRequest/resources/auth2/auth.py b/XMLHttpRequest/resources/auth2/auth.py index 621d18ec00f022..8b6682686c8709 100644 --- a/XMLHttpRequest/resources/auth2/auth.py +++ b/XMLHttpRequest/resources/auth2/auth.py @@ -1,9 +1,10 @@ import imp import os +here = os.path.split(os.path.abspath(__file__))[0] + def main(request, response): - auth = imp.load_source("", os.path.join(os.path.abspath(os.curdir), - "XMLHttpRequest", - "resources", + auth = imp.load_source("", os.path.join(here, + "..", "authentication.py")) return auth.main(request, response) diff --git a/XMLHttpRequest/resources/auth3/auth.py b/XMLHttpRequest/resources/auth3/auth.py index 621d18ec00f022..8b6682686c8709 100644 --- a/XMLHttpRequest/resources/auth3/auth.py +++ b/XMLHttpRequest/resources/auth3/auth.py @@ -1,9 +1,10 @@ import imp import os +here = os.path.split(os.path.abspath(__file__))[0] + def main(request, response): - auth = imp.load_source("", os.path.join(os.path.abspath(os.curdir), - "XMLHttpRequest", - "resources", + auth = imp.load_source("", os.path.join(here, + "..", "authentication.py")) return auth.main(request, response) diff --git a/XMLHttpRequest/resources/auth4/auth.py b/XMLHttpRequest/resources/auth4/auth.py index 621d18ec00f022..8b6682686c8709 100644 --- a/XMLHttpRequest/resources/auth4/auth.py +++ b/XMLHttpRequest/resources/auth4/auth.py @@ -1,9 +1,10 @@ import imp import os +here = os.path.split(os.path.abspath(__file__))[0] + def main(request, response): - auth = imp.load_source("", os.path.join(os.path.abspath(os.curdir), - "XMLHttpRequest", - "resources", + auth = imp.load_source("", os.path.join(here, + "..", "authentication.py")) return auth.main(request, response) From f286173cfef6dd52aaf4f9ce65c69df14b5208c8 Mon Sep 17 00:00:00 2001 From: James Graham Date: Fri, 21 Nov 2014 12:50:56 +0000 Subject: [PATCH 2/2] Fix incorrect update of response headers in progress-events test. --- .../tests/submissions/Samsung/resources/no-content-length.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/progress-events/tests/submissions/Samsung/resources/no-content-length.py b/progress-events/tests/submissions/Samsung/resources/no-content-length.py index bf73dc707153c1..0b47ff146ccfc5 100644 --- a/progress-events/tests/submissions/Samsung/resources/no-content-length.py +++ b/progress-events/tests/submissions/Samsung/resources/no-content-length.py @@ -1,5 +1,5 @@ def main(request, response): - response.headers.extend([('Transfer-Encoding', 'chunked'), + response.headers.update([('Transfer-Encoding', 'chunked'), ('Content-Type', 'text/html'), ('Connection', 'keep-alive')]) response.write_status_headers()