summaryrefslogtreecommitdiff
path: root/tko/retrieve_logs.cgi
diff options
context:
space:
mode:
authormbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2008-06-04 20:04:28 +0000
committermbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2008-06-04 20:04:28 +0000
commitacf2f19ac4f2b4e108ec49862d74fc9a62ae4e5b (patch)
tree8f91fc763341d78a81f60cc3844d243fde9b5bc0 /tko/retrieve_logs.cgi
parentf4ca0e135f30f0ab979e2ae4e5bfe6b33301a263 (diff)
Change the way we direct the browser from Location: to Refresh:.
The reason we do this is because location doesn't always update the client browsers URL location and as a result the links in the log output point to things like tko/burnin3 instead of 146-johnjoe/ybkv10/burnin3 - Added redirect to main job area if test=XXXX points to a test that doesn't have a directory (e.g. boot.1 boot.0) Signed-off-by: Scott Zawalski <scottz@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@1601 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'tko/retrieve_logs.cgi')
-rw-r--r--tko/retrieve_logs.cgi6
1 files changed, 5 insertions, 1 deletions
diff --git a/tko/retrieve_logs.cgi b/tko/retrieve_logs.cgi
index f64e8377..55496bc1 100644
--- a/tko/retrieve_logs.cgi
+++ b/tko/retrieve_logs.cgi
@@ -3,7 +3,8 @@
import cgi, os, sys
page = """\
-Location: %s\r\n\r
+Content-Type: text/plain
+Refresh: 0; url=%s\r\n\r
"""
# Get access to directories
@@ -31,5 +32,8 @@ keyval = retrieve_logs(autodir, job_path)
testname = ''
if 'test' in form:
testname = form['test'].value
+ full_path = os.path.join(autodir, job_path, form['test'].value)
+ if not os.path.exists(full_path):
+ testname = ''
path = "%s%s" % (form['job'].value, testname)
print page % path