nlplab/brat — pull request #871 by pflaquerre (2012-09-19 15:33:08+00:00)
Title: fix cgi parameter handling in testserver

`testserver.py` attempts to guess whether it should serve the results of
a request as plain text or through CGI. The current guessing method
erroneously looks for `.cgi` at the end of the full url. This fails on
any request that involves GET parameters:

- http://mytestserver/ajax.cgi correctly returns json
- http://mytestserver/ajax.cgi?foo=bar returns ajax.cgi as plaintext

This commit makes `testserver.py` parse the url properly.