# HG changeset patch # User Nicholas Jillings # Date 1450702861 0 # Node ID c9c010690d56c5263828edfb0c74938ffbb9b846 # Parent 07c996307cbde341b9e565958df59a2424670f1f Python server ignores GET in URL diff -r 07c996307cbd -r c9c010690d56 pythonServer.py --- 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)