Handle non key=value query in sqli handler

these return Internal Server Error

payload part:
http://localhost/test.php?SELECT request_url FROM events WHERE pattern

  File "/usr/local/lib/python2.7/site-packages/Glastopf-3.0.9_dev-py2.7.egg/glastopf/modules/handlers/emulators/sqli.py", line 44, in handle
    if payload["resp"]:
TypeError: string indices must be integers, not str


value part:
http://localhost/test.phpSELECT request_url FROM events WHERE pattern

  File "/usr/local/lib/python2.7/site-packages/Glastopf-3.0.9_dev-py2.7.egg/glastopf/modules/handlers/emulators/sqli.py", line 48, in handle
    payload_response = re.sub("PAYLOAD", value, response)
UnboundLocalError: local variable 'value' referenced before assignment