Mercurial > hg > webaudioevaluationtool
changeset 1387:f2b00d070255
Python server ignores GET in URL
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Mon, 21 Dec 2015 13:01:01 +0000 |
parents | 345974f8794a |
children | 57c7dd771212 |
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)