Mercurial > hg > webaudioevaluationtool
changeset 750:c9c010690d56
Python server ignores GET in URL
author | Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk> |
---|---|
date | Mon, 21 Dec 2015 13:01:01 +0000 |
parents | 07c996307cbd |
children | 3b8069ea47d2 |
files | pythonServer.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pythonServer.py Mon Dec 21 11:53:05 2015 +0000 +++ b/pythonServer.py Mon Dec 21 13:01:01 2015 +0000 @@ -24,9 +24,9 @@ curSaveIndex += 1; curFileName = 'test-'+str(curSaveIndex)+'.xml' -print "Next save - " + curFileName pseudo_index = curSaveIndex % len(pseudo_files) -print "Next test in pseudo-random queue - " + pseudo_files[pseudo_index] + +print 'URL: http://localhost:8000/index.html' def send404(s): s.send_response(404) @@ -34,6 +34,8 @@ s.end_headers() def processFile(s): + s.path = s.path.rsplit('?') + s.path = s.path[0] s.path = s.path[1:len(s.path)] st = s.path.rsplit(',') lenSt = len(st)